CardAdvancedDeliveryPerformance.vue
2.26 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
<script setup>
const deliveryData = [
{
title: 'Packages in transit',
value: '10k',
change: 25.8,
icon: 'ri-gift-line',
color: 'primary',
},
{
title: 'Packages out for delivery',
value: '5k',
change: 4.3,
icon: 'ri-car-line',
color: 'info',
},
{
title: 'Packages delivered',
value: '15k',
change: -12.5,
icon: 'ri-check-line',
color: 'success',
},
{
title: 'Delivery success rate',
value: '95%',
change: 35.6,
icon: 'ri-home-line',
color: 'warning',
},
{
title: 'Average delivery time',
value: '2.5 Days',
change: -2.15,
icon: 'ri-timer-line',
color: 'secondary',
},
{
title: 'Customer satisfaction',
value: '4.5/5',
change: 5.7,
icon: 'ri-user-line',
color: 'error',
},
]
</script>
<template>
<VCard>
<VCardItem
title="Delivery performance"
subtitle="12% increase in this month"
>
<template #append>
<MoreBtn class="mt-n5" />
</template>
</VCardItem>
<VCardText>
<VList class="card-list">
<VListItem
v-for="(data, index) in deliveryData"
:key="index"
>
<template #prepend>
<VAvatar
:color="data.color"
variant="tonal"
rounded
size="42"
>
<VIcon
:icon="data.icon"
size="26"
/>
</VAvatar>
</template>
<VListItemTitle class="me-1">
{{ data.title }}
</VListItemTitle>
<VListItemSubtitle>
<div
:class="data.change > 0 ? 'text-success' : 'text-error'"
class="d-flex align-center"
>
<VIcon
:icon="data.change > 0 ? 'ri-arrow-up-s-line' : 'ri-arrow-down-s-line'"
size="24"
class="me-1"
/>
<span>{{ data.change }}%</span>
</div>
</VListItemSubtitle>
<template #append>
<span class="text-high-emphasis text-body-1 font-weight-medium">
{{ data.value }}
</span>
</template>
</VListItem>
</VList>
</VCardText>
</VCard>
</template>