import env from "../index"; const organization = `${env.API_URI}/org`; const orgPos = `${env.API_URI}/org/pos`; const orgProfile = `${env.API_URI}/org/profile`; const orgEmployeePos = `${env.API_URI}/org/employee/pos`; const orgEmployeePosTemp = `${env.API_URI}/org/employee-temp/pos`; const orgAct = `${env.API_URI}/org/act`; const orgPosAct = `${env.API_URI}/org/pos/act`; 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}`, orgByIdSystem: (id: string, sys: string) => `${organization}/system/${id}/${sys}`, orgByIdSystemRoot: (id: string, sys: string) => `${organization}/system-root/${id}/${sys}`, 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`, orgChart: (id: string) => `${organization}/org-chart/${id}`, orgIsLock: `${organization}/lock`, /** position*/ orgPosPosition: `${orgPos}/position`, orgPosPositionById: (id: string) => `${orgPos}/position/${id}`, orgPosPositionExecutive: () => `${orgPos}/position/executive`, orgPosExecutive: `${orgPos}/executive`, orgPosType: `${orgPos}/type`, orgPosTypeSearch: `${orgPos}/position/search`, orgCommandCode: `${organization}/metadata/commandCode`, 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`, 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}`, orgPosHistoryUpdateEmp: (id: string) => `${orgEmployeePos}/history-update/${id}`, orgSalaryPosition: `${orgPos}/position?keyword=&type=ALL`, /**ครองตำแหน่ง */ orgSearchProfile: `${orgProfile}/search`, orgSearchCurrentProfile: `${orgProfile}/search/current/person`, 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}`, // ค้นหาคนตามเงื่อนไข orgSearchPersonal: () => `${organization}/profile/search-personal`, orgSearchPersonalByType: (type: string) => `${organization}/profile${type}/search-personal`, orgSearchPersonalByTypeNoKeycloak: (type: string) => `${organization}/profile${type}/search-personal-no-keycloak`, /** บรรจุแต่งตั้ง*/ orgPosPlacement: `${orgPos}/placement/search`, orgPosPlacemenTemp: `${orgPos}/placementemp/search`, orgPosFind: `${organization}/find/node`, orgProfileProbation: `${organization}/profile/probation`, 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`, orgSearchProfileEmp: `${orgProfile}-employee/search`, /** ข้อมูลตำแหน่งลูกจ้างชั่วคราว*/ 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`, orgSearchProfileEmpTemp: `${orgProfile}-temp/search`, orgProfileById: (id: string, type: string) => `${orgProfile}${type}/admin/${id}`, orgDeceasedProfile: `${orgPos}/profile/search`, orgCheckAvatar: (id: string) => `${orgProfile}/avatar/profileId-admin/${id}`, orgCheckAvatarAdmin: (id: string) => `${orgProfile}/avatar/profileid-admin/${id}`, 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/`, requestEditByType: (type: string) => `${orgProfile}${type}/edit/`, /** ข้อมูลการพัฒนารายบุคคล IDP*/ requestDevelopmentEdit: `${orgProfile}/development-request/`, requestDevelopmentEditByType: (type: string) => `${orgProfile}${type}/development-request/`, /** รายการเมนู*/ orgPermissions: `${organization}/permission/menu`, orgPermissionsSys: `${organization}/permission`, checkIsOfficer: (id: string) => `${organization}/check/child1/${id}`, checkIsDeputys: (id: string) => `${organization}/check/root/${id}`, orgPosReport: `${orgPos}/report/draft`, orgPosReportAct: `${orgPos}/act/report/draft`, /** workflow*/ workflow: `${workflow}/`, workflowKeycloakSystem: (type: string) => `${workflow}/keycloak/isofficer/${type}`, positionCondition: `${orgPos}/master/position-condition`, positionConditionEmp: `${organization}/employee/pos/master/position-condition`, keycloakLogSSO: `${organization}/keycloak/log/sso`, reportOrgByType: (type: string) => `${reportOrg}/registry-${type}`, //EditPage salaryTemp: `${orgProfile}/salaryTemp`, profilePermission: (rootId: string) => `${orgProfile}/keycloak/permissionProfile/${rootId}`, profileidPosition: (type: string) => `${orgProfile}${type}/profileid/position`, uploadProfile: (type: string, id: string) => `${organization}/upload/${type}-profileSalaryTemp/${id}`, workflowCommanderOperate: `${workflow}/commander/operate`, workflowCommanderSign: `${workflow}/commander/sign`, orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`, orgIssues: `${organization}/issues`, // active รักษาการในตำแหน่งตามหน่วยงาน activeActPosition: (id: string) => `${orgPosAct}/${id}`, //เผยแพร่จากร่างเป็นปัจจุบัน moveDraftToCurrent: (rootDndId: string) => `${organization}/move-draft-to-current/${rootDndId}`, };