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 @@