diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 67d653169..01f56a673 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -256,9 +256,9 @@ const getTable = async () => { }); // ราชชื่อทั้งหมด - rows.value = roleAdmin + rows.value = roleAdmin.value ? rowsAll.value - : rowsAll.value.filter((x: any) => x.statusId != "CONTAIN"); + : rowsAll.value.filter((x: any) => x.statusId !== "CONTAIN"); // รายชื่อไปยังหน่วยงาน rowsFilter.value = rows.value.filter( (e: any) => @@ -359,7 +359,7 @@ const getClass = (val: boolean) => { "full-width cursor-pointer": !val, }; }; - +// เรียกดูรายละเอียดข้อมูล const selectData = (pid: string) => { if (roleAdmin.value === true) { personalId.value = pid; @@ -373,7 +373,7 @@ const dataInfo = reactive({ reason: "", reliefDoc: "", }); - +//แก้ไขข้อมูล const editDetail = ( props: PartialTableName, action: "disclaim" | "deferment" | "defermentInfo" | "disclaimInfo" diff --git a/src/modules/08_registryEmployee/components/AddEmployee/Main.vue b/src/modules/08_registryEmployee/components/AddEmployee/Main.vue index 7e8a5d4b7..35098cfc7 100644 --- a/src/modules/08_registryEmployee/components/AddEmployee/Main.vue +++ b/src/modules/08_registryEmployee/components/AddEmployee/Main.vue @@ -256,11 +256,6 @@ const calculateMaxDate = () => { }; // เช็คเรื่องการเกษียณ -const handleDate = async (modelData: Date) => { - informaData.value.birthDate = modelData; - await calRetire(modelData); -}; - const calRetire = async (birth: Date) => { const body = { birthDate: dateToISO(birth), @@ -272,6 +267,7 @@ const calRetire = async (birth: Date) => { .then((res: any) => { const data = res.data.result; informaData.value.age = data.age; + informaData.value.birthDate = birth; changeRetireText(data.retireDate); dateBefore.value = birth; }) @@ -390,7 +386,7 @@ const clickBack = () => {
+ :max-date="calculateMaxDate()" @update:model-value="calRetire">