แก้ไข label ของลงเวลากรณีพิเศษ

This commit is contained in:
Warunee Tamkoo 2025-03-19 17:52:36 +07:00
parent 94b3d48a91
commit af1f13ed3b
3 changed files with 25 additions and 13 deletions

View file

@ -135,7 +135,10 @@ watch(
<DialogHeader
:tittle="
props.editCheck === 'PENDING'
? 'อนุมัติคำขอ'
? props.detailData?.checkInStatus != null ||
props.detailData?.checkOutStatus != null
? 'อนุมัติคำขอแก้ไข'
: 'อนุมัติคำขอลงเวลากรณีพิเศษ'
: props.detailData
? `REJECT ${props.detailData.round}`
: ''
@ -155,7 +158,6 @@ watch(
</q-card-section>
</q-card>
</div>
<div
class="col q-ma-md q-pa-sm bg-white border-custom text-weight-medium"
>
@ -180,7 +182,12 @@ watch(
readonly
:model-value="props.dateFix"
hide-bottom-space
:label="`${'วันที่ขอแก้ไข'}`"
:label="`${
props.detailData?.checkInStatus != null ||
props.detailData?.checkOutStatus != null
? 'วันที่ขอแก้ไข'
: 'วันที่ขอลงเวลากรณีพิเศษ'
}`"
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer text-primary">
@ -189,7 +196,13 @@ watch(
</q-input>
</template>
</datepicker>
<div class="column">
<div
v-if="
props.detailData?.checkInStatus != null ||
props.detailData?.checkOutStatus != null
"
class="column"
>
<q-checkbox
disabled
:model-value="formData.checkInEdit"

View file

@ -224,13 +224,16 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
// convertSatatus
function convertStatus(val: string) {
switch (val) {
case "normal":
const value = val ? val.toUpperCase() : null;
switch (value) {
case "NORMAL":
return "ปกติ";
case "late":
case "LATE":
return "สาย";
case "absent":
case "ABSENT":
return "ขาดราชการ";
default:
value;
}
}
@ -254,7 +257,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
pageSize,
month,
filter,
convertStatus
convertStatus,
// changeMonth,
};
});

View file

@ -246,8 +246,6 @@ watch(
* งชนเรยกดอม
*/
async function fetchData() {
console.log(pagination.value.page);
showLoader();
await http
.get(
@ -392,7 +390,6 @@ onMounted(async () => {
class="col-xs-12 col-sm-3 col-md-2"
/>
</div>
<div class="col-12">
<d-table
:columns="columns"
@ -430,7 +427,6 @@ onMounted(async () => {
@click="unapprove(props.row.fullname, props.row.id)"
>ไมอน</q-btn
>
<q-btn
v-if="
props.row.status == 'PENDING' &&