Merge branch 'nice_dev' into develop
# Conflicts: # src/api/07_insignia/api.insignia.ts
This commit is contained in:
commit
8e8ab5b8cf
4 changed files with 1317 additions and 805 deletions
|
|
@ -27,6 +27,10 @@ export default {
|
||||||
// record
|
// record
|
||||||
noteround: () => `${insignia}/request/note`,
|
noteround: () => `${insignia}/request/note`,
|
||||||
requestDocNote: (id:string) => `${insignia}/request/note/doc/${id}`,
|
requestDocNote: (id:string) => `${insignia}/request/note/doc/${id}`,
|
||||||
|
noteSearch: () => `${insignia}/request/note/search`,
|
||||||
|
noteAdd: (insigniaId: string) => `${insignia}/request/note/${insigniaId}`,
|
||||||
|
noteByid: (id: string) => `${insignia}/request/note/${id}`,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
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