แก้ไขระบบลา

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

View file

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