hrms-mgt/src/api/02_organizational/api.organization.ts
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 e05aad6617 API structure chart
2024-02-15 10:44:56 +07:00

51 lines
1.9 KiB
TypeScript

import env from "../index";
const organization = `${env.API_URI}/org`;
const orgPos = `${env.API_URI}/org/pos`;
const orgProfile = `${env.API_URI}/org/profile`;
export default {
/** โครงสร้างอัตรากำลัง*/
activeOrganization: `${organization}/active`,
orgByid: (id: string) => `${organization}/${id}`,
createOrganization: `${organization}/draft`,
createOrgLevel: (type: string) => `${organization}/${type}`,
orgLevelByid: (type: string, id: string) => `${organization}/${type}/${id}`,
orgSetDateTime: (id: string) => `${organization}/set/publish/${id}`,
organizationHistoryNew: `${organization}/history`,
organizationHistoryPostNew: `${organization}/history/publish`,
/** position*/
orgPosPosition: `${orgPos}/position`,
orgPosPositionById: (id: string) => `${orgPos}/position/${id}`,
orgPosExecutive: `${orgPos}/executive`,
orgPosType: `${orgPos}/type`,
orgPosLevel: `${orgPos}/level`,
orgPosMaster: `${orgPos}/master`,
orgPosMasterById: (id: string) => `${orgPos}/master/${id}`,
orgPosMasterList: `${orgPos}/master/list`,
orgPosSort: `${orgPos}/sort`,
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}`,
orgSalaryPosition: `${orgPos}/position?keyword=&type=ALL`,
/**ครองตำแหน่ง */
orgSearchProfile: `${orgProfile}/search`,
orgProfile: `${orgPos}/profile`,
orgDeleteProfile: (id: string) => `${orgPos}/profile/delete/${id}`,
orgSummary: `${orgPos}/summary`,
/** report*/
orgReport: (report: string) => `${organization}/report/${report}`,
/** struct-chart*/
orgStructChart: (id: string, type: string) =>
`${organization}/struct-chart/${id}/${type}`,
};