hrms-mgt/src/api/registry/api.registry.ts
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 7daf29d974 fix(registry-officer):add btn delete btn edit
2026-02-04 16:29:08 +07:00

246 lines
12 KiB
TypeScript

import env from "../index";
const registryNew = `${env.API_URI}/org/profile`;
const org = `${env.API_URI}/org`;
const metadata = `${env.API_URI}/org/metadata/`;
export default {
registryNew: (type: string) => `${registryNew}${type}`,
registryNewLeave: (type: string) => `${registryNew}${type}/profileLeave`,
registryNewOtherSystem: (type: string) => `${registryNew}${type}/otherSystem`,
registryNewByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/${profileId}`,
// metadata
profileNewMetaMain: `${metadata}main/person`,
profileNewProvince: `${metadata}province`,
profileNewDistrictByPId: (id: string) => `${metadata}province/${id}`,
profileNewSubDistrictByDId: (id: string) => `${metadata}district/${id}`,
// ประวัติส่วนตัว
profileNewProfileById: (dataId: string, type: string) =>
`${registryNew}${type}/${dataId}`,
profileNewProfileHisById: (dataId: string, type: string) =>
`${registryNew}${type}/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: (type: string) => `${registryNew}${type}/nopaid`,
profileNewNoPaidByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/nopaid/${profileId}`,
profileNewNoPaidById: (dataId: string, type: string) =>
`${registryNew}${type}/nopaid/${dataId}`,
profileNewNoPaidHisById: (dataId: string, type: string) =>
`${registryNew}${type}/nopaid/history/${dataId}`,
// เครื่องราชฯ
profileNewInsign: (type: string) => `${registryNew}${type}/insignia`,
profileNewInsignByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/insignia/${profileId}`,
orgInsigniaActive: () => `${org}/insignia/insignia-type/active`,
profileNewInsignById: (dataId: string, type: string) =>
`${registryNew}${type}/insignia/${dataId}`,
profileNewInsignHisById: (dataId: string, type: string) =>
`${registryNew}${type}/insignia/admin/history/${dataId}`,
// ประกาศเกียรติคุณ
profileNewHonor: (type: string) => `${registryNew}${type}/honor`,
profileNewHonorByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/honor/${profileId}`,
profileNewHonorById: (dataId: string, type: string) =>
`${registryNew}${type}/honor/${dataId}`,
profileNewHonorHisById: (dataId: string, type: string) =>
`${registryNew}${type}/honor/admin/history/${dataId}`,
// ผลการประเมินการปฏิบัติราชการ
profileNewAssessments: (type: string) => `${registryNew}${type}/assessments`,
profileNewAssessmentsByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/assessments/${profileId}`,
profileNewAssessmentsById: (dataId: string, type: string) =>
`${registryNew}${type}/assessments/${dataId}`,
profileNewAssessmentsHisById: (dataId: string, type: string) =>
`${registryNew}${type}/assessments/admin/history/${dataId}`,
profileDevelopmentUpdateDelete: `${registryNew}/development/update-delete/`,
// การฝึกอบรม
profileNewTraining: (type: string) => `${registryNew}${type}/training`,
profileNewTrainingByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/training/${profileId}`,
profileNewTrainingByTrainingId: (trainingId: string, type: string) =>
`${registryNew}${type}/training/${trainingId}`,
profileNewTrainingHisByTrainingId: (trainingId: string, type: string) =>
`${registryNew}${type}/training/admin/history/${trainingId}`,
profileTrainingUpdate: `${registryNew}/training/update-delete/`,
// ประวัติการศึกษา
profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
profileNewEducationSort: (type: string) =>
`${registryNew}${type}/educations/sort`,
profileNewEducationByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/educations/${profileId}`,
profileNewEducationByEducationId: (educationId: string, type: string) =>
`${registryNew}${type}/educations/${educationId}`,
profileNewEducationHisByEducationId: (educationsId: string, type: string) =>
`${registryNew}${type}/educations/admin/history/${educationsId}`,
// ความสามารถพิเศษ
profileNewAbility: (type: string) => `${registryNew}${type}/ability`,
profileNewAbilityByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/ability/${profileId}`,
profileNewAbilityByAbilityId: (abilityId: string, type: string) =>
`${registryNew}${type}/ability/${abilityId}`,
profileNewAbilityHisByAbilityId: (abilityId: string, type: string) =>
`${registryNew}${type}/ability/admin/history/${abilityId}`,
// ใบอนุญาตประกอบวิชาชีพ
profileNewCertificate: (type: string) => `${registryNew}${type}/certificate`,
profileNewCertificateByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/certificate/${profileId}`,
profileNewCertificateByCertificateId: (certificateId: string, type: string) =>
`${registryNew}${type}/certificate/${certificateId}`,
profileNewCertificateHisByCertificateId: (
certificateId: string,
type: string
) => `${registryNew}${type}/certificate/admin/history/${certificateId}`,
// ข้อมูลอื่นๆ
profileNewOther: (type: string) => `${registryNew}${type}/other`,
profileNewOtherByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/other/${profileId}`,
profileNewOtherById: (dataId: string, type: string) =>
`${registryNew}${type}/other/${dataId}`,
profileNewOtherHisById: (dataId: string, type: string) =>
`${registryNew}${type}/other/admin/history/${dataId}`,
// ข้อมูลครอบครัว
profileNewFamily: (type: string) => `${registryNew}${type}/family`,
profileNewFamilyByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/family/${profileId}`,
profileNewFamilyByFamilyId: (familyId: string, type: string) =>
`${registryNew}${type}/family/${familyId}`,
profileNewFamilyHisByFamilyId: (familyId: string, type: string) =>
`${registryNew}${type}/family/history/${familyId}`,
// วินัย
profileNewDiscipline: (type: string) => `${registryNew}${type}/discipline`,
profileNewDisciplineByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/discipline/${profileId}`,
profileNewDisciplineByDisciplineId: (disciplineId: string, type: string) =>
`${registryNew}${type}/discipline/${disciplineId}`,
profileNewDisciplineHisByDisciplineId: (disciplineId: string, type: string) =>
`${registryNew}${type}/discipline/admin/history/${disciplineId}`,
disciplineListCard: (profileId: string, type: string) =>
`${registryNew}${type}/discipline/admin/${profileId}`, // noPermission
// ปฏิบัติราชการพิเศษ
profileNewDuty: (type: string) => `${registryNew}${type}/duty`,
profileNewDutyByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/duty/${profileId}`,
profileNewDutyByDutyId: (dutyId: string, type: string) =>
`${registryNew}${type}/duty/${dutyId}`,
profileNewDutyHisByDutyId: (dutyId: string, type: string) =>
`${registryNew}${type}/duty/admin/history/${dutyId}`,
//ข้อมูลราชการ
profileNewGovernment: (type: string) => `${registryNew}${type}/government`,
profileNewGovernmentById: (id: string, type: string) =>
`${registryNew}${type}/government/${id}`,
profileNewGovernmentHistory: (id: string, type: string) =>
`${registryNew}${type}/government/history/${id}`,
profileNewGovernmentCard: (id: string, type: string) =>
`${registryNew}${type}/government/admin/${id}`, // noPermission
//การลา
profileNewLeave: (type: string) => `${registryNew}${type}/leave`,
profileNewLeaveById: (id: string, type: string) =>
`${registryNew}${type}/leave/${id}`,
profileNewLeaveHistory: (id: string, type: string) =>
`${registryNew}${type}/leave/admin/history/${id}`,
profileCheckDate: () => `${env.API_URI}/leave/user/check`,
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
leaveListCard: (id: string, type: string) =>
`${registryNew}${type}/leave/admin/${id}`, //noPermission
/** ตำแหน่ง*/
profileSalaryPositionNew: (type: string) =>
`${registryNew}${type}/salary/position`,
profileListSalaryPositionNew: (id: string, type: string) =>
`${registryNew}${type}/salary/position/${id}`,
profileListSalaryPositionHistoryNew: (profileId: string, type: string) =>
`${registryNew}${type}/salary/position/admin/history/${profileId}`,
profileSalaryPositionSwapNew: (type: string, id: string, type2: string) =>
`${registryNew}${type2}/salary/position/swap/${type}/${id}`,
salaryListCardPosition: (id: string, type: string) =>
`${registryNew}${type}/salary/position/admin/${id}`, //noPermission
salaryTenurePosition: (id: string, type: string) =>
`${registryNew}${type}/salary/tenure/${id}`, //noPermission
/** ตำแหน่งเงินเดือน*/
profileSalaryNew: (type: string) => `${registryNew}${type}/salary`,
profileListSalaryNew: (id: string, type: string) =>
`${registryNew}${type}/salary/${id}`,
profileListSalaryHistoryNew: (profileId: string, type: string) =>
`${registryNew}${type}/salary/admin/history/${profileId}`,
profileSalarySwapNew: (type: string, id: string, type2: string) =>
`${registryNew}${type2}/salary/swap/${type}/${id}`,
salaryListCard: (id: string, type: string) =>
`${registryNew}${type}/salary/admin/${id}`, //noPermission
// ประวัติการเปลี่ยนชื่อ-นามสกุล
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}`,
//ข้อมูลครอบครับ
profileFamily: (empType: string, type: string) =>
`${registryNew}${empType}/family/${type}`,
profileFamilyHistory: (id: string, empType: string, type: string) =>
`${registryNew}${empType}/family/${type}/history/${id}`,
//ลูกจ้างชั่วคราว
positionEmployee: (id: string) => `${registryNew}-employee/position/${id}`,
informationEmployee: (id: string) =>
`${registryNew}-employee/information/${id}`,
informationHistoryEmployee: (id: string) =>
`${registryNew}-employee/information/history/${id}`,
employmentEmployee: (id: string) =>
`${registryNew}-employee/employment/${id}`,
employmentEmployeeId: (id: string) =>
`${registryNew}-employee/employment/id/${id}`,
employmentHistoryEmployee: (id: string) =>
`${registryNew}-employee/employment/history/${id}`,
developMentPlan: (type: string) => `${registryNew}${type}/development`,
requestInformationbyType: (type: string, id: string) =>
`${registryNew}/request-edit/${type}/${id}`,
// รักษาการในตำแหน่ง
profileActposition: (type: string, id: string) =>
`${registryNew}${type}/actposition/${id}`,
profileActpositionHistory: (id: string, type: string) =>
`${registryNew}${type}/actposition/history/${id}`,
profileActpositionUpdateDelete: `${registryNew}/actposition/update-delete/`,
//ช่วยราชการ
profileAssistance: (type: string, id: string) =>
`${registryNew}${type}/assistance/${id}`,
profileAssistanceHistory: (id: string, type: string) =>
`${registryNew}${type}/assistance/history/${id}`,
profileAssistanceReturn: `${env.API_URI}/placement/repatriation`,
};