From f8843a2990f8f45849a2a6f0975751fb494b8a92 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Tue, 7 Nov 2023 12:03:20 +0700 Subject: [PATCH] ui specialTime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit เพิ่มตัวแปร checkIn checkOut --- .../4_specialTime/DialogApprove.vue | 58 +++++++------------ .../09_leave/interface/request/specialTime.ts | 2 + .../interface/response/specialTime.ts | 10 ++-- .../09_leave/stores/SpecialTimeStore.ts | 2 + .../09_leave/views/SpecialTimeMain.vue | 6 ++ 5 files changed, 34 insertions(+), 44 deletions(-) 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", }, ]); });