refactor(resign): replace toUTCString with convertDateToAPI

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-06-04 15:04:23 +07:00
parent 21401ed519
commit 80d3d96180
3 changed files with 12 additions and 11 deletions

View file

@ -34,6 +34,7 @@ const {
hideLoader,
success,
dialogConfirm,
convertDateToAPI,
} = useCounterMixin();
const checkRoutePermisson = ref<boolean>(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
}}