ปรับ ui form

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-07 16:35:39 +07:00
parent 8ea5ad36da
commit 68ef892d62
8 changed files with 230 additions and 246 deletions

View file

@ -16,6 +16,8 @@ export const useChekIn = defineStore("checkin", () => {
status: e.status,
Morningstatus: convertStatus(e.Morningstatus),
AfternoonStatus: convertStatus(e.AfternoonStatus),
statusEdit: e.statusEdit,
statusEditName: convertStatusEdit(e.statusEdit),
}));
rows.value = datalist;
}
@ -32,9 +34,28 @@ export const useChekIn = defineStore("checkin", () => {
return "";
}
}
function convertStatusEdit(val: string) {
switch (val) {
case "edit":
return "ขอแก้ไข";
case "wait":
return "รออนุมัติ";
case "approve":
return "อนุมัติ";
}
}
function classColorStatus(val: string) {
switch (val) {
case "wait":
return "orange";
case "approve":
return "green";
}
}
return {
rows,
fetchHistoryList,
classColorStatus,
};
});