fixing bug

This commit is contained in:
Warunee Tamkoo 2024-06-07 12:10:11 +07:00
parent e53f81890e
commit e3c0670b26

View file

@ -173,11 +173,14 @@ const columns2 = ref<QTableProps["columns"]>([
{
name: "posLevelName",
align: "left",
label: "ระดับ",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "posLevelName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.posTypeName + " (" + row.posLevelName + ")";
},
},
{
name: "organizationOrganization",
@ -299,21 +302,21 @@ async function filterKeyword2Fn(page: number) {
}
/** fecth profile */
async function fecthlistPersonal() {
showLoader();
await http
.get(config.API.profileOrganizRoot)
.then((res) => {
const id = res.data.result[0].id;
if (id !== "") {
findlist(id);
}
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
}
// async function fecthlistPersonal() {
// showLoader();
// await http
// .get(config.API.profileOrganizRoot)
// .then((res) => {
// const id = res.data.result[0].id;
// if (id !== "") {
// findlist(id);
// }
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {});
// }
/**
* งขอมลเพ res
@ -341,34 +344,34 @@ async function fecthlistProbation(id: string, data: any) {
* นหาขอมลตามไอด
* @param id string
*/
async function findlist(id: string) {
let data: CriteriaType[] = [
{ criteriaType: "is_retire", criteriaValue: "false" },
{ criteriaType: "is_probation", criteriaValue: "true" },
];
let data2: CriteriaType[] = [
{ criteriaType: "is_retire", criteriaValue: "false" },
{ criteriaType: "is_probation", criteriaValue: "false" },
];
let response1 = await fecthlistProbation(id, data);
let response2 = await fecthlistProbation(id, data2);
// async function findlist(id: string) {
// let data: CriteriaType[] = [
// { criteriaType: "is_retire", criteriaValue: "false" },
// { criteriaType: "is_probation", criteriaValue: "true" },
// ];
// let data2: CriteriaType[] = [
// { criteriaType: "is_retire", criteriaValue: "false" },
// { criteriaType: "is_probation", criteriaValue: "false" },
// ];
// let response1 = await fecthlistProbation(id, data);
// let response2 = await fecthlistProbation(id, data2);
response1.forEach((e: any) =>
probationlist.value.push({ ...e, probation: true })
);
response2.forEach((e: any) =>
probationlist.value.push({ ...e, probation: false })
);
rows2.value = probationlist.value.map((e: mapData) => ({
id: e.id,
fullname: e.fullname,
position: e.position,
level: e.positionEmployeeLevel,
organizationOrganization: e.oc,
status: e.probation,
}));
modal.value = true;
}
// response1.forEach((e: any) =>
// probationlist.value.push({ ...e, probation: true })
// );
// response2.forEach((e: any) =>
// probationlist.value.push({ ...e, probation: false })
// );
// rows2.value = probationlist.value.map((e: mapData) => ({
// id: e.id,
// fullname: e.fullname,
// position: e.position,
// level: e.positionEmployeeLevel,
// organizationOrganization: e.oc,
// status: e.probation,
// }));
// modal.value = true;
// }
/**
* เพมขอม ทดลองปฏหนาทราชการ