From e0caef09088538e58bda85ba2a1f641ab6869370 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 3 Oct 2023 11:58:37 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=20filter=20=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A8=E0=B9=80=E0=B8=81=E0=B8=A9=E0=B8=B5=E0=B8=A2=E0=B8=93?= =?UTF-8?q?=E0=B8=AD=E0=B8=B2=E0=B8=A2=E0=B8=B8=E0=B8=A3=E0=B8=B2=E0=B8=8A?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AppointEmployee/Main.vue | 2 +- src/modules/05_placement/router.ts | 1 + src/modules/06_retirement/views/Main.vue | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/modules/05_placement/components/AppointEmployee/Main.vue b/src/modules/05_placement/components/AppointEmployee/Main.vue index 0b33b7116..aab94518c 100644 --- a/src/modules/05_placement/components/AppointEmployee/Main.vue +++ b/src/modules/05_placement/components/AppointEmployee/Main.vue @@ -235,7 +235,7 @@ const closeModalTree = async () => { // ไปหน้ารายละเอียด const nextPage = (id: string) => { router.push({ - path: `appoint-promote/detail/${id}`, + path: `appoint-employee/detail/${id}`, }); }; //รีเซ็ต input diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index 8f807d7b6..c9b71e6de 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -68,6 +68,7 @@ const AppointEmployeeDetail = () => import("@/modules/05_placement/components/Ap const OtherMain = () => import("@/modules/05_placement/components/Other/Main.vue") const OthertDetail = () => import("@/modules/05_placement/components/Other/Detail.vue"); + export default [ { path: "/placement", diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 7fe3ef386..46ca8e8a1 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -114,8 +114,18 @@ const fetchRetirement = async (type: string, year: any) => { }); }); yearOptions.value = [{ id: 0, year: "ทั้งหมด" }]; - yearOptions.value.push(...option); - + // yearOptions.value.push(...option); + if (option.length !== 0) { + const double_name = [...new Set(option.map((item: any) => item.id))]; + for (let i = 1; i <= double_name.length; i++) { + const type = double_name[i - 1]; + const listtype = { + id: type, + year: (Number(type) + 543).toString(), + }; + yearOptions.value.push(listtype); + } + } yearOptionsFilter.value = yearOptions.value; if (yearOptionsFilter.value.length == 1) { fiscalyear.value = yearOptionsFilter.value[0].id; @@ -159,7 +169,6 @@ const pagination = ref({ page: 1, rowsPerPage: 10, }); - const filterSelector = (val: any, update: Function) => { update(() => { yearOptions.value = yearOptionsFilter.value.filter(