แยกการลา

This commit is contained in:
STW_TTTY\stwtt 2024-07-30 16:49:17 +07:00
parent 2563982cd8
commit 10e3cda626
5 changed files with 23 additions and 4 deletions

View file

@ -158,12 +158,28 @@ async function updatePagination(p: number, ps: number) {
await fetchDataTable();
}
function convert(val: any) {
if (leaveType.value) {
const filtertype = leaveType.value.find(
(e: any) => e.id === val.leaveTypeId
);
const type = filtertype?.code;
if (type == "LV-006" && val.hajjDayStatus == false) {
return "ลาอุปสมบท";
} else if (type == "LV-006" && val.hajjDayStatus == true) {
return "ลาประกอบพิธีฮัจญ์";
} else {
return val.leaveTypeName;
}
}
}
/**
* เรยกฟงกนทงหมดตอนเรยกใชไฟล
*/
onMounted(async () => {
await fetchDataTable();
await fectOptionType();
await fetchDataTable();
});
</script>
<template>
@ -195,7 +211,7 @@ onMounted(async () => {
:props="props"
@click="onClickView(props.row.id, props.row.status)"
>
{{ props.row.leaveTypeName }}
{{ convert(props.row) }}
</q-td>
<q-td
key="dateLeave"