hrms-mgt/src/api/02_organizational/api.organization.ts

196 lines
8.4 KiB
TypeScript
Raw Normal View History

import env from "../index";
2024-01-26 17:20:57 +07:00
const organization = `${env.API_URI}/org`;
const orgPos = `${env.API_URI}/org/pos`;
2024-02-08 16:59:57 +07:00
const orgProfile = `${env.API_URI}/org/profile`;
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`;
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`;
const reportOrg = `${env.API_URI}/org/report`;
export default {
keycloakPosition: () => `${organization}/profile/keycloak/position`,
/** โครงสร้างอัตรากำลัง*/
activeOrganization: `${organization}/active`,
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}`,
createOrganization: `${organization}/draft`,
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
orgSetDateTime: (id: string) => `${organization}/set/publish/${id}`,
organizationHistoryNew: `${organization}/history`,
organizationHistoryPostNew: `${organization}/history/publish`,
orgChart: (id: string) => `${organization}/org-chart/${id}`,
orgIsLock: `${organization}/lock`,
/** position*/
orgPosPosition: `${orgPos}/position`,
orgPosPositionById: (id: string) => `${orgPos}/position/${id}`,
2024-06-11 16:34:25 +07:00
orgPosPositionExecutive: () => `${orgPos}/position/executive`,
orgPosExecutive: `${orgPos}/executive`,
orgPosType: `${orgPos}/type`,
orgPosTypeSearch: `${orgPos}/position/search`,
orgCommandCode: `${organization}/metadata/commandCode`,
2024-06-11 16:34:25 +07:00
orgPosTypeId: (id: string) => `${orgPos}/type/${id}`,
orgPosLevel: `${orgPos}/level`,
orgPosMaster: `${orgPos}/master`,
orgPosMasterById: (id: string) => `${orgPos}/master/${id}`,
orgPosMasterList: `${orgPos}/master/list`,
orgPosSort: `${orgPos}/sort`,
2024-02-02 14:30:07 +07:00
orgPosMove: `${orgPos}/move`,
organizationShortName: `${organization}/sort`,
organizationPublishGet: `${organization}/get/publish`,
orgPosDNA: `${orgPos}/dna`, //สืบทอดตำแหน่ง
orgPosExecutiveById: (id: string) => `${orgPos}/executive/${id}`,
orgPosHistory: (id: string) => `${orgPos}/history/${id}`,
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`,
orgSearchCurrentProfile: `${orgProfile}/search/current/person`,
2024-02-08 18:06:14 +07:00
orgProfile: `${orgPos}/profile`,
orgDeleteProfile: (id: string) => `${orgPos}/profile/delete/${id}`,
orgSummary: `${orgPos}/summary`,
/** 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}`,
// ค้นหาคนตามเงื่อนไข
orgSearchPersonal: () => `${organization}/profile/search-personal`,
orgSearchPersonalByType: (type: string) =>
`${organization}/profile${type}/search-personal`,
/** บรรจุแต่งตั้ง*/
orgPosPlacement: `${orgPos}/placement/search`,
2024-05-17 16:37:55 +07:00
orgPosPlacemenTemp: `${orgPos}/placementemp/search`,
orgPosFind: `${organization}/find/node`,
orgProfileProbation: `${organization}/profile/probation`,
2024-06-29 21:14:56 +07:00
orgProfileRetire: `${organization}/profile/retire`,
activeOrganizationRoot: `${organization}/active/root`,
activeOrganizationRootById: (id: string) =>
`${organization}/active/root/${id}`,
orgPosPlacementAll: `${orgPos}/placement/search-all`,
/** ข้อมูลตำแหน่งลูกจ้างประจำ*/
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}`,
/** อัตรากำลังลูกจ้างประจำ*/
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`,
orgPosMasterEmp: `${orgEmployeePos}/master`,
orgPosSortEmp: `${orgEmployeePos}/sort`,
orgPosPositionEmpById: (id: string) => `${orgEmployeePos}/position/${id}`,
orgPosMoveEmp: `${orgEmployeePos}/move`,
orgProfileEmp: `${orgEmployeePos}/profile`,
2024-03-15 14:49:20 +07:00
orgSearchProfileEmp: `${orgProfile}-employee/search`,
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
changePosition: `${organization}/placement/change-position`,
changePositionById: `${organization}/placement/change-position/profile-all`,
changePositionByIdProfile: `${organization}/placement/change-position/profile`,
orgProfileReport: `${orgProfile}-employee/report`,
/** รักษาการตำแหน่ง*/
orgAct,
orgPosAct,
2025-02-20 15:21:53 +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`,
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
orgPosReport: `${orgPos}/report/draft`,
orgPosReportAct: `${orgPos}/act/report/draft`,
2025-02-20 15:21:53 +07:00
/** workflow*/
2024-10-16 18:11:38 +07:00
workflow: `${workflow}/`,
workflowKeycloakSystem: (type: string) =>
`${workflow}/keycloak/isofficer/${type}`,
positionCondition: `${orgPos}/master/position-condition`,
2024-11-13 15:30:19 +07:00
keycloakLogSSO: `${organization}/keycloak/log/sso`,
reportOrgByType: (type: string) => `${reportOrg}/registry-${type}`,
//EditPage
salaryTemp: `${orgProfile}/salaryTemp`,
2025-06-05 11:57:30 +07:00
profilePermission: (rootId: string) =>
`${orgProfile}/keycloak/permissionProfile/${rootId}`,
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`,
orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`,
};