diff --git a/src/components/DialogAddEmployee.vue b/src/components/DialogAddEmployee.vue index b6dacb64a..d79c28f49 100644 --- a/src/components/DialogAddEmployee.vue +++ b/src/components/DialogAddEmployee.vue @@ -172,9 +172,9 @@ const calculateMaxDate = () => { // เช็คเรื่องการเกษียณ const calRetire = async (birth: Date) => { const body = { - birthDate: dateToPost(birth), + birthDate: dateToISO(birth), }; - if (dateToISO(dateBefore.value) > dateToPost(birth)) { + if (dateToISO(dateBefore.value) > dateToISO(birth)) { // showLoader(); await http .post(config.API.profileCalRetire, body) @@ -185,11 +185,11 @@ const calRetire = async (birth: Date) => { changeRetireText(data.retireDate); dateBefore.value = birth; }) - // .catch((e: any) => { - // messageError($q, e); - // informaData.value.birthDate = null; - // informaData.value.age = ""; - // }) + .catch((e: any) => { + messageError($q, e); + informaData.value.birthDate = null; + informaData.value.age = ""; + }) .finally(() => { // hideLoader(); });