diff --git a/src/modules/09_leave/components/4_specialTime/DialogApprove.vue b/src/modules/09_leave/components/4_specialTime/DialogApprove.vue index ab93f817b..c2f4f249a 100644 --- a/src/modules/09_leave/components/4_specialTime/DialogApprove.vue +++ b/src/modules/09_leave/components/4_specialTime/DialogApprove.vue @@ -14,24 +14,22 @@ const $q = useQuasar(); const mixin = useCounterMixin(); const { dialogConfirm, date2Thai } = mixin; const currentDate = ref(new Date()); -const startTimeMorningRef = ref(null); -const endTimeMorningRef = ref(null); +const checkInRef = ref(null); +const checkOutRef = ref(null); const checkInStatusRef = ref(null); const checkOutStatusRef = ref(null); const formData = reactive({ - startTimeMorning: "", - endTimeMorning: "", - startTimeAfternoon: "", - endTimeAfternoon: "", + checkIn: "", + checkOut: "", note: "", checkInStatus: "", checkOutStatus: "", }); const objectRound: MyObjectRoundRef = { - startTimeMorning: startTimeMorningRef, - endTimeMorning: endTimeMorningRef, + checkIn: checkInRef, + checkOut: checkOutRef, checkInStatus: checkInStatusRef, checkOutStatus: checkOutStatusRef, }; @@ -81,17 +79,13 @@ watch( () => props.modal, (newDetailData, oldDetailData) => { if (props.editCheck === "APPROVE") { - formData.startTimeMorning = ""; - formData.endTimeMorning = ""; - formData.startTimeAfternoon = ""; - formData.endTimeAfternoon = ""; + formData.checkIn = ""; + formData.checkOut = ""; formData.note = ""; } else if (props.editCheck === "PENDING") { if (props.detailData) { - formData.startTimeMorning = props.detailData.startTimeMorning; - formData.endTimeMorning = props.detailData.endTimeMorning; - formData.startTimeAfternoon = props.detailData.startTimeAfternoon; - formData.endTimeAfternoon = props.detailData.endTimeAfternoon; + formData.checkIn = props.detailData.checkIn; + formData.checkOut = props.detailData.checkOut; formData.note = props.detailData.note; } } @@ -174,27 +168,21 @@ watch(

เวลาเข้างาน

เวลาออกงาน

{ endTimeMorning: e.endTimeMorning, startTimeAfternoon: e.startTimeAfternoon, endTimeAfternoon: e.endTimeAfternoon, + checkIn: e.checkOut, + checkOut: e.checkOut, status: e.status, checkInStatus: convertStatus(e.checkInStatus), checkOutStatus: convertStatus(e.checkOutStatus), diff --git a/src/modules/09_leave/views/SpecialTimeMain.vue b/src/modules/09_leave/views/SpecialTimeMain.vue index c64a61901..93b42e65c 100644 --- a/src/modules/09_leave/views/SpecialTimeMain.vue +++ b/src/modules/09_leave/views/SpecialTimeMain.vue @@ -76,6 +76,8 @@ onMounted(async () => { status: "PENDING", checkInStatus: "normal", checkOutStatus: "late", + checkIn: "08:00", + checkOut: "12.00", }, { id: "00000000-0000-0000-0000-000000000000", @@ -89,6 +91,8 @@ onMounted(async () => { status: "APPROVE", checkInStatus: "normal", checkOutStatus: "late", + checkIn: "08:00", + checkOut: "12.00", }, { id: "00000000-0000-0000-0000-000000000000", @@ -102,6 +106,8 @@ onMounted(async () => { status: "REJECT", checkInStatus: "normal", checkOutStatus: "late", + checkIn: "08:00", + checkOut: "12.00", }, ]); });