ProjectList.vue
5.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<script setup>
import avatar1 from '@images/avatars/avatar-1.png'
import avatar2 from '@images/avatars/avatar-2.png'
import avatar3 from '@images/avatars/avatar-3.png'
import avatar4 from '@images/avatars/avatar-4.png'
import avatar5 from '@images/avatars/avatar-5.png'
import avatar6 from '@images/avatars/avatar-6.png'
import avatar7 from '@images/avatars/avatar-7.png'
import avatar8 from '@images/avatars/avatar-8.png'
import figma from '@images/icons/project-icons/figma.png'
import html5 from '@images/icons/project-icons/html5.png'
import python from '@images/icons/project-icons/python.png'
import react from '@images/icons/project-icons/react.png'
import sketch from '@images/icons/project-icons/sketch.png'
import vue from '@images/icons/project-icons/vue.png'
import xamarin from '@images/icons/project-icons/xamarin.png'
// Project Table Header
const projectTableHeaders = [
{
title: 'PROJECT',
key: 'project',
},
{
title: 'LEADER',
key: 'leader',
},
{
title: 'Team',
key: 'team',
},
{
title: 'PROGRESS',
key: 'progress',
},
{
title: 'Action',
key: 'Action',
sortable: false,
},
]
const projects = [
{
logo: react,
name: 'BGC eCommerce App',
project: 'React Project',
leader: 'Eileen',
progress: 78,
hours: '18:42',
team: [
avatar1,
avatar8,
avatar6,
],
extraMembers: 3,
},
{
logo: figma,
name: 'Falcon Logo Design',
project: 'Figma Project',
leader: 'Owen',
progress: 25,
hours: '20:42',
team: [
avatar5,
avatar2,
],
},
{
logo: vue,
name: 'Dashboard Design',
project: 'Vuejs Project',
leader: 'Keith',
progress: 62,
hours: '120:87',
team: [
avatar8,
avatar2,
avatar1,
],
},
{
logo: xamarin,
name: 'Foodista mobile app',
project: 'Xamarin Project',
leader: 'Merline',
progress: 8,
hours: '120:87',
team: [
avatar3,
avatar4,
avatar7,
],
extraMembers: 8,
},
{
logo: python,
name: 'Dojo Email App',
project: 'Python Project',
leader: 'Harmonia',
progress: 51,
hours: '230:10',
team: [
avatar4,
avatar3,
avatar1,
],
extraMembers: 5,
},
{
logo: sketch,
name: 'Blockchain Website',
project: 'Sketch Project',
leader: 'Allyson',
progress: 92,
hours: '342:41',
team: [
avatar1,
avatar8,
],
},
{
logo: html5,
name: 'Hoffman Website',
project: 'HTML Project',
leader: 'Georgie',
progress: 80,
hours: '12:45',
team: [
avatar1,
avatar8,
avatar6,
],
},
]
const moreList = [
{
title: 'Download',
value: 'Download',
},
{
title: 'Delete',
value: 'Delete',
},
{
title: 'View',
value: 'View',
},
]
</script>
<template>
<VCard
title="Project List"
class="projectList"
>
<!-- 👉 User Project List Table -->
<!-- SECTION Datatable -->
<VDataTable
:headers="projectTableHeaders"
:items="projects"
hide-default-footer
show-select
item-value="name"
>
<!-- projects -->
<template #item.project="{ item }">
<div class="d-flex align-center gap-x-3">
<VAvatar
:size="34"
:image="item.logo"
/>
<div>
<h6 class="text-h6 text-no-wrap">
{{ item.name }}
</h6>
<div class="text-body-2">
{{ item.project }}
</div>
</div>
</div>
</template>
<template #item.leader="{ item }">
<div class="text-base text-high-emphasis">
{{ item.leader }}
</div>
</template>
<!-- Team -->
<template #item.team="{ item }">
<div class="d-flex">
<div class="v-avatar-group">
<VAvatar
v-for="(data, index) in item.team"
:key="index"
size="30"
>
<VImg :src="data" />
</VAvatar>
<VAvatar
v-if="item.extraMembers"
:color="$vuetify.theme.current.dark ? '#3A3B59' : '#F0EFF0'"
:size="30"
>
<div class="text-caption text-high-emphasis">
+{{ item.extraMembers }}
</div>
</VAvatar>
</div>
</div>
</template>
<!-- Progress -->
<template #item.progress="{ item }">
<div class="d-flex align-center gap-3">
<div class="flex-grow-1">
<VProgressLinear
:height="6"
:model-value="item.progress"
rounded
/>
</div>
<div class="text-high-emphasis">
{{ item.progress }}%
</div>
</div>
</template>
<!-- Action -->
<template #item.Action>
<MoreBtn
:menu-list="moreList"
density="compact"
/>
</template>
<!-- TODO Refactor this after vuetify provides proper solution for removing default footer -->
<template #bottom />
</VDataTable>
<!-- !SECTION -->
</VCard>
</template>
<style lang="scss">
.projectList{
.v-table{
&--density-default{
.v-table__wrapper{
table{
tbody{
tr{
td{
block-size: 56px;
}
}
}
}
}
}
}
}
</style>