From 853a78f139b5c0aca28b4fe68ea56f42d492c4f8 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Mon, 12 Feb 2024 11:21:47 +0700 Subject: [PATCH] fix bug --- src/components/DialogAddEmployee.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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(); });