diff --git a/src/api/02_organizational/api.treelist.ts b/src/api/02_organizational/api.treelist.ts index 34291f031..46dac9e6b 100644 --- a/src/api/02_organizational/api.treelist.ts +++ b/src/api/02_organizational/api.treelist.ts @@ -25,6 +25,8 @@ export default { */ listOrganizationAgency: (organizationType: string) => `${organizationPath}type/${organizationType}`, + listOrganizationHistoryAgency: (organizationType: string) => + `${organizationPath}history/type/${organizationType}`, /**api Tree * diff --git a/src/api/recruiting/api.period-exam.ts b/src/api/recruiting/api.period-exam.ts index c4631d1fa..6e73724cd 100644 --- a/src/api/recruiting/api.period-exam.ts +++ b/src/api/recruiting/api.period-exam.ts @@ -1,85 +1,86 @@ /** * api สรรหา */ -import env from "../index" -const candidate = `${env.API_CANDIDATE_URI}/candidate/` -const periodExam = `${env.API_CANDIDATE_URI}/candidate/period-exam/` -const exam_report = `${env.API_URI}/report/exam/` +import env from "../index"; +const candidate = `${env.API_CANDIDATE_URI}/candidate/`; +const periodExam = `${env.API_CANDIDATE_URI}/candidate/period-exam/`; +const exam_report = `${env.API_URI}/report/exam/`; -const cms = `${env.API_CANDIDATE_URI}/cms/` +const cms = `${env.API_CANDIDATE_URI}/cms/`; export default { - /** - * api cms - */ - cms, - cmsDeatail: `${cms}detail`, - cmsAbout: `${cms}about`, - cmsLogo: `${cms}logo`, - cmsBanner: `${cms}banner`, - cmsAgency: `${cms}agency`, - cmsGoverment: `${cms}government`, + /** + * api cms + */ + cms, + cmsDeatail: `${cms}detail`, + cmsAbout: `${cms}about`, + cmsLogo: `${cms}logo`, + cmsBanner: `${cms}banner`, + cmsAgency: `${cms}agency`, + cmsGoverment: `${cms}government`, - /** - * api รอบการสอบ - */ - periodExam: `${periodExam}`, - periodExamType: (type: string) => `${periodExam}type/${type}`, - periodExamId: (examId: string) => `${periodExam}${examId}`, - periodExamDoc: (examId: string) => `${periodExam}doc/${examId}`, - periodExamImg: (examId: string) => `${periodExam}img/${examId}`, - periodExamStatus: (examId: string) => `${periodExam}status-payment/${examId}`, + /** + * api รอบการสอบ + */ + periodExam: `${periodExam}`, + periodExamType: (type: string) => `${periodExam}type/${type}`, + periodExamId: (examId: string) => `${periodExam}${examId}`, + periodExamDoc: (examId: string) => `${periodExam}doc/${examId}`, + periodExamImg: (examId: string) => `${periodExam}img/${examId}`, + periodExamStatus: (examId: string) => `${periodExam}status-payment/${examId}`, - countDashbordPeriodExam: (examId: string) => - `${periodExam}dashboard/${examId}`, + countDashbordPeriodExam: (examId: string) => + `${periodExam}dashboard/${examId}`, - candidateId: (candidateId: string) => `${candidate}${candidateId}`, - candidateInformation: (candidateId: string) => - `${periodExam}information/${candidateId}`, - candidateAddress: (candidateId: string) => - `${periodExam}address/${candidateId}`, - candidateFamily: (candidateId: string) => - `${periodExam}family/${candidateId}`, - candidateOccupation: (candidateId: string) => - `${periodExam}occupation/${candidateId}`, - candidateEducation: (candidateId: string) => - `${periodExam}education/${candidateId}`, - candidateAdminEducation: (candidateId: string) => - `${candidate}education/${candidateId}`, - candidateDocument: (candidateId: string) => - `${periodExam}document/${candidateId}`, - candidateCareer: (candidateId: string) => - `${periodExam}career/${candidateId}`, - candidateAdminCareer: (candidateId: string) => - `${candidate}career/${candidateId}`, - candidateProfile: (candidateId: string) => - `${candidate}profile-image/${candidateId}`, - candidateUpload: (candidateId: string) => `${candidate}upload/${candidateId}`, - candidateCheckRegister: (candidateId: string) => - `${candidate}check-register/${candidateId}`, - candidateRejectRegister: (candidateId: string) => - `${candidate}reject-register/${candidateId}`, - candidateCheckPayment: (candidateId: string) => - `${candidate}check-payment/${candidateId}`, - candidate, - candidateOfPeriodExam: (status: string, examId: string) => - `${periodExam}${status}/${examId}`, - candidateCard: (candidateId: string) => `${candidate}card/${candidateId}`, + candidateId: (candidateId: string) => `${candidate}${candidateId}`, + candidateInformation: (candidateId: string) => + `${periodExam}information/${candidateId}`, + candidateAddress: (candidateId: string) => + `${periodExam}address/${candidateId}`, + candidateFamily: (candidateId: string) => + `${periodExam}family/${candidateId}`, + candidateOccupation: (candidateId: string) => + `${periodExam}occupation/${candidateId}`, + candidateEducation: (candidateId: string) => + `${periodExam}education/${candidateId}`, + candidateAdminEducation: (candidateId: string) => + `${candidate}education/${candidateId}`, + candidateDocument: (candidateId: string) => + `${periodExam}document/${candidateId}`, + candidateCareer: (candidateId: string) => + `${periodExam}career/${candidateId}`, + candidateAdminCareer: (candidateId: string) => + `${candidate}career/${candidateId}`, + candidateProfile: (candidateId: string) => + `${candidate}profile-image/${candidateId}`, + candidateUpload: (candidateId: string) => `${candidate}upload/${candidateId}`, + candidateCheckRegister: (candidateId: string) => + `${candidate}check-register/${candidateId}`, + candidateRejectRegister: (candidateId: string) => + `${candidate}reject-register/${candidateId}`, + candidateCheckPayment: (candidateId: string) => + `${candidate}check-payment/${candidateId}`, + candidate, + candidateOfPeriodExam: (status: string, examId: string) => + `${periodExam}${status}/${examId}`, + candidateCard: (candidateId: string) => `${candidate}card/${candidateId}`, - periodExamUploadSeat: (examId: string) => - `${periodExam}upload-seat/${examId}`, - periodExamUploadPoint: (examId: string) => - `${periodExam}upload-point/${examId}`, - periodExamDownload: (examId: string) => `${periodExam}download/${examId}`, - periodExamDownloadDetail: (examId: string) => - `${periodExam}download/detail/${examId}`, - periodExamDownloadDashboard: (examId: string) => - `${periodExam}download/dashboard/${examId}`, - candidatePayment: (candidateId: string) => - `${candidate}payment-image/${candidateId}`, - periodExamPayment: (examId: string) => `${periodExam}payment/${examId}`, + periodExamUploadSeat: (examId: string) => + `${periodExam}upload-seat/${examId}`, + periodExamUploadPoint: (examId: string) => + `${periodExam}upload-point/${examId}`, + periodExamDownload: (examId: string) => `${periodExam}download/${examId}`, + periodExamDownloadDetail: (examId: string) => + `${periodExam}download/detail/${examId}`, + periodExamDownloadDashboard: (examId: string) => + `${periodExam}download/dashboard/${examId}`, + periodExamDownloadPayment: (examId: string) => + `${periodExam}download/payment/${examId}`, + candidatePayment: (candidateId: string) => + `${candidate}payment-image/${candidateId}`, + periodExamPayment: (examId: string) => `${periodExam}payment/${examId}`, - - exportExamCandidateList: (id: string) => `${exam_report}candidate-exam/${id}`, - exportExamPassExamList: (id: string) => `${exam_report}pass-exam/${id}`, -} + exportExamCandidateList: (id: string) => `${exam_report}candidate-exam/${id}`, + exportExamPassExamList: (id: string) => `${exam_report}pass-exam/${id}`, +}; diff --git a/src/api/registry/api.profile.ts b/src/api/registry/api.profile.ts index c5dff22ae..b91555296 100644 --- a/src/api/registry/api.profile.ts +++ b/src/api/registry/api.profile.ts @@ -5,7 +5,13 @@ 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`; + export default { + /** + * api สังกัด ทะเบียนประวัติเงินเดือน + */ + organizationRoot, profileUser: `${profile}user`, profileValidateId: (profileId: string) => `${profile}validate/${profileId}`, profilePaperDownloadId: (id: string) => `${profile}paper/download/${id}`, @@ -110,9 +116,11 @@ export default { profileSwapDiscipline: `${profile}swap_discipline`, - profileLeaveId: (profileId: string) => `${profile}leave/${profileId}`, + 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) => @@ -122,6 +130,13 @@ export default { 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}`, @@ -158,4 +173,11 @@ export default { 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}`, }; diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index 3d512dc89..bef7827c8 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -608,6 +608,57 @@ export const useCounterMixin = defineStore("mixin", () => { } }; + const typeRetire = (val: string) => { + switch (val) { + case "retire": + return "เกษียณอายุราชการ"; + case "resign": + return "ลาออก"; + case "transfer": + return "ให้โอน"; + case "death": + return "ถึงแก่กรรม"; + case "layoff": + return "ให้ออก"; + case "discharge": + return "ปลดออก"; + case "dismiss": + return "ไล่ออก"; + case "other": + return "อื่นๆ"; + default: + return "-"; + } + }; + + const typeChangeName = (val: string) => { + switch (val) { + case "firstName": + return "เปลี่ยนชื่อ"; + case "lastName": + return "เปลี่ยนนามสกุล"; + case "all": + return "เปลี่ยนชื่อ-นามสกุล"; + default: + return "-"; + } + }; + + const statusLeave = (val: string) => { + switch (val) { + case "waitting": + return "รออนุมัติ"; + case "reject": + return "ไม่ผ่านการอนุมัติ"; + case "approve": + return "ผ่านการอนุมัติ"; + case "cancel": + return "ยกเลิก"; + default: + return "-"; + } + }; + return { calAge, date2Thai, @@ -631,5 +682,8 @@ export const useCounterMixin = defineStore("mixin", () => { messageError, showLoader, hideLoader, + typeRetire, + typeChangeName, + statusLeave, }; });