This commit is contained in:
Warunee Tamkoo 2024-02-12 11:28:26 +07:00
parent 853a78f139
commit 1915538e5e

View file

@ -186,9 +186,9 @@ const calRetire = async (birth: Date) => {
dateBefore.value = birth; dateBefore.value = birth;
}) })
.catch((e: any) => { .catch((e: any) => {
messageError($q, e); messageError($q, e);
informaData.value.birthDate = null; informaData.value.birthDate = null;
informaData.value.age = ""; informaData.value.age = "";
}) })
.finally(() => { .finally(() => {
// hideLoader(); // hideLoader();
@ -244,24 +244,20 @@ const addData = async () => {
if (informaData.value.employeeClass != undefined) if (informaData.value.employeeClass != undefined)
formData.append("employeeClass", informaData.value.employeeClass); formData.append("employeeClass", informaData.value.employeeClass);
console.log("informaData===>", informaData.value); showLoader();
// showLoader(); await http
// await http .post(config.API.createProfileOfficer(), formData)
// .post(config.API.createProfileOfficer(), formData) .then((res) => {
// .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ");
// success($q, ""); })
// }) .catch((e) => {
// .catch((e) => { messageError($q, e);
// messageError($q, e); })
// }) .finally(async () => {
// .finally(async () => { modal.value = false;
// modal.value = false; await changeBirth(new Date(informaData.value.birthDate) ?? new Date());
// await changeBirth( hideLoader();
// new Date(dateToPost(new Date(informaData.value.birthDate))) ?? });
// new Date()
// );
// hideLoader();
// });
}; };
/*** get รายการข้อมูลเกี่ยวกับบุคคล (dropdown list) */ /*** get รายการข้อมูลเกี่ยวกับบุคคล (dropdown list) */