refactor(resign): replace toUTCString with convertDateToAPI
This commit is contained in:
parent
21401ed519
commit
80d3d96180
3 changed files with 12 additions and 11 deletions
|
|
@ -47,6 +47,7 @@ const {
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
convertDateToAPI,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** ตัวแปร */
|
/** ตัวแปร */
|
||||||
|
|
@ -477,9 +478,8 @@ function onSubmitConditions() {
|
||||||
function onSubmitAttached() {
|
function onSubmitAttached() {
|
||||||
dialogConfirm($q, async () => {
|
dialogConfirm($q, async () => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
|
const send: string = convertDateToAPI(date.value) ?? "";
|
||||||
const activeDate =
|
const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
|
||||||
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
|
|
||||||
formData.append("Location", location.value);
|
formData.append("Location", location.value);
|
||||||
formData.append("SendDate", send);
|
formData.append("SendDate", send);
|
||||||
formData.append("ActiveDate", activeDate);
|
formData.append("ActiveDate", activeDate);
|
||||||
|
|
@ -771,7 +771,7 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
!checkRoutePermisson &&
|
!checkRoutePermisson &&
|
||||||
isStaff &&
|
isStaff &&
|
||||||
status === 'WAITTING' &&
|
status === 'WAITTING' &&
|
||||||
checkPermission($route)?.attrIsUpdate
|
checkPermission($route)?.attrIsUpdate
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
|
convertDateToAPI,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailreject");
|
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailreject");
|
||||||
|
|
@ -313,9 +314,8 @@ async function clickCancel() {
|
||||||
function onSubmitAttached() {
|
function onSubmitAttached() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
|
const send: string = convertDateToAPI(date.value) ?? "";
|
||||||
const activeDate =
|
const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
|
||||||
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
|
|
||||||
formData.append("Location", location.value);
|
formData.append("Location", location.value);
|
||||||
formData.append("SendDate", send);
|
formData.append("SendDate", send);
|
||||||
formData.append("ActiveDate", activeDate);
|
formData.append("ActiveDate", activeDate);
|
||||||
|
|
@ -439,7 +439,7 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push('/retirement/resign')"
|
@click="router.push('/retirement/resign')"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการยกเลิกลาออก
|
รายละเอียดการยกเลิกลาออก
|
||||||
{{
|
{{
|
||||||
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
|
convertDateToAPI,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** ตัวแปร */
|
/** ตัวแปร */
|
||||||
|
|
@ -301,9 +302,9 @@ async function clickCancel() {
|
||||||
function onSubmitAttached() {
|
function onSubmitAttached() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
|
const send: string = convertDateToAPI(date.value) ?? "";
|
||||||
const activeDate =
|
const activeDate: string = convertDateToAPI(dateLeave.value) ?? "";
|
||||||
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
|
|
||||||
formData.append("Location", location.value);
|
formData.append("Location", location.value);
|
||||||
formData.append("SendDate", send);
|
formData.append("SendDate", send);
|
||||||
formData.append("ActiveDate", activeDate);
|
formData.append("ActiveDate", activeDate);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue