แก้ลูกจ้าง

This commit is contained in:
setthawutttty 2024-11-07 14:51:21 +07:00
parent aa65b8165d
commit 7d75535d15
25 changed files with 942 additions and 892 deletions

View file

@ -91,8 +91,7 @@ export const useDataStore = defineStore("data", () => {
async function getData(dataPerson: any) {
const data = await dataPerson;
isProbation.value = data.isProbation;
officerType.value = data.type;
officerLink.value = await convertEmType(data.type);
formData.prefix = data.prefix;
formData.firstName = data.firstName;
formData.lastName = data.lastName;
@ -107,17 +106,18 @@ export const useDataStore = defineStore("data", () => {
}
async function getProFileType() {
http
.get(config.API.proFileType)
.then(async (res) => {
const data = res.data.result;
officerType.value = data.type;
officerLink.value = await convertEmType(data.type);
hideLoader();
})
.catch((e) => {
messageError($q, e);
});
if (officerType.value == "") {
await http
.get(config.API.proFileType)
.then(async (res) => {
const data = await res.data.result;
officerType.value = data;
})
.catch((e) => {
messageError($q, e);
});
}
return convertEmType(officerType.value);
}
return {