From c7bbe78fc758192129c396d048abb37f144f1bb5 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 6 Nov 2024 17:54:50 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=88=E0=B8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/02_organizational/api.organization.ts | 2 ++ .../components/TableView.vue | 9 ++++-- .../requestEdit/01_TabInformation.vue | 31 ++++++++++++------ .../components/requestEdit/02_TabIDP.vue | 32 ++++++++++++------- .../components/requestEdit/Page01_Detail.vue | 26 +++++++++++---- .../requestEdit/Page02_DetailIDP.vue | 20 +++++++++--- src/modules/04_registryPerson/router.ts | 32 +++++++++++++++++++ 7 files changed, 118 insertions(+), 34 deletions(-) diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index 569d14630..1d8d2aab3 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -123,11 +123,13 @@ export default { * รายการคำร้องขอแก้ไขทะเบียนประวัติ */ requestEdit: `${orgProfile}/edit/`, + requestEditByType:(type:string)=> `${orgProfile}${type}/edit/`, /** * ข้อมูลการพัฒนารายบุคคล IDP */ requestDevelopmentEdit: `${orgProfile}/development-request/`, + requestDevelopmentEditByType:(type:string)=> `${orgProfile}${type}/development-request/`, /** * รายการเมนู diff --git a/src/modules/04_registryPerson/components/TableView.vue b/src/modules/04_registryPerson/components/TableView.vue index 98bea9cd3..bada8fe49 100644 --- a/src/modules/04_registryPerson/components/TableView.vue +++ b/src/modules/04_registryPerson/components/TableView.vue @@ -186,7 +186,12 @@ function onClickViewDetail(id: string) { /** function redirect ไปหน้ารายการคำร้องขอแก้ไขข้อมูล*/ function redirectToPagePetition() { - router.push(`/registry-officer/request-edit`); + + if (empType.value === "officer") { + router.push(`/registry-officer/request-edit`); + } else { + router.push(`/registry-employee/request-edit`); + } } /** @@ -205,7 +210,7 @@ watch(
(route.name as string); //Table const idCard = ref(""); const profileId = ref(""); @@ -125,14 +127,19 @@ const requestId = ref(""); //id รายการแก้ไข function fetchListRequset() { showLoader(); http - .get(config.API.requestEdit + `admin`, { - params: { - page: page.value, - pageSize: pageSize.value, - status: status.value, - keyword: keyword.value, - }, - }) + .get( + config.API.requestEditByType( + routerName.value == "registryNewRequestEditEMP" ? "-employee" : "" + ) + `admin`, + { + params: { + page: page.value, + pageSize: pageSize.value, + status: status.value, + keyword: keyword.value, + }, + } + ) .then((res) => { const data = res.data.result; maxPage.value = Math.ceil(data.total / pageSize.value); @@ -181,7 +188,11 @@ function filterOption(val: string, update: Function) { function onclickEdit(data: Request) { requestId.value = data.id; store.profileId = data.profileId; - router.push(`/registry-officer/request-edit/personal/${data.id}`); + if (routerName.value === "registryNewRequestEditEMP") { + router.push(`/registry-employee/request-edit/personal/${data.id}`); + } else { + router.push(`/registry-officer/request-edit/personal/${data.id}`); + } } /** diff --git a/src/modules/04_registryPerson/components/requestEdit/02_TabIDP.vue b/src/modules/04_registryPerson/components/requestEdit/02_TabIDP.vue index fe5331e17..f4e4f8452 100644 --- a/src/modules/04_registryPerson/components/requestEdit/02_TabIDP.vue +++ b/src/modules/04_registryPerson/components/requestEdit/02_TabIDP.vue @@ -1,6 +1,6 @@