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

138 lines
5.5 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`;
const orgAct = `${env.API_URI}/org/act`;
const orgPosAct = `${env.API_URI}/org/pos/act`;
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}`,
/** 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`,
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}`,
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`,
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`,
/** บรรจุแต่งตั้ง*/
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}`,
/** ข้อมูลตำแหน่งลูกจ้างประจำ*/
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`,
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,
/**
*
*/
requestEdit: `${orgProfile}/edit/`,
2024-07-24 16:40:43 +07:00
2024-10-01 10:43:52 +07:00
/**
* IDP
*/
requestDevelopmentEdit: `${orgProfile}/development-request/`,
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}`,
};