fix:send_Date
This commit is contained in:
parent
e61f97faaf
commit
82eac261f4
2 changed files with 109 additions and 45 deletions
|
|
@ -24,6 +24,7 @@ const {
|
|||
dateToISO,
|
||||
pathRegistryEmp,
|
||||
success,
|
||||
dialogConfirm,
|
||||
} = useCounterMixin();
|
||||
|
||||
//props
|
||||
|
|
@ -64,32 +65,34 @@ const reasonOp = ref<DataOption[]>([
|
|||
},
|
||||
]);
|
||||
|
||||
async function onSubmit() {
|
||||
try {
|
||||
showLoader();
|
||||
const formData = new FormData();
|
||||
formData.append("ProfileId", profileId.value);
|
||||
formData.append("Location", form.location);
|
||||
formData.append(
|
||||
"ActiveDate",
|
||||
form.activeDate !== null ? dateToISO(form.activeDate) : ""
|
||||
);
|
||||
formData.append("Reason", form.reason);
|
||||
if (form.files) {
|
||||
formData.append("file", form.files);
|
||||
}
|
||||
if (form.reason === "OTHER") {
|
||||
formData.append("remark", form.remark);
|
||||
}
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
try {
|
||||
showLoader();
|
||||
const formData = new FormData();
|
||||
formData.append("ProfileId", profileId.value);
|
||||
formData.append("Location", form.location);
|
||||
formData.append(
|
||||
"ActiveDate",
|
||||
form.activeDate !== null ? dateToISO(form.activeDate) : ""
|
||||
);
|
||||
formData.append("Reason", form.reason);
|
||||
if (form.files) {
|
||||
formData.append("file", form.files);
|
||||
}
|
||||
if (form.reason === "OTHER") {
|
||||
formData.append("remark", form.remark);
|
||||
}
|
||||
|
||||
await http.post(config.API.resignAdmin(empType.value), formData);
|
||||
router.push({ name: isEmployee.value ? "resignEmployee" : "resign" });
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
await http.post(config.API.resignAdmin(empType.value), formData);
|
||||
router.push({ name: isEmployee.value ? "resignEmployee" : "resign" });
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** function ปิด popup*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue