From ff6671d5230598337c694b9feedd9679234bbeac Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 4 Jun 2026 12:58:07 +0700 Subject: [PATCH 1/2] =?UTF-8?q?fixed:=20=E0=B9=80=E0=B8=9B=E0=B8=B4?= =?UTF-8?q?=E0=B8=94=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=AA=E0=B8=B2=E0=B8=A1?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=96=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= =?UTF-8?q?=E0=B8=82=E0=B8=AD=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B9=84=E0=B8=94=E0=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../06_retirement/components/02_resign/ResignByid.vue | 11 +++++++---- .../components/03_resignEmp/ResignByid.vue | 9 +++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/modules/06_retirement/components/02_resign/ResignByid.vue b/src/modules/06_retirement/components/02_resign/ResignByid.vue index 4d4dac874..48cd50147 100644 --- a/src/modules/06_retirement/components/02_resign/ResignByid.vue +++ b/src/modules/06_retirement/components/02_resign/ResignByid.vue @@ -771,10 +771,13 @@ onMounted(async () => {
{
Date: Thu, 4 Jun 2026 15:04:23 +0700 Subject: [PATCH 2/2] refactor(resign): replace toUTCString with convertDateToAPI --- .../06_retirement/components/02_resign/ResignByid.vue | 8 ++++---- .../06_retirement/components/02_resign/ResignReject.vue | 8 ++++---- .../components/03_resignEmp/ResignReject.vue | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/modules/06_retirement/components/02_resign/ResignByid.vue b/src/modules/06_retirement/components/02_resign/ResignByid.vue index 4d4dac874..881bf0260 100644 --- a/src/modules/06_retirement/components/02_resign/ResignByid.vue +++ b/src/modules/06_retirement/components/02_resign/ResignByid.vue @@ -47,6 +47,7 @@ const { success, dialogConfirm, dialogRemove, + convertDateToAPI, } = mixin; /** ตัวแปร */ @@ -477,9 +478,8 @@ function onSubmitConditions() { function onSubmitAttached() { dialogConfirm($q, async () => { const formData = new FormData(); - const send = date.value !== null ? new Date(date.value).toUTCString() : ""; - const activeDate = - dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; + const send: string = convertDateToAPI(date.value) ?? ""; + const activeDate: string = convertDateToAPI(dateLeave.value) ?? ""; formData.append("Location", location.value); formData.append("SendDate", send); formData.append("ActiveDate", activeDate); @@ -771,7 +771,7 @@ onMounted(async () => {
{ const formData = new FormData(); - const send = date.value !== null ? new Date(date.value).toUTCString() : ""; - const activeDate = - dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; + const send: string = convertDateToAPI(date.value) ?? ""; + const activeDate: string = convertDateToAPI(dateLeave.value) ?? ""; formData.append("Location", location.value); formData.append("SendDate", send); formData.append("ActiveDate", activeDate); @@ -439,7 +439,7 @@ onMounted(async () => { class="q-mr-sm" @click="router.push('/retirement/resign')" /> - รายละเอียดการยกเลิกลาออก + รายละเอียดการยกเลิกลาออก {{ dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName }} diff --git a/src/modules/06_retirement/components/03_resignEmp/ResignReject.vue b/src/modules/06_retirement/components/03_resignEmp/ResignReject.vue index ff5313b80..51ddb7e8c 100644 --- a/src/modules/06_retirement/components/03_resignEmp/ResignReject.vue +++ b/src/modules/06_retirement/components/03_resignEmp/ResignReject.vue @@ -38,6 +38,7 @@ const { hideLoader, success, dialogConfirm, + convertDateToAPI, } = mixin; /** ตัวแปร */ @@ -301,9 +302,9 @@ async function clickCancel() { function onSubmitAttached() { dialogConfirm($q, () => { const formData = new FormData(); - const send = date.value !== null ? new Date(date.value).toUTCString() : ""; - const activeDate = - dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; + const send: string = convertDateToAPI(date.value) ?? ""; + const activeDate: string = convertDateToAPI(dateLeave.value) ?? ""; + formData.append("Location", location.value); formData.append("SendDate", send); formData.append("ActiveDate", activeDate);