diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 36877c240..90ce9acd6 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -120,6 +120,7 @@ export default { officerDetail: (id: string) => `${placement}/officer/${id}`, officerMainDelete: (id: string) => `${placement}/officer/${id}`, officerMainReport: () => `${placement}/officer/report`, + officerMainEdit: (id:string) => `${placemenHelpGov}/${id}`, // ส่งตัวกลับ placemenRepatriation, @@ -127,9 +128,15 @@ export default { repatriationDetail: (id: string) => `${placement}/repatriation/${id}`, repatriationMainDelete: (id: string) => `${placement}/repatriation/${id}`, repatriationMainReport: () => `${placement}/repatriation/report`, + repatriationMainEdit: (id:string) => `${placemenRepatriation}/${id}`, // ขอย้าย placemenRelocation, - + relocationMain: () => `${placement}/relocation`, + relocationDetail: (id:string) => `${placement}/relocation/${id}`, + relocationMainDelete: (id:string) => `${placement}/relocation/${id}`, + relocationMainReport: () => `${placement}/relocation/report`, + relocationMainPut: (id:string) => `${placement}/relocation/position/${id}`, + relocationMainEdit: (id:string) => `${placemenRelocation}/${id}`, // อื่นๆ placemenOther, otherMain: () => `${placemenOther}`, diff --git a/src/api/index.ts b/src/api/index.ts index 51f162272..bbe765fc9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -26,6 +26,7 @@ const config = ref({ "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230712_172702.json", MEET_URI: "meet.frappet.com", API_RETIREMENT_URI: "https://bma-ehr.frappet.synology.me/api/v1", + // API_PROBATION_URI: "https://ehr.joolsoft.com/v1", API_PROBATION_URI: "https://bmaehr.joolsoft.com/nodeapi/v1", // API_PROBATION_URI: "http://192.168.1.151:7776/v1", }, diff --git a/src/modules/05_placement/components/Relocation/RelocationMain.vue b/src/modules/05_placement/components/Relocation/RelocationMain.vue new file mode 100644 index 000000000..03122f023 --- /dev/null +++ b/src/modules/05_placement/components/Relocation/RelocationMain.vue @@ -0,0 +1,716 @@ + + + diff --git a/src/modules/05_placement/components/Relocation/RelocationModal.vue b/src/modules/05_placement/components/Relocation/RelocationModal.vue new file mode 100644 index 000000000..2318223cf --- /dev/null +++ b/src/modules/05_placement/components/Relocation/RelocationModal.vue @@ -0,0 +1,799 @@ + + + + + diff --git a/src/modules/05_placement/components/Relocation/RelocationbyId.vue b/src/modules/05_placement/components/Relocation/RelocationbyId.vue new file mode 100644 index 000000000..4e1825af8 --- /dev/null +++ b/src/modules/05_placement/components/Relocation/RelocationbyId.vue @@ -0,0 +1,537 @@ + + + + diff --git a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue index 2deb571b2..c678620e9 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue @@ -534,7 +534,7 @@ onMounted(async () => { :columns="columns2" :rows="rows2" :filter="filterKeyword2" - row-key="personalId" + row-key="id" class="custom-header-table" :visible-columns="visibleColumns2" selection="multiple" diff --git a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue index 2f214ec16..0d7bf023a 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue @@ -439,10 +439,11 @@ positionLevelOld: positionLevelOld.value, positionNumberOld: posNo.value, amountOld: salary.value, + }; showLoader(); await http - .put(config.API.transferId(personId.toString()), body) + .put(config.API.repatriationMainEdit(personId.toString()), body) .then((res: any) => { // const data = res.data.result; // console.log(data); diff --git a/src/modules/05_placement/components/helpgovernment/governmentDetail.vue b/src/modules/05_placement/components/helpgovernment/governmentDetail.vue index 716269933..944de9a45 100644 --- a/src/modules/05_placement/components/helpgovernment/governmentDetail.vue +++ b/src/modules/05_placement/components/helpgovernment/governmentDetail.vue @@ -442,7 +442,7 @@ const saveData = async () => { }; showLoader(); await http - .put(config.API.transferId(personId.toString()), body) + .put(config.API.officerMainEdit(personId.toString()), body) .then((res: any) => { // const data = res.data.result; // console.log(data); diff --git a/src/modules/05_placement/components/helpgovernment/mainHelp.vue b/src/modules/05_placement/components/helpgovernment/mainHelp.vue index 26c1e5a24..0b66418ce 100644 --- a/src/modules/05_placement/components/helpgovernment/mainHelp.vue +++ b/src/modules/05_placement/components/helpgovernment/mainHelp.vue @@ -534,7 +534,7 @@ onMounted(async () => { :columns="columns2" :rows="rows2" :filter="filterKeyword2" - row-key="personalId" + row-key="id" class="custom-header-table" :visible-columns="visibleColumns2" selection="multiple" diff --git a/src/modules/05_placement/interface/response/Relocation.ts b/src/modules/05_placement/interface/response/Relocation.ts new file mode 100644 index 000000000..4972a366f --- /dev/null +++ b/src/modules/05_placement/interface/response/Relocation.ts @@ -0,0 +1,38 @@ +interface relocationType { + no:number, + id: string, + citizenId: "0000000000005", + prefix: string, + firstname: string, + lastname: string, + dateOfBirth: Date, + gender: string, + status: string, + recruitDate: Date, + positionNumber: number, + positionPath: string, + positionPathSide: string, + positionType: string, + positionLine: string, + positionLevel: string, + posNoId: string, + positionId: string, + positionPathSideId: string, + positionTypeId: string, + positionLineId: string, + positionLevelId: string, + organizationPositionId: string, + organizationName: string, + organizationShortName: string, + isActive: boolean, + reason: string, + educationOld: string, + salary: number, + positionTypeOld: string, + positionLevelOld: string, + positionNumberOld: string, + organizationPositionOld: string, + createdAt: Date +} + +export type { relocationType}; \ No newline at end of file diff --git a/src/modules/05_placement/interface/response/officer.ts b/src/modules/05_placement/interface/response/officer.ts index 64d298641..4cf58b1bb 100644 --- a/src/modules/05_placement/interface/response/officer.ts +++ b/src/modules/05_placement/interface/response/officer.ts @@ -2,8 +2,8 @@ interface officerType { no:number, id: string, prefix: string, - firstName: string, - lastName: string, + firstname: string, + lastname: string, position: string, posNo: string, positionLevel: string, diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index 662b19093..7596d1944 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -33,16 +33,12 @@ const RepatriationOrder = () => import("@/modules/05_placement/components/RepatriationOrder/List.vue"); const RepatriationOrderAdd = () => import("@/modules/05_placement/components/RepatriationOrder/AddOrder.vue"); -const helpgovernment = () => - import("@/modules/05_placement/components/helpgovernment/mainHelp.vue"); -const helpgovernmentbyId = () => - import( - "@/modules/05_placement/components/helpgovernment/governmentDetail.vue" - ); -const repatriate = () => - import("@/modules/05_placement/components/Repatriate/RepatriateMain.vue"); -const repatriatebyId = () => - import("@/modules/05_placement/components/Repatriate/RepatriatebyId.vue"); +const helpgovernment = () => import("@/modules/05_placement/components/helpgovernment/mainHelp.vue") +const helpgovernmentbyId = () => import("@/modules/05_placement/components/helpgovernment/governmentDetail.vue") +const repatriate = () => import("@/modules/05_placement/components/Repatriate/RepatriateMain.vue") +const repatriatebyId = () => import("@/modules/05_placement/components/Repatriate/RepatriatebyId.vue") +const relocation = () => import("@/modules/05_placement/components/Relocation/RelocationMain.vue") +const relocationbyId = () => import("@/modules/05_placement/components/Relocation/RelocationbyId.vue") //รับโอน const receiveMain = () => import("@/modules/05_placement/components/Receive/receiveMain.vue"); @@ -304,6 +300,15 @@ export default [ Key: [6.9], Role: "placement", }, + }, { + path: "/relocation", + name: "relocation", + component: relocation, + meta: { + Auth: true, + Key: [6.9], + Role: "placement", + }, }, { path: "other/detail/:id", @@ -314,5 +319,14 @@ export default [ Key: [6.9], Role: "placement", }, + }, { + path: "/relocation/detail/:id", + name: "relocationId", + component: relocationbyId, + meta: { + Auth: true, + Key: [6.9], + Role: "placement", + }, }, ];