2024-01-26 15:20:11 +07:00
|
|
|
import env from "../index";
|
|
|
|
|
|
2024-01-26 17:20:57 +07:00
|
|
|
const organization = `${env.API_URI}/org`;
|
2024-01-31 16:59:28 +07:00
|
|
|
const orgPos = `${env.API_URI}/org/pos`;
|
2024-02-08 16:59:57 +07:00
|
|
|
const orgProfile = `${env.API_URI}/org/profile`;
|
2024-03-14 13:25:35 +07:00
|
|
|
const orgEmployeePos = `${env.API_URI}/org/employee/pos`;
|
2025-02-20 15:21:53 +07:00
|
|
|
const orgEmployeePosTemp = `${env.API_URI}/org/employee-temp/pos`;
|
2024-06-20 14:48:49 +07:00
|
|
|
const orgAct = `${env.API_URI}/org/act`;
|
|
|
|
|
const orgPosAct = `${env.API_URI}/org/pos/act`;
|
2024-10-16 18:11:38 +07:00
|
|
|
const workflow = `${env.API_URI}/org/workflow`;
|
2024-12-04 18:00:36 +07:00
|
|
|
const reportOrg = `${env.API_URI}/org/report`;
|
2024-01-26 15:20:11 +07:00
|
|
|
|
|
|
|
|
export default {
|
2024-06-18 10:17:43 +07:00
|
|
|
keycloakPosition: () => `${organization}/profile/keycloak/position`,
|
|
|
|
|
|
2024-01-26 15:20:11 +07:00
|
|
|
/** โครงสร้างอัตรากำลัง*/
|
|
|
|
|
activeOrganization: `${organization}/active`,
|
2024-01-30 14:18:44 +07:00
|
|
|
orgByid: (id: string) => `${organization}/${id}`,
|
2024-08-20 15:47:59 +07:00
|
|
|
orgByIdSystem: (id: string, sys: string) =>
|
|
|
|
|
`${organization}/system/${id}/${sys}`,
|
2024-09-27 13:33:27 +07:00
|
|
|
orgByIdSystemRoot: (id: string, sys: string) =>
|
|
|
|
|
`${organization}/system-root/${id}/${sys}`,
|
2024-01-26 15:20:11 +07:00
|
|
|
createOrganization: `${organization}/draft`,
|
2024-01-29 13:14:13 +07:00
|
|
|
createOrgLevel: (type: string) => `${organization}/${type}`,
|
2024-01-29 14:22:25 +07:00
|
|
|
orgLevelByid: (type: string, id: string) => `${organization}/${type}/${id}`,
|
2024-01-26 15:24:49 +07:00
|
|
|
|
2024-01-31 16:59:28 +07:00
|
|
|
orgSetDateTime: (id: string) => `${organization}/set/publish/${id}`,
|
2024-01-29 13:14:13 +07:00
|
|
|
organizationHistoryNew: `${organization}/history`,
|
2024-01-31 17:27:12 +07:00
|
|
|
organizationHistoryPostNew: `${organization}/history/publish`,
|
2024-08-20 10:37:03 +07:00
|
|
|
orgChart: (id: string) => `${organization}/org-chart/${id}`,
|
2024-11-13 17:24:13 +07:00
|
|
|
orgIsLock: `${organization}/lock`,
|
2024-01-31 16:59:28 +07:00
|
|
|
|
|
|
|
|
/** position*/
|
|
|
|
|
orgPosPosition: `${orgPos}/position`,
|
|
|
|
|
orgPosPositionById: (id: string) => `${orgPos}/position/${id}`,
|
2024-06-11 16:34:25 +07:00
|
|
|
orgPosPositionExecutive: () => `${orgPos}/position/executive`,
|
2024-01-31 16:59:28 +07:00
|
|
|
orgPosExecutive: `${orgPos}/executive`,
|
|
|
|
|
orgPosType: `${orgPos}/type`,
|
2025-01-07 10:38:24 +07:00
|
|
|
orgPosTypeSearch: `${orgPos}/position/search`,
|
2025-03-10 15:49:44 +07:00
|
|
|
orgCommandCode: `${organization}/metadata/commandCode`,
|
2025-01-07 10:38:24 +07:00
|
|
|
|
2024-06-11 16:34:25 +07:00
|
|
|
orgPosTypeId: (id: string) => `${orgPos}/type/${id}`,
|
2024-01-31 16:59:28 +07:00
|
|
|
orgPosLevel: `${orgPos}/level`,
|
|
|
|
|
orgPosMaster: `${orgPos}/master`,
|
2024-02-01 16:01:35 +07:00
|
|
|
orgPosMasterById: (id: string) => `${orgPos}/master/${id}`,
|
2024-02-01 13:45:08 +07:00
|
|
|
orgPosMasterList: `${orgPos}/master/list`,
|
|
|
|
|
orgPosSort: `${orgPos}/sort`,
|
2024-02-02 14:30:07 +07:00
|
|
|
orgPosMove: `${orgPos}/move`,
|
2024-01-31 16:10:07 +07:00
|
|
|
organizationShortName: `${organization}/sort`,
|
2024-02-01 14:46:13 +07:00
|
|
|
organizationPublishGet: `${organization}/get/publish`,
|
2024-02-12 15:29:21 +07:00
|
|
|
orgPosDNA: `${orgPos}/dna`, //สืบทอดตำแหน่ง
|
2024-02-02 14:53:06 +07:00
|
|
|
|
2024-02-02 15:41:37 +07:00
|
|
|
orgPosExecutiveById: (id: string) => `${orgPos}/executive/${id}`,
|
2024-02-02 15:38:47 +07:00
|
|
|
orgPosHistory: (id: string) => `${orgPos}/history/${id}`,
|
2025-08-29 15:09:15 +07:00
|
|
|
orgPosHistoryUpdate: (id: string) => `${orgPos}/history-update/${id}`,
|
2024-02-05 14:14:41 +07:00
|
|
|
|
2024-02-08 16:59:57 +07:00
|
|
|
orgSalaryPosition: `${orgPos}/position?keyword=&type=ALL`,
|
|
|
|
|
|
|
|
|
|
/**ครองตำแหน่ง */
|
|
|
|
|
orgSearchProfile: `${orgProfile}/search`,
|
2025-08-21 16:01:41 +07:00
|
|
|
orgSearchCurrentProfile: `${orgProfile}/search/current/person`,
|
2024-02-08 18:06:14 +07:00
|
|
|
orgProfile: `${orgPos}/profile`,
|
|
|
|
|
orgDeleteProfile: (id: string) => `${orgPos}/profile/delete/${id}`,
|
2024-02-12 09:41:52 +07:00
|
|
|
orgSummary: `${orgPos}/summary`,
|
2024-02-12 13:13:49 +07:00
|
|
|
|
|
|
|
|
/** report*/
|
|
|
|
|
orgReport: (report: string) => `${organization}/report/${report}`,
|
2024-02-15 10:44:56 +07:00
|
|
|
|
|
|
|
|
/** struct-chart*/
|
|
|
|
|
orgStructChart: (id: string, type: string) =>
|
|
|
|
|
`${organization}/struct-chart/${id}/${type}`,
|
2024-02-16 14:05:12 +07:00
|
|
|
|
|
|
|
|
// ค้นหาคนตามเงื่อนไข
|
|
|
|
|
orgSearchPersonal: () => `${organization}/profile/search-personal`,
|
2025-01-07 10:38:24 +07:00
|
|
|
orgSearchPersonalByType: (type: string) =>
|
|
|
|
|
`${organization}/profile${type}/search-personal`,
|
2024-02-20 12:07:21 +07:00
|
|
|
|
|
|
|
|
/** บรรจุแต่งตั้ง*/
|
|
|
|
|
orgPosPlacement: `${orgPos}/placement/search`,
|
2024-05-17 16:37:55 +07:00
|
|
|
orgPosPlacemenTemp: `${orgPos}/placementemp/search`,
|
2024-02-20 16:07:12 +07:00
|
|
|
orgPosFind: `${organization}/find/node`,
|
2024-02-22 16:51:16 +07:00
|
|
|
orgProfileProbation: `${organization}/profile/probation`,
|
2024-06-29 21:14:56 +07:00
|
|
|
orgProfileRetire: `${organization}/profile/retire`,
|
2024-02-28 07:58:34 +07:00
|
|
|
|
|
|
|
|
activeOrganizationRoot: `${organization}/active/root`,
|
2024-02-28 11:16:44 +07:00
|
|
|
activeOrganizationRootById: (id: string) =>
|
|
|
|
|
`${organization}/active/root/${id}`,
|
2024-10-28 12:16:50 +07:00
|
|
|
orgPosPlacementAll: `${orgPos}/placement/search-all`,
|
2024-03-14 13:25:35 +07:00
|
|
|
|
|
|
|
|
/** ข้อมูลตำแหน่งลูกจ้างประจำ*/
|
|
|
|
|
orgEmployeePos: `${orgEmployeePos}/position`,
|
|
|
|
|
orgEmployeePosById: (id: string) => `${orgEmployeePos}/position/${id}`,
|
|
|
|
|
orgEmployeeType: `${orgEmployeePos}/type`,
|
|
|
|
|
orgEmployeeTypeById: (id: string) => `${orgEmployeePos}/type/${id}`,
|
|
|
|
|
orgEmployeelevel: `${orgEmployeePos}/level`,
|
|
|
|
|
orgEmployeelevelById: (id: string) => `${orgEmployeePos}/level/${id}`,
|
2024-03-14 16:03:27 +07:00
|
|
|
|
|
|
|
|
/** อัตรากำลังลูกจ้างประจำ*/
|
|
|
|
|
orgSummaryEmp: `${orgEmployeePos}/summary`,
|
|
|
|
|
orgReportEmp: (report: string) => `${orgEmployeePos}/report/${report}`,
|
|
|
|
|
orgDeleteProfileEmp: (id: string) => `${orgEmployeePos}/profile/delete/${id}`,
|
|
|
|
|
orgPosMasterByIdEmp: (id: string) => `${orgEmployeePos}/master/${id}`,
|
|
|
|
|
orgPosMasterListEmp: `${orgEmployeePos}/master/list`,
|
2024-03-14 17:39:20 +07:00
|
|
|
orgPosMasterEmp: `${orgEmployeePos}/master`,
|
2024-03-15 09:47:11 +07:00
|
|
|
orgPosSortEmp: `${orgEmployeePos}/sort`,
|
2024-03-15 10:45:55 +07:00
|
|
|
orgPosPositionEmpById: (id: string) => `${orgEmployeePos}/position/${id}`,
|
|
|
|
|
orgPosMoveEmp: `${orgEmployeePos}/move`,
|
2024-03-15 13:54:55 +07:00
|
|
|
orgProfileEmp: `${orgEmployeePos}/profile`,
|
2024-03-15 14:49:20 +07:00
|
|
|
orgSearchProfileEmp: `${orgProfile}-employee/search`,
|
2024-03-28 11:32:03 +07:00
|
|
|
|
2025-02-20 15:21:53 +07:00
|
|
|
/** ข้อมูลตำแหน่งลูกจ้างชั่วคราว*/
|
|
|
|
|
orgEmployeePosTemp: `${orgEmployeePosTemp}/position`,
|
|
|
|
|
orgEmployeePosByIdTemp: (id: string) =>
|
|
|
|
|
`${orgEmployeePosTemp}/position/${id}`,
|
|
|
|
|
orgEmployeeTypeTemp: `${orgEmployeePosTemp}/type`,
|
|
|
|
|
orgEmployeeTypeByIdTemp: (id: string) => `${orgEmployeePos}/type/${id}`,
|
|
|
|
|
orgEmployeelevelTemp: `${orgEmployeePosTemp}/level`,
|
|
|
|
|
orgEmployeelevelByIdTemp: (id: string) => `${orgEmployeePosTemp}/level/${id}`,
|
|
|
|
|
/** อัตรากำลังลูกจ้างชัวคราว*/
|
|
|
|
|
orgSummaryEmpTemp: `${orgEmployeePosTemp}/summary`,
|
|
|
|
|
orgReportEmpTemp: (report: string) =>
|
|
|
|
|
`${orgEmployeePosTemp}/report/${report}`,
|
|
|
|
|
orgDeleteProfileEmpTemp: (id: string) =>
|
|
|
|
|
`${orgEmployeePosTemp}/profile/delete/${id}`,
|
|
|
|
|
orgPosMasterByIdEmpTemp: (id: string) => `${orgEmployeePosTemp}/master/${id}`,
|
|
|
|
|
orgPosMasterListEmpTemp: `${orgEmployeePosTemp}/master/list`,
|
|
|
|
|
orgPosMasterEmpTemp: `${orgEmployeePosTemp}/master`,
|
|
|
|
|
orgPosSortEmpTemp: `${orgEmployeePosTemp}/sort`,
|
|
|
|
|
orgPosPositionEmpByIdTemp: (id: string) =>
|
|
|
|
|
`${orgEmployeePosTemp}/position/${id}`,
|
|
|
|
|
orgPosMoveEmpTemp: `${orgEmployeePosTemp}/move`,
|
|
|
|
|
orgProfileEmpTemp: `${orgEmployeePosTemp}/profile`,
|
2025-02-20 17:02:59 +07:00
|
|
|
orgSearchProfileEmpTemp: `${orgProfile}-temp/search`,
|
2025-02-20 15:21:53 +07:00
|
|
|
|
2024-08-29 10:25:35 +07:00
|
|
|
orgProfileById: (id: string, type: string) =>
|
|
|
|
|
`${orgProfile}${type}/admin/${id}`,
|
2024-06-11 16:34:25 +07:00
|
|
|
orgDeceasedProfile: `${orgPos}/profile/search`,
|
|
|
|
|
|
2024-08-30 11:16:21 +07:00
|
|
|
orgCheckAvatar: (id: string) => `${orgProfile}/avatar/profileId-admin/${id}`,
|
|
|
|
|
orgCheckAvatarAdmin: (id: string) =>
|
|
|
|
|
`${orgProfile}/avatar/profileid-admin/${id}`,
|
2024-08-29 11:17:29 +07:00
|
|
|
orgCheckAvatarCard: (path: string) => `${organization}/${path}`, //noPernission
|
2024-06-12 14:37:02 +07:00
|
|
|
|
|
|
|
|
changePosition: `${organization}/placement/change-position`,
|
2024-06-14 16:45:14 +07:00
|
|
|
changePositionById: `${organization}/placement/change-position/profile-all`,
|
|
|
|
|
changePositionByIdProfile: `${organization}/placement/change-position/profile`,
|
|
|
|
|
|
2024-06-12 13:22:40 +07:00
|
|
|
orgProfileReport: `${orgProfile}-employee/report`,
|
2024-06-20 14:48:49 +07:00
|
|
|
|
|
|
|
|
/** รักษาการตำแหน่ง*/
|
|
|
|
|
orgAct,
|
|
|
|
|
orgPosAct,
|
2024-07-19 17:56:51 +07:00
|
|
|
|
2025-02-20 15:21:53 +07:00
|
|
|
/** รายการคำร้องขอแก้ไขทะเบียนประวัติ*/
|
2024-07-19 17:56:51 +07:00
|
|
|
requestEdit: `${orgProfile}/edit/`,
|
2024-11-13 15:30:19 +07:00
|
|
|
requestEditByType: (type: string) => `${orgProfile}${type}/edit/`,
|
2024-07-24 16:40:43 +07:00
|
|
|
|
2025-02-20 15:21:53 +07:00
|
|
|
/** ข้อมูลการพัฒนารายบุคคล IDP*/
|
2024-10-01 10:43:52 +07:00
|
|
|
requestDevelopmentEdit: `${orgProfile}/development-request/`,
|
2024-11-13 15:30:19 +07:00
|
|
|
requestDevelopmentEditByType: (type: string) =>
|
|
|
|
|
`${orgProfile}${type}/development-request/`,
|
2024-10-01 10:43:52 +07:00
|
|
|
|
2025-02-20 15:21:53 +07:00
|
|
|
/** รายการเมนู*/
|
2024-07-24 16:40:43 +07:00
|
|
|
orgPermissions: `${organization}/permission/menu`,
|
2024-07-25 15:00:26 +07:00
|
|
|
orgPermissionsSys: `${organization}/permission`,
|
2024-09-13 15:11:15 +07:00
|
|
|
|
|
|
|
|
checkIsOfficer: (id: string) => `${organization}/check/child1/${id}`,
|
2024-10-22 09:45:42 +07:00
|
|
|
checkIsDeputys: (id: string) => `${organization}/check/root/${id}`,
|
2024-10-16 18:11:38 +07:00
|
|
|
|
2024-10-28 12:16:50 +07:00
|
|
|
orgPosReport: `${orgPos}/report/draft`,
|
|
|
|
|
orgPosReportAct: `${orgPos}/act/report/draft`,
|
2024-11-01 10:17:45 +07:00
|
|
|
|
2025-02-20 15:21:53 +07:00
|
|
|
/** workflow*/
|
2024-10-16 18:11:38 +07:00
|
|
|
workflow: `${workflow}/`,
|
2024-10-28 12:16:50 +07:00
|
|
|
workflowKeycloakSystem: (type: string) =>
|
|
|
|
|
`${workflow}/keycloak/isofficer/${type}`,
|
2024-11-01 10:17:45 +07:00
|
|
|
|
|
|
|
|
positionCondition: `${orgPos}/master/position-condition`,
|
2024-11-13 15:30:19 +07:00
|
|
|
|
|
|
|
|
keycloakLogSSO: `${organization}/keycloak/log/sso`,
|
2024-12-04 18:00:36 +07:00
|
|
|
|
2025-01-07 10:38:24 +07:00
|
|
|
reportOrgByType: (type: string) => `${reportOrg}/registry-${type}`,
|
2025-03-20 18:16:01 +07:00
|
|
|
|
|
|
|
|
//EditPage
|
|
|
|
|
salaryTemp: `${orgProfile}/salaryTemp`,
|
2025-06-05 11:57:30 +07:00
|
|
|
profilePermission: (rootId: string) =>
|
|
|
|
|
`${orgProfile}/keycloak/permissionProfile/${rootId}`,
|
2025-03-20 18:16:01 +07:00
|
|
|
profileidPosition: (type: string) =>
|
|
|
|
|
`${orgProfile}${type}/profileid/position`,
|
2025-04-28 17:17:17 +07:00
|
|
|
|
2025-06-05 11:57:30 +07:00
|
|
|
workflowCommanderOperate: `${workflow}/commander/operate`,
|
|
|
|
|
workflowCommanderSign: `${workflow}/commander/sign`,
|
2025-06-20 10:31:08 +07:00
|
|
|
|
|
|
|
|
orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`,
|
2024-01-26 15:20:11 +07:00
|
|
|
};
|