diff --git a/src/modules/06_retirement/components/02_resign/ResignByid.vue b/src/modules/06_retirement/components/02_resign/ResignByid.vue index 4d4dac874..b17345bea 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,10 +771,13 @@ onMounted(async () => {
(route.name == "resignDetailreject"); @@ -313,9 +314,8 @@ 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); @@ -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/ResignByid.vue b/src/modules/06_retirement/components/03_resignEmp/ResignByid.vue index fddf3cf66..c10cda62c 100644 --- a/src/modules/06_retirement/components/03_resignEmp/ResignByid.vue +++ b/src/modules/06_retirement/components/03_resignEmp/ResignByid.vue @@ -801,10 +801,11 @@ 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);