start commit for admin system

This commit is contained in:
Warunee Tamkoo 2024-05-29 17:58:57 +07:00
commit badb676529
300 changed files with 58634 additions and 0 deletions

View file

@ -0,0 +1,219 @@
/**
* api -
*/
import env from "../index";
const profile = `${env.API_URI_PROFILE_SERVICE}/profile/`;
const report = `${env.API_REPORT_URI}/report/profile/`;
const organizationRoot = `${env.API_URI}/profile/organization/list/root`;
const registryNew = `${env.API_URI}/org/profile/`;
export default {
/**
* api
*/
organizationRoot,
profileUser: `${profile}user`,
profileValidateId: (profileId: string) => `${profile}validate/${profileId}`,
profilePaperDownloadId: (id: string) => `${profile}paper/download/${id}`,
profilePaperId: (id: string) => `${profile}paper/${id}`,
profileMultiId: (id: string) => `${profile}multi-paper/${id}`,
profileMultiOId: (id: string) => `${profile}multi-paper-other/${id}`,
profileMultiKId: (id: string) => `${profile}multi-paper-kk1/${id}`,
profileHistoryselfId: (profileId: string) =>
`${profile}/historyself${profileId}`,
profileOrganiNameId: (id: string) => `${profile}organization/name/${id}`,
profileOrganiId: (id: string) => `${profile}organization/${id}`,
profileOrganiSelectId: (id: string) => `${profile}organization/select/${id}`,
profileOrganiRootId: (id: string) => `${profile}organization/root/${id}`,
profileLeaveOrganiId: (id: string) => `${profile}leave/organization/${id}`,
profileSearchNewOcId: (id: string) => `${profile}search/new/oc/${id}`,
profileSearchNewOcIdType: (id: string, type: string) =>
`${profile}search/new/oc/${id}/${type}`,
profileSearchId: (id: string) => `${profile}search/${id}`,
profileSearchOcId: (id: string) => `${profile}search/oc/${id}`,
profileSearchNewOcLeaveId: (id: string) =>
`${profile}search/new/oc/leave/${id}`,
profileSearchNewOcLeaveIdType: (id: string, type: string) =>
`${profile}search/new/oc/leave/${id}/${type}`,
profileSearchOcLeaveId: (id: string) => `${profile}search/oc/leave/${id}`,
profileSearchNewEmOcId: (id: string) =>
`${profile}search/new-employee/oc/${id}`,
profileSearchNewEmOcLeaveId: (id: string) =>
`${profile}search/new-employee/oc/leave/${id}`,
profileSearchPersonal: () => `${profile}search-personal`,
profileEmployeeTempId: (id: string) => `${profile}employee/temp/${id}`,
profileCoupleId: (profileId: string) => `${profile}couple/${profileId}`,
profileFatherId: (profileId: string) => `${profile}father/${profileId}`,
profileMotherId: (profileId: string) => `${profile}mother/${profileId}`,
profileAdsId: (profileId: string) => `${profile}address/current/${profileId}`,
profileAdsCurAdrsId: (profileId: string) =>
`${profile}address/currentAdrs/${profileId}`,
profileAdsRegisId: (profileId: string) =>
`${profile}address/registration/${profileId}`,
profileInsignId: (profileId: string) => `${profile}insignia/${profileId}`,
profileInsignHisId: (profileId: string) =>
`${profile}insignia/history/${profileId}`,
profileInsignInsignId: (profileId: string) =>
`${profile}insignia/insigniadiocesan/${profileId}`,
profileInsignToolList: `${profile}insignia/tool/list`,
profileChildId: (profileId: string) => `${profile}children/${profileId}`,
profileAssessmentId: (profileId: string) =>
`${profile}assessment/${profileId}`,
profileAssessmentHisId: (profileId: string) =>
`${profile}assessment/history/${profileId}`,
profileHonorId: (profileId: string) => `${profile}honor/${profileId}`,
profileHonorHisId: (profileId: string) =>
`${profile}honor/history/${profileId}`,
profileCertId: (profileId: string) => `${profile}certificate/${profileId}`,
profileCertHisId: (profileId: string) =>
`${profile}certificate/history/${profileId}`,
profileAbiliId: (profileId: string) => `${profile}ability/${profileId}`,
profileAbiliHisId: (profileId: string) =>
`${profile}ability/history/${profileId}`,
profileDutyId: (profileId: string) => `${profile}duty/${profileId}`,
profileDutyHisId: (profileId: string) =>
`${profile}duty/history/${profileId}`,
profileOtherId: (profileId: string) => `${profile}other/${profileId}`,
profileOtherHisId: (profileId: string) =>
`${profile}other/history/${profileId}`,
profileNopaidId: (profileId: string) => `${profile}nopaid/${profileId}`,
profileNopaidHisId: (profileId: string) =>
`${profile}nopaid/history/${profileId}`,
profileAvaId: (profileId: string) => `${profile}avatar/${profileId}`,
profileAvaCurId: (profileId: string) =>
`${profile}avatar/current/${profileId}`,
profileEduId: (profileId: string) => `${profile}education/${profileId}`,
profileEduHisId: (profileId: string) =>
`${profile}education/history/${profileId}`,
profileSwapEducation: `${profile}swap_education`,
profileTrainId: (profileId: string) => `${profile}training/${profileId}`,
profileTrainHisId: (profileId: string) =>
`${profile}training/history/${profileId}`,
profileDisId: (profileId: string) => `${profile}discipline/${profileId}`,
profileDisHisId: (profileId: string) =>
`${profile}discipline/history/${profileId}`,
profileSwapDiscipline: `${profile}swap_discipline`,
profileLeaveId: (leaveId: string) => `${profile}leave/${leaveId}`,
profileLeaveHisId: (profileId: string) =>
`${profile}leave/history/${profileId}`,
profileLeaveTotalId: (profileId: string) =>
`${profile}leave/total/${profileId}`,
profileSalaryId: (profileId: string) => `${profile}salary/${profileId}`,
profileSalaryHisId: (profileId: string) =>
`${profile}salary/history/${profileId}`,
profileSalarySwapId: (id: string, direction: string) =>
`${profile}salary/swap/${id}/${direction}`,
profileSalaryCopyId: (profileId: string) =>
`${profile}salary-copy/${profileId}`,
// ************************************
profileSalaryEmployeeId: (profileId: string) =>
`${profile}salary/employee/${profileId}`,
profileSalaryEmployeeHisId: (profileId: string) =>
`${profile}salary/employee/history/${profileId}`,
// ************************************
profileInforId: (profileId: string) => `${profile}information/${profileId}`,
profileInforHisId: (profileId: string) =>
`${profile}information/history/${profileId}`,
profileGovId: (profileId: string) => `${profile}government/${profileId}`,
profileGovHisId: (profileId: string) =>
`${profile}government/history/${profileId}`,
profileCalGovId: (profileId: string) => `${profile}cal/gov/${profileId}`,
profileFamiId: (profileId: string) => `${profile}family/${profileId}`,
profileFamiHisId: (profileId: string) =>
`${profile}family/history/${profileId}`,
profileAdrsId: (profileId: string) => `${profile}address/${profileId}`,
profileAdrsHisId: (profileId: string) =>
`${profile}address/history/${profileId}`,
searchProfileByOcId: (OcId: string, type: string) =>
`${profile}search/new/oc/${OcId}/${type}`,
searchProfileTemp: (type: string) => `${profile}search/new/oc/${type}`,
profileAvatarId: (profileId: string) => `${profile}avatar/${profileId}`,
profileAvatarHistoryId: (profileId: string) =>
`${profile}avatar/history/${profileId}`,
profileCheckId: (profileId: string) => `${profile}check/${profileId}`,
profileOrganizRoot: `${profile}organization/root`,
profileCalRetire: `${profile}cal/retire`,
profilePositionNumber: `${profile}position-number`,
organizationName: (ocId: string) => `${profile}organization/${ocId}`,
profileDeactive: (profileId: string) => `${profile}deactive/${profileId}`,
profileReactive: (profileId: string) => `${profile}reactive/${profileId}`,
profileReportId: (profileId: string) => `${report}kk1/${profileId}`,
profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`,
profileChangeNameId: (profileId: string) =>
`${profile}changeName/${profileId}`,
profileChangeNameHisId: (profileId: string) =>
`${profile}changeName/history/${profileId}`,
profileCitizenId: (citizenId: string) => `${profile}citizenId/${citizenId}`,
profileEmployeeIn: `${profile}information/employee`,
profileHistory: (type: string) => `${profile}search/history/oc/${type}`,
//ระบบ ลูกจ้างชั่คราว
employmentId: (profileId: string) => `${profile}employment/${profileId}`,
employmentHistoryId: (employmentId: string) =>
`${profile}employment/history/${employmentId}`,
searchPersonal: () => `${profile}search-personal`,
//สร้างข้อมูลราชการ
createProfileOfficer: () => `${profile}information/officer`,
// verify
profileVerified: (profileId: string) => `${profile}verified/${profileId}`,
profileVerifiedUnlock: (profileId: string) =>
`${profile}not-verified/${profileId}`,
profileSendVerified: (profileId: string) =>
`${profile}send-verified/${profileId}`,
listVerified: () => `${profile}list-verified`,
registryNew,
registryNewId: (id: string) => `${registryNew}${id}`,
profileNewCitizenId: (citizenId: string) =>
`${registryNew}citizenId/${citizenId}`,
/**ปรับรายการเงินเดือนขึ้น-ลง*/
salarySwap: (dierction: string, id: string) =>
`${profile}salary/swap/${dierction}/${id}`,
listProfileNew:(id:string,page:number,pageSize:number)=>`${profile}search/new-page/oc/${id}/officer?page=${page}&pageSize=${pageSize}`,
orgProfileAvatar:`${registryNew}avatar`
};

View file

@ -0,0 +1,180 @@
import env from "../index";
const registryNew = `${env.API_URI}/org/profile`;
const metadata = `${env.API_URI}/org/metadata/`;
export default {
registryNew: (type: string) => `${registryNew}${type}`,
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}`,
profileNewInsignById: (dataId: string, type: string) =>
`${registryNew}${type}/insignia/${dataId}`,
profileNewInsignHisById: (dataId: string, type: string) =>
`${registryNew}${type}/insignia/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/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/history/${dataId}`,
// การฝึกอบรม
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/history/${trainingId}`,
// ประวัติการศึกษา
profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
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/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/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/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/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/history/${disciplineId}`,
// ปฏิบัติราชการพิเศษ
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/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}`,
//การลา
profileNewLeave: (type: string) => `${registryNew}${type}/leave`,
profileNewLeaveById: (id: string, type: string) =>
`${registryNew}${type}/leave/${id}`,
profileNewLeaveHistory: (id: string, type: string) =>
`${registryNew}${type}/leave/history/${id}`,
profileCheckDate: () => `${env.API_URI}/leave/user/check`,
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
/** ตำแหน่งเงินเดือน*/
profileSalaryNew: (type: string) => `${registryNew}${type}/salary`,
profileListSalaryNew: (id: string, type: string) =>
`${registryNew}${type}/salary/${id}`,
profileListSalaryHistoryNew: (profileId: string, type: string) =>
`${registryNew}${type}/salary/history/${profileId}`,
profileSalarySwapNew: (type: string, id: string, type2: string) =>
`${registryNew}${type2}/salary/swap/${type}/${id}`,
// ประวัติการเปลี่ยนชื่อ-นามสกุล
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}`,
};