feat: add ready status of request data
This commit is contained in:
parent
16e9393315
commit
363779a2bc
7 changed files with 18 additions and 6 deletions
|
|
@ -16,6 +16,7 @@ const props = withDefaults(
|
||||||
| 'dark-orange'
|
| 'dark-orange'
|
||||||
| 'cyan'
|
| 'cyan'
|
||||||
| 'yellow'
|
| 'yellow'
|
||||||
|
| 'light-yellow'
|
||||||
| 'red'
|
| 'red'
|
||||||
| 'magenta'
|
| 'magenta'
|
||||||
| 'blue'
|
| 'blue'
|
||||||
|
|
@ -45,11 +46,7 @@ const props = withDefaults(
|
||||||
>
|
>
|
||||||
<div class="stat-card__content row items-center q-pa-sm">
|
<div class="stat-card__content row items-center q-pa-sm">
|
||||||
<div class="col-4 text-center">
|
<div class="col-4 text-center">
|
||||||
<q-avatar
|
<q-avatar size="lg" style="background-color: hsla(0 0% 100% /0.2)">
|
||||||
size="lg"
|
|
||||||
style="background-color: hsla(0 0% 100% /0.2)"
|
|
||||||
text-color="white"
|
|
||||||
>
|
|
||||||
<Icon :icon="v.icon" width="24px" />
|
<Icon :icon="v.icon" width="24px" />
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -116,6 +113,10 @@ const props = withDefaults(
|
||||||
--_color: var(--orange-4-hsl);
|
--_color: var(--orange-4-hsl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stat-card__light-yellow {
|
||||||
|
--_color: var(--yellow-6-hsl);
|
||||||
|
}
|
||||||
|
|
||||||
.stat-card__orange {
|
.stat-card__orange {
|
||||||
--_color: var(--orange-5-hsl);
|
--_color: var(--orange-5-hsl);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -917,6 +917,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
Pending: 'Pending',
|
Pending: 'Pending',
|
||||||
|
Ready: 'Ready',
|
||||||
InProgress: 'In Progress',
|
InProgress: 'In Progress',
|
||||||
Completed: 'Completed',
|
Completed: 'Completed',
|
||||||
Canceled: 'Canceled',
|
Canceled: 'Canceled',
|
||||||
|
|
|
||||||
|
|
@ -908,7 +908,8 @@ export default {
|
||||||
Canceled: 'ยกเลิก',
|
Canceled: 'ยกเลิก',
|
||||||
},
|
},
|
||||||
Pending: 'รอดำเนินการ',
|
Pending: 'รอดำเนินการ',
|
||||||
InProgress: 'ดำเนินการ',
|
Ready: 'พร้อมดำเนินการ',
|
||||||
|
InProgress: 'กำลังดำเนินการ',
|
||||||
Completed: 'เสร็จสิ้น',
|
Completed: 'เสร็จสิ้น',
|
||||||
Canceled: 'ยกเลิก',
|
Canceled: 'ยกเลิก',
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,12 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
|
||||||
label: 'requestList.status.Pending',
|
label: 'requestList.status.Pending',
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'mdi:tag-check-outline',
|
||||||
|
count: stats[RequestDataStatus.Pending],
|
||||||
|
label: 'requestList.status.Ready',
|
||||||
|
color: 'light-yellow',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
icon: 'mdi-timer-sand',
|
icon: 'mdi-timer-sand',
|
||||||
count: stats[RequestDataStatus.InProgress],
|
count: stats[RequestDataStatus.InProgress],
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,7 @@ function getEmployeeName(
|
||||||
:hsla-color="
|
:hsla-color="
|
||||||
{
|
{
|
||||||
[RequestDataStatus.Pending]: '--orange-5-hsl',
|
[RequestDataStatus.Pending]: '--orange-5-hsl',
|
||||||
|
[RequestDataStatus.Ready]: '--yellow-6-hsl',
|
||||||
[RequestDataStatus.InProgress]: '--blue-6-hsl',
|
[RequestDataStatus.InProgress]: '--blue-6-hsl',
|
||||||
[RequestDataStatus.Completed]: '--green-8-hsl',
|
[RequestDataStatus.Completed]: '--green-8-hsl',
|
||||||
[RequestDataStatus.Canceled]: '--red-5-hsl',
|
[RequestDataStatus.Canceled]: '--red-5-hsl',
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ export const useRequestList = defineStore('request-list', () => {
|
||||||
const pageSize = ref<number>(30);
|
const pageSize = ref<number>(30);
|
||||||
const stats = ref<Record<RequestDataStatus, number>>({
|
const stats = ref<Record<RequestDataStatus, number>>({
|
||||||
[RequestDataStatus.Pending]: 0,
|
[RequestDataStatus.Pending]: 0,
|
||||||
|
[RequestDataStatus.Ready]: 0,
|
||||||
[RequestDataStatus.InProgress]: 0,
|
[RequestDataStatus.InProgress]: 0,
|
||||||
[RequestDataStatus.Completed]: 0,
|
[RequestDataStatus.Completed]: 0,
|
||||||
[RequestDataStatus.Canceled]: 0,
|
[RequestDataStatus.Canceled]: 0,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ export type RequestData = {
|
||||||
|
|
||||||
export enum RequestDataStatus {
|
export enum RequestDataStatus {
|
||||||
Pending = 'Pending',
|
Pending = 'Pending',
|
||||||
|
Ready = 'Ready',
|
||||||
InProgress = 'InProgress',
|
InProgress = 'InProgress',
|
||||||
Completed = 'Completed',
|
Completed = 'Completed',
|
||||||
Canceled = 'Canceled',
|
Canceled = 'Canceled',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue