api เครื่องราช ส่วนบันทึกผล
This commit is contained in:
parent
41cb1f814e
commit
80512ae2ee
4 changed files with 1317 additions and 805 deletions
File diff suppressed because it is too large
Load diff
55
src/modules/07_insignia/storeResult.ts
Normal file
55
src/modules/07_insignia/storeResult.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref, } from "vue";
|
||||
|
||||
|
||||
|
||||
export const useResultDataStore = defineStore("insignia", () => {
|
||||
const insignia = ref<string>('')
|
||||
const insigniaOp = ref<any[]>([{ name: "ทั้งหมด", id: "" }])
|
||||
const insigniaOp2 = ref<any[]>([])
|
||||
const insigniaType = ref<any>()
|
||||
|
||||
|
||||
const fetchDatainsignia = async (data: any) => {
|
||||
data.forEach((e: any) => {
|
||||
insigniaOp.value.push({ name: e.name, id: e.id })
|
||||
});
|
||||
data.forEach((e: any) => {
|
||||
insigniaOp2.value.push({ name: e.name, id: e.id })
|
||||
});
|
||||
|
||||
}
|
||||
const fetchDatainsigniaType = async (data: any) => {
|
||||
insigniaType.value = data.map((e: any) => ({ name: e.id, label: e.name }))
|
||||
}
|
||||
const status = (val: string) => {
|
||||
switch (val) {
|
||||
case "PENDING":
|
||||
return "รอบันทึกข้อมูล";
|
||||
case "REJECT":
|
||||
return "ยกเลิก";
|
||||
case "DELETE":
|
||||
return "ลบ";
|
||||
case "DONE":
|
||||
return "บันทึกลง ก.พ. 7 แล้ว";
|
||||
}
|
||||
}
|
||||
const profileType = (val: string) => {
|
||||
switch (val) {
|
||||
case "officer":
|
||||
return "ข้าราชการ กทม.สามัญ";
|
||||
case "employee":
|
||||
return "ลูกจ้างประจำ";
|
||||
}
|
||||
}
|
||||
return {
|
||||
insignia,
|
||||
insigniaOp,
|
||||
insigniaOp2,
|
||||
insigniaType,
|
||||
fetchDatainsignia,
|
||||
fetchDatainsigniaType,
|
||||
status,
|
||||
profileType,
|
||||
};
|
||||
});
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue