ปรับ API ทะเบียนประวัติ (ใหม่)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-13 18:06:06 +07:00
parent e100ac0ec3
commit f91f3d9b40
8 changed files with 645 additions and 598 deletions

View file

@ -1,12 +1,13 @@
import env from "../index";
const registryNew = `${env.API_URI}/org/profile/`;
const registryNew = `${env.API_URI}/org/profile`;
const metadata = `${env.API_URI}/org/metadata/`;
const salaryNew = `${env.API_URI}/org/profile/salary`;
export default {
registryNew,
registryNewByProfileId: (profileId: string) => `${registryNew}${profileId}`,
registryNew: (type: string) => `${registryNew}${type}`,
registryNewByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/${profileId}`,
// metadata
profileNewMetaMain: `${metadata}main/person`,
@ -15,132 +16,132 @@ export default {
profileNewSubDistrictByDId: (id: string) => `${metadata}district/${id}`,
// ประวัติส่วนตัว
profileNewProfileByProfileId: (profileId: string) =>
`${registryNew}${profileId}`,
profileNewProfileById: (dataId: string) => `${registryNew}${dataId}`,
profileNewProfileHisById: (dataId: string) =>
`${registryNew}history/${dataId}`,
profileNewProfileById: (dataId: string, type: string) =>
`${registryNew}${type}/${dataId}`,
profileNewProfileHisById: (dataId: string, type: string) =>
`${registryNew}${type}/history/${dataId}`,
// ข้อมูลที่อยู่
profileNewAddressByProfileId: (profileId: string) =>
`${registryNew}address/${profileId}`,
profileNewAddressById: (dataId: string) => `${registryNew}address/${dataId}`,
profileNewAddressHisById: (dataId: string) =>
`${registryNew}address/history/${dataId}`,
profileNewAddressByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/address/${profileId}`,
profileNewAddressById: (dataId: string, type: string) =>
`${registryNew}${type}/address/${dataId}`,
profileNewAddressHisById: (dataId: string, type: string) =>
`${registryNew}${type}/address/history/${dataId}`,
// บันทึกวันที่ไม่ได้รับเงินเดือนฯ
profileNewNoPaid: `${registryNew}nopaid`,
profileNewNoPaid: `${registryNew}/nopaid`,
profileNewNoPaidByProfileId: (profileId: string) =>
`${registryNew}nopaid/${profileId}`,
profileNewNoPaidById: (dataId: string) => `${registryNew}nopaid/${dataId}`,
`${registryNew}/nopaid/${profileId}`,
profileNewNoPaidById: (dataId: string) => `${registryNew}/nopaid/${dataId}`,
profileNewNoPaidHisById: (dataId: string) =>
`${registryNew}nopaid/history/${dataId}`,
`${registryNew}/nopaid/history/${dataId}`,
// เครื่องราชฯ
profileNewInsign: `${registryNew}insignia`,
profileNewInsign: `${registryNew}/insignia`,
profileNewInsignByProfileId: (profileId: string) =>
`${registryNew}insignia/${profileId}`,
profileNewInsignById: (dataId: string) => `${registryNew}insignia/${dataId}`,
`${registryNew}/insignia/${profileId}`,
profileNewInsignById: (dataId: string) => `${registryNew}/insignia/${dataId}`,
profileNewInsignHisById: (dataId: string) =>
`${registryNew}insignia/history/${dataId}`,
`${registryNew}/insignia/history/${dataId}`,
// ประกาศเกียรติคุณ
profileNewHonor: `${registryNew}honor`,
profileNewHonor: `${registryNew}/honor`,
profileNewHonorByProfileId: (profileId: string) =>
`${registryNew}honor/${profileId}`,
profileNewHonorById: (dataId: string) => `${registryNew}honor/${dataId}`,
`${registryNew}/honor/${profileId}`,
profileNewHonorById: (dataId: string) => `${registryNew}/honor/${dataId}`,
profileNewHonorHisById: (dataId: string) =>
`${registryNew}honor/history/${dataId}`,
`${registryNew}/honor/history/${dataId}`,
// ผลการประเมินการปฏิบัติราชการ
profileNewAssessments: `${registryNew}assessments`,
profileNewAssessments: `${registryNew}/assessments`,
profileNewAssessmentsByProfileId: (profileId: string) =>
`${registryNew}assessments/${profileId}`,
`${registryNew}/assessments/${profileId}`,
profileNewAssessmentsById: (dataId: string) =>
`${registryNew}assessments/${dataId}`,
`${registryNew}/assessments/${dataId}`,
profileNewAssessmentsHisById: (dataId: string) =>
`${registryNew}assessments/history/${dataId}`,
`${registryNew}/assessments/history/${dataId}`,
// การฝึกอบรม
profileNewTraining: `${registryNew}training`,
profileNewTraining: `${registryNew}/training`,
profileNewTrainingByProfileId: (profileId: string) =>
`${registryNew}training/${profileId}`,
`${registryNew}/training/${profileId}`,
profileNewTrainingByTrainingId: (trainingId: string) =>
`${registryNew}training/${trainingId}`,
`${registryNew}/training/${trainingId}`,
profileNewTrainingHisByTrainingId: (trainingId: string) =>
`${registryNew}training/history/${trainingId}`,
`${registryNew}/training/history/${trainingId}`,
// ประวัติการศึกษา
profileNewEducation: `${registryNew}educations`,
profileNewEducation: `${registryNew}/educations`,
profileNewEducationByProfileId: (profileId: string) =>
`${registryNew}educations/${profileId}`,
`${registryNew}/educations/${profileId}`,
profileNewEducationByEducationId: (educationId: string) =>
`${registryNew}educations/${educationId}`,
`${registryNew}/educations/${educationId}`,
profileNewEducationHisByEducationId: (educationsId: string) =>
`${registryNew}educations/history/${educationsId}`,
`${registryNew}/educations/history/${educationsId}`,
// ความสามารถพิเศษ
profileNewAbility: `${registryNew}ability`,
profileNewAbility: `${registryNew}/ability`,
profileNewAbilityByProfileId: (profileId: string) =>
`${registryNew}ability/${profileId}`,
`${registryNew}/ability/${profileId}`,
profileNewAbilityByAbilityId: (abilityId: string) =>
`${registryNew}ability/${abilityId}`,
`${registryNew}/ability/${abilityId}`,
profileNewAbilityHisByAbilityId: (abilityId: string) =>
`${registryNew}ability/history/${abilityId}`,
`${registryNew}/ability/history/${abilityId}`,
// ใบอนุญาตประกอบวิชาชีพ
profileNewCertificate: `${registryNew}certificate`,
profileNewCertificate: `${registryNew}/certificate`,
profileNewCertificateByProfileId: (profileId: string) =>
`${registryNew}certificate/${profileId}`,
`${registryNew}/certificate/${profileId}`,
profileNewCertificateByCertificateId: (certificateId: string) =>
`${registryNew}certificate/${certificateId}`,
`${registryNew}/certificate/${certificateId}`,
profileNewCertificateHisByCertificateId: (certificateId: string) =>
`${registryNew}certificate/history/${certificateId}`,
`${registryNew}/certificate/history/${certificateId}`,
// ข้อมูลอื่นๆ
profileNewOther: `${registryNew}other`,
profileNewOther: `${registryNew}/other`,
profileNewOtherByProfileId: (profileId: string) =>
`${registryNew}other/${profileId}`,
profileNewOtherById: (dataId: string) => `${registryNew}other/${dataId}`,
`${registryNew}/other/${profileId}`,
profileNewOtherById: (dataId: string) => `${registryNew}/other/${dataId}`,
profileNewOtherHisById: (dataId: string) =>
`${registryNew}other/history/${dataId}`,
`${registryNew}/other/history/${dataId}`,
// ข้อมูลครอบครัว
profileNewFamily: `${registryNew}family`,
profileNewFamily: `${registryNew}/family`,
profileNewFamilyByProfileId: (profileId: string) =>
`${registryNew}family/${profileId}`,
`${registryNew}/family/${profileId}`,
profileNewFamilyByFamilyId: (familyId: string) =>
`${registryNew}family/${familyId}`,
`${registryNew}/family/${familyId}`,
profileNewFamilyHisByFamilyId: (familyId: string) =>
`${registryNew}family/history/${familyId}`,
`${registryNew}/family/history/${familyId}`,
// วินัย
profileNewDiscipline: `${registryNew}discipline`,
profileNewDiscipline: `${registryNew}/discipline`,
profileNewDisciplineByProfileId: (profileId: string) =>
`${registryNew}discipline/${profileId}`,
`${registryNew}/discipline/${profileId}`,
profileNewDisciplineByDisciplineId: (disciplineId: string) =>
`${registryNew}discipline/${disciplineId}`,
`${registryNew}/discipline/${disciplineId}`,
profileNewDisciplineHisByDisciplineId: (disciplineId: string) =>
`${registryNew}discipline/history/${disciplineId}`,
`${registryNew}/discipline/history/${disciplineId}`,
// ปฏิบัติราชการพิเศษ
profileNewDuty: `${registryNew}duty`,
profileNewDuty: `${registryNew}/duty`,
profileNewDutyByProfileId: (profileId: string) =>
`${registryNew}duty/${profileId}`,
profileNewDutyByDutyId: (dutyId: string) => `${registryNew}duty/${dutyId}`,
`${registryNew}/duty/${profileId}`,
profileNewDutyByDutyId: (dutyId: string) => `${registryNew}/duty/${dutyId}`,
profileNewDutyHisByDutyId: (dutyId: string) =>
`${registryNew}duty/history/${dutyId}`,
`${registryNew}/duty/history/${dutyId}`,
//ข้อมูลราชการ
profileNewGovernment: () => `${registryNew}government`,
profileNewGovernmentById: (id: string) => `${registryNew}government/${id}`,
profileNewGovernment: () => `${registryNew}/government`,
profileNewGovernmentById: (id: string) => `${registryNew}/government/${id}`,
profileNewGovernmentHistory: (id: string) =>
`${registryNew}government/history/${id}`,
`${registryNew}/government/history/${id}`,
//การลา
profileNewLeave: () => `${registryNew}leave`,
profileNewLeaveById: (id: string) => `${registryNew}leave/${id}`,
profileNewLeaveHistory: (id: string) => `${registryNew}leave/history/${id}`,
profileNewLeave: () => `${registryNew}/leave`,
profileNewLeaveById: (id: string) => `${registryNew}/leave/${id}`,
profileNewLeaveHistory: (id: string) => `${registryNew}/leave/history/${id}`,
profileCheckDate: () => `${env.API_URI}/leave/user/check`,
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
@ -153,11 +154,11 @@ export default {
`${salaryNew}/swap/${type}/${id}`,
// ประวัติการเปลี่ยนชื่อ-นามสกุล
profileNewChangeName: `${registryNew}changeName`,
profileNewChangeNameByProfileId: (profileId: string) =>
`${registryNew}changeName/${profileId}`,
profileNewChangeNameByChangeNameId: (changeNameId: string) =>
`${registryNew}changeName/${changeNameId}`,
profileNewChangeNameHisByChangeNameId: (changeNameId: string) =>
`${registryNew}changeName/history/${changeNameId}`,
profileNewChangeName: (type: string) => `${registryNew}${type}/changeName`,
profileNewChangeNameByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/changeName/${profileId}`,
profileNewChangeNameByChangeNameId: (changeNameId: string, type: string) =>
`${registryNew}${type}/changeName/${changeNameId}`,
profileNewChangeNameHisByChangeNameId: (changeNameId: string, type: string) =>
`${registryNew}${type}/changeName/history/${changeNameId}`,
};