แก้ไข Status เป็น text

This commit is contained in:
AnandaTon 2023-08-31 11:15:39 +07:00
parent 07fd157cdf
commit 2143c05a42
2 changed files with 50 additions and 26 deletions

View file

@ -0,0 +1,27 @@
import { defineStore } from "pinia";
export const useRestDataStore = defineStore("Rest", () => {
const statusText = (val: string) => {
switch (val) {
case "WAITTING":
return "รอดำเนินการ";
case "PENDING":
return "เลือกตำแหน่งแล้ว";
case "APPROVE":
return "อนุมัติ";
case "REJECT":
return "ไม่อนุมัติ";
case "REPORT":
return "ส่งรายชื่อไปออกคำสั่ง";
case "DONE":
return "ออกคำสั่งเสร็จแล้ว";
default:
return "-";
}
};
return {
statusText,
};
});