fix bug
This commit is contained in:
parent
853a78f139
commit
1915538e5e
1 changed files with 17 additions and 21 deletions
|
|
@ -186,9 +186,9 @@ const calRetire = async (birth: Date) => {
|
|||
dateBefore.value = birth;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
informaData.value.birthDate = null;
|
||||
informaData.value.age = "";
|
||||
messageError($q, e);
|
||||
informaData.value.birthDate = null;
|
||||
informaData.value.age = "";
|
||||
})
|
||||
.finally(() => {
|
||||
// hideLoader();
|
||||
|
|
@ -244,24 +244,20 @@ const addData = async () => {
|
|||
if (informaData.value.employeeClass != undefined)
|
||||
formData.append("employeeClass", informaData.value.employeeClass);
|
||||
|
||||
console.log("informaData===>", informaData.value);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .post(config.API.createProfileOfficer(), formData)
|
||||
// .then((res) => {
|
||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// modal.value = false;
|
||||
// await changeBirth(
|
||||
// new Date(dateToPost(new Date(informaData.value.birthDate))) ??
|
||||
// new Date()
|
||||
// );
|
||||
// hideLoader();
|
||||
// });
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.createProfileOfficer(), formData)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
modal.value = false;
|
||||
await changeBirth(new Date(informaData.value.birthDate) ?? new Date());
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
/*** get รายการข้อมูลเกี่ยวกับบุคคล (dropdown list) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue