diff --git a/src/modules/06_retirement/components/02_resign/ResignByid.vue b/src/modules/06_retirement/components/02_resign/ResignByid.vue index b17345bea..48cd50147 100644 --- a/src/modules/06_retirement/components/02_resign/ResignByid.vue +++ b/src/modules/06_retirement/components/02_resign/ResignByid.vue @@ -47,7 +47,6 @@ const { success, dialogConfirm, dialogRemove, - convertDateToAPI, } = mixin; /** ตัวแปร */ @@ -478,8 +477,9 @@ function onSubmitConditions() { function onSubmitAttached() { dialogConfirm($q, async () => { const formData = new FormData(); - const send: string = convertDateToAPI(date.value) ?? ""; - const activeDate: string = convertDateToAPI(dateLeave.value) ?? ""; + const send = date.value !== null ? new Date(date.value).toUTCString() : ""; + const activeDate = + dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; formData.append("Location", location.value); formData.append("SendDate", send); formData.append("ActiveDate", activeDate); diff --git a/src/modules/06_retirement/components/02_resign/ResignReject.vue b/src/modules/06_retirement/components/02_resign/ResignReject.vue index 2ebdf6538..d40a2b1ec 100644 --- a/src/modules/06_retirement/components/02_resign/ResignReject.vue +++ b/src/modules/06_retirement/components/02_resign/ResignReject.vue @@ -34,7 +34,6 @@ const { hideLoader, success, dialogConfirm, - convertDateToAPI, } = useCounterMixin(); const checkRoutePermisson = ref(route.name == "resignDetailreject"); @@ -314,8 +313,9 @@ async function clickCancel() { function onSubmitAttached() { dialogConfirm($q, () => { const formData = new FormData(); - const send: string = convertDateToAPI(date.value) ?? ""; - const activeDate: string = convertDateToAPI(dateLeave.value) ?? ""; + const send = date.value !== null ? new Date(date.value).toUTCString() : ""; + const activeDate = + dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; 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 51ddb7e8c..ff5313b80 100644 --- a/src/modules/06_retirement/components/03_resignEmp/ResignReject.vue +++ b/src/modules/06_retirement/components/03_resignEmp/ResignReject.vue @@ -38,7 +38,6 @@ const { hideLoader, success, dialogConfirm, - convertDateToAPI, } = mixin; /** ตัวแปร */ @@ -302,9 +301,9 @@ async function clickCancel() { function onSubmitAttached() { dialogConfirm($q, () => { const formData = new FormData(); - const send: string = convertDateToAPI(date.value) ?? ""; - const activeDate: string = convertDateToAPI(dateLeave.value) ?? ""; - + const send = date.value !== null ? new Date(date.value).toUTCString() : ""; + const activeDate = + dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; formData.append("Location", location.value); formData.append("SendDate", send); formData.append("ActiveDate", activeDate);