hrms-user/src/api/org/api.org.ts

128 lines
6.1 KiB
TypeScript
Raw Normal View History

import env from "../index";
const metadata = `${env.API_URI}/org/metadata/`;
const org = `${env.API_URI}/org`;
const profileOrg = `${env.API_URI}/org/profile`;
2024-11-04 13:53:54 +07:00
const report = `${env.API_URI}/org/profile/`;
2024-10-16 18:10:55 +07:00
const workflow = `${env.API_URI}/org/workflow`;
export default {
profilePosition: () => `${org}/profile/keycloak/position`,
2024-02-20 16:01:49 +07:00
searchCommander: `${org}/profile/search/commander`,
2024-06-27 12:30:40 +07:00
proFileType: `${profileOrg}/type`,
dataUserInformation: `${profileOrg}/user`,
2024-11-06 16:47:02 +07:00
dataUserInformationByType: (type: string) => `${org}/profile${type}/user`,
dataUserChangeName: `${profileOrg}/changeName/user`,
2024-11-06 16:47:02 +07:00
dataUserChangeNameByType: (type: string) =>
`${org}/profile${type}/changeName/user`,
dataUserAddress: `${profileOrg}/address/user`,
2024-11-06 16:47:02 +07:00
dataUserAddressByType: (type: string) => `${org}/profile${type}/address/user`,
2024-06-27 12:30:40 +07:00
dataUserFamily: (type: string) => `${profileOrg}/family/${type}/user`,
2024-11-06 16:47:02 +07:00
dataUserFamilyByType: (emtype: string, type: string) =>
`${org}/profile${emtype}/family/${type}/user`,
dataUserEducations: `${profileOrg}/educations/user`,
2024-11-06 16:47:02 +07:00
dataUserEducationsByType: (type: string) =>
`${org}/profile${type}/educations/user`,
dataUserAbility: `${profileOrg}/ability/user`,
2024-11-06 16:47:02 +07:00
dataUserAbilityByType: (type: string) => `${org}/profile${type}/ability/user`,
dataUserGovernment: `${profileOrg}/government/user`,
2024-11-06 16:47:02 +07:00
dataUserGovernmentByType: (type: string) => `${org}/profile${type}/government/user`,
dataUserDiscipline: `${profileOrg}/discipline/user`,
2024-11-06 16:47:02 +07:00
dataUserDisciplineByType: (type: string) => `${org}/profile${type}/discipline/user`,
dataUserLeave: `${profileOrg}/leave/user`,
2024-11-06 16:47:02 +07:00
dataUserLeaveByType: (type: string) => `${org}/profile${type}/leave/user`,
dataUserDuty: `${profileOrg}/duty/user`,
2024-11-06 16:47:02 +07:00
dataUserDutyByType: (type: string) => `${org}/profile${type}/duty/user`,
dataUserSalary: `${profileOrg}/salary/user`,
2024-11-06 16:47:02 +07:00
dataUserSalaryByType: (type: string) => `${org}/profile${type}/salary/user`,
dataUserHonor: `${profileOrg}/honor/user`,
dataUserNopaid: `${profileOrg}/nopaid/user`,
2024-11-06 16:47:02 +07:00
dataUserNopaidByType: (type: string) => `${org}/profile${type}/nopaid/user`,
2024-06-27 12:30:40 +07:00
dataUserCertificate: (type: string) => `${profileOrg}/${type}/user`,
2024-11-06 16:47:02 +07:00
dataUserCertificateByType: (emType:string,type: string) => `${org}/profile${emType}/${type}/user`,
2024-06-27 12:30:40 +07:00
dataUserOther: `${profileOrg}/other/user`,
2024-11-06 16:47:02 +07:00
dataUserOtherByType: (type: string) => `${org}/profile${type}/other/user`,
profileReportId: (profileId: string) => `${report}kk1/${profileId}`,
profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`,
2024-06-27 12:30:40 +07:00
/** history */
2024-06-27 12:30:40 +07:00
dataUserInformatioHistory: (type: string) =>
`${profileOrg}${type}/history/user`,
dataUserChangeNameHistory: `${profileOrg}/changeName/history`,
2024-11-06 16:47:02 +07:00
dataUserChangeNameHistoryByType: (type: string) =>
`${org}/profile${type}/changeName/history`,
2024-06-27 12:30:40 +07:00
dataUserHistory: (type: string) =>
`${profileOrg}${type}/address/history/user`,
dataUserFamilyHistory: (type: string, emType: string, id: string) =>
`${profileOrg}${emType}/family/${type}/history/${id}`,
dataUserEducationsHistory: (id: string) =>
`${profileOrg}/educations/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserEducationsHistoryByType: (type: string, id: string) =>
`${org}/profile${type}/educations/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserAbilityHistory: (id: string) => `${profileOrg}/ability/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserAbilityHistoryByType: (type: string, id: string) =>
`${org}/profile${type}/ability/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserGovernmentHistory: (type: string) =>
`${profileOrg}${type}/government/history/user`,
dataUserDisciplineHistory: (id: string) =>
`${profileOrg}/discipline/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserDisciplineHistoryByType: (emType:string,id: string) => `${org}/profile${emType}/discipline/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserLeaveHistory: (id: string) => `${profileOrg}/leave/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserLeaveHistoryByType: (emType:string,id: string) => `${org}/profile${emType}/leave/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserDutyHistory: (id: string) => `${profileOrg}/duty/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserDutyHistoryByType: (emType:string,id: string) => `${org}/profile${emType}/duty/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserSalaryHistory: (id: string) => `${profileOrg}/salary/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserSalaryHistoryByType: (emType:string,id: string) => `${org}/profile${emType}/salary/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserSalaryNopaidHistory: (id: string) =>
`${profileOrg}/nopaid/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserSalaryNopaidHistoryByType: (emType:string,id: string) => `${org}/profile${emType}/nopaid/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserCertificateHistory: (type: string, id: string) =>
`${profileOrg}/${type}/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserCertificateHistoryByType: (emType:string,type:string,id: string) => `${org}/profile${emType}/${type}/history/${id}`,
2024-06-27 12:30:40 +07:00
dataUserHonorHistory: (type: string, emType: string, id: string) =>
`${profileOrg}${emType}/${type}/history/${id}`,
dataUserOtherHistory: (id: string) => `${profileOrg}/other/history/${id}`,
2024-11-06 16:47:02 +07:00
dataUserOtherHistoryByType: (emType:string,id: string) => `${org}/profile${emType}/other/history/${id}`,
2024-06-27 12:30:40 +07:00
orgCheckAvatar: (id: string) => `${profileOrg}/avatar/profileId/${id}`,
orgSearchCommander: () => `${profileOrg}/search/commander`,
2024-06-27 12:30:40 +07:00
orgActive: `${org}/active`,
/** struct-chart*/
orgStructChart: (id: string, type: string) =>
`${org}/struct-chart/${id}/${type}`,
/**
*
*/
profileNewProvince: `${metadata}province`,
profileNewDistrictByPId: (id: string) => `${metadata}province/${id}`,
profileNewSubDistrictByDId: (id: string) => `${metadata}district/${id}`,
/**
*
*/
requestEdit: `${profileOrg}/edit/`,
2024-11-07 12:06:13 +07:00
requestEditByType:(type:string)=> `${org}/profile${type}/edit/`,
2024-10-22 16:47:22 +07:00
requestsEdit: `${profileOrg}/edit`,
2024-11-07 12:06:13 +07:00
requestsEditByType:(type:string)=> `${org}/profile${type}/edit`,
2024-08-29 13:49:23 +07:00
developmentUser: `${profileOrg}/development/user`,
2024-11-06 16:47:02 +07:00
developmentUserByType: (type: string) => `${org}/profile${type}/development/user`,
2024-10-16 18:10:55 +07:00
2024-11-06 16:47:02 +07:00
upDateNumber: `${profileOrg}/updatePhoneNumber/user`,
updateEmail: `${profileOrg}/updateEmail/user`,
2024-10-16 18:10:55 +07:00
/**
* workflow
*/
workflow: `${workflow}/`,
};