diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 30cd2c0..a64742b 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -385,7 +385,7 @@ async function getCheck() { } showLoader() - const isSeminar = endTimeAfternoon.value === '14:30' ? 'Y' : 'N' + const isSeminar = model.value === 'ไปประชุม / อบรม / สัมมนา' ? 'Y' : 'N' await http .get(config.API.checkoutCheck + `/${isSeminar}`) @@ -401,7 +401,10 @@ async function getCheck() { new Intl.DateTimeFormat('en-US', options).format( new Date(res.data.result.serverTime) ) ?? '' - const endTimeAfternoonVal = endTimeAfternoon.value ?? '' + const endTimeAfternoonVal = + new Intl.DateTimeFormat('en-US', options).format( + new Date(res.data.result.endTime) + ) ?? '' // dialog ยืนยันการลงเวลาออกงาน dialogConfirm(