แก้ไขระบบลา

This commit is contained in:
Warunee Tamkoo 2025-05-08 17:22:50 +07:00
parent 39f969a5f2
commit 5b47c9a9da
2 changed files with 20 additions and 5 deletions

View file

@ -35,7 +35,7 @@ const filter = ref<string>("");
const maxPage = ref<number>(1);
const page = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0)
const total = ref<number>(0);
/** function เรียกข้อมูลการลา*/
async function fetchDataTable() {
showLoader();
@ -204,7 +204,15 @@ onMounted(async () => {
:props="props"
@click="onClickView(props.row.id, props.row.status)"
>
{{ props.row.leaveTypeName ? `${props.row.leaveTypeName} ${props.row.leaveSubTypeName ? `(${props.row.leaveSubTypeName})`:''}`: '-' }}
{{
props.row.leaveTypeName
? `${props.row.leaveTypeName} ${
props.row.leaveSubTypeName
? `(${props.row.leaveSubTypeName})`
: ""
}`
: "-"
}}
</q-td>
<q-td
key="dateLeave"
@ -260,7 +268,9 @@ onMounted(async () => {
class="q-mr-sm"
/>
<q-icon
v-if="props.row.status == 'DELETE'"
v-if="
props.row.status == 'DELETING' || props.row.status == 'DELETE'
"
size="10px"
color="grey-10"
name="mdi-circle"
@ -428,7 +438,10 @@ onMounted(async () => {
class="q-mr-sm"
/>
<q-icon
v-if="props.row.status == 'DELETE'"
v-if="
props.row.status == 'DELETING' ||
props.row.status == 'DELETE'
"
size="10px"
color="grey-10"
name="mdi-circle"

View file

@ -77,8 +77,10 @@ export const useLeaveStore = defineStore("Leave", () => {
return "อนุมัติ";
case "REJECT":
return "ไม่อนุมัติ";
case "DELETING":
return "กำลังดำเนินการยกเลิก";
case "DELETE":
return "ยกเลิก";
return "ยกเลิกสำเร็จ";
}
}