เครื่องราช เพิ่ม ()
This commit is contained in:
parent
c91ad3092d
commit
ff16be68f3
11 changed files with 120 additions and 74 deletions
|
|
@ -15,13 +15,18 @@ export const useBrrowDataStore = defineStore("insigniaBrrow", () => {
|
|||
const listInsignia = ref<any>([])
|
||||
const employeeClass = ref<string>("all");
|
||||
const employeeClassOps = ref<any>([{ name: "ทั้งหมด", id: "all" }, { name: "ข้าราชการ กทม.สามัญ", id: "officer" }, { name: "ลูกจ้างประจำ", id: "perm" }])
|
||||
|
||||
const type = ref<any[]>([])
|
||||
const fetchDataInsignia = async (data: any) => {
|
||||
insignia.value = ''
|
||||
insigniaOp.value = [{ name: "ทั้งหมด", id: "", type: "" }]
|
||||
data.forEach((e: any) => {
|
||||
insigniaOp.value.push({ name: e.name, id: e.id, type: e.insigniaType.id })
|
||||
insigniaOp.value.push({ name: `${e.name} (${e.shortName})`, id: e.id, type: e.insigniaType.id })
|
||||
});
|
||||
data.forEach((e: any) => {
|
||||
type.value.push({
|
||||
name:e.name,
|
||||
shortName:e.shortName,
|
||||
})})
|
||||
}
|
||||
const fetchDatainsigniaType = async (data: any) => {
|
||||
insigniaType.value = data.map((e: any) => ({ name: e.id, label: e.name }))
|
||||
|
|
@ -36,7 +41,7 @@ export const useBrrowDataStore = defineStore("insigniaBrrow", () => {
|
|||
position: e.position,
|
||||
status: status(e.status),
|
||||
name: e.fullName,
|
||||
type: e.requestInsignia,
|
||||
type: `${e.requestInsignia} (${type.value.find(item => item.name === e.requestInsignia)?.shortName || ''})`,
|
||||
requestInsigniaId: e.requestInsigniaId,
|
||||
employeeType: profileType(e.profileType),
|
||||
profileType: e.profileType,
|
||||
|
|
@ -109,5 +114,6 @@ export const useBrrowDataStore = defineStore("insigniaBrrow", () => {
|
|||
profileType,
|
||||
fetchlistinsignia,
|
||||
searchDatatable,
|
||||
type
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue