diff --git a/src/api/registry/api.registry.ts b/src/api/registry/api.registry.ts index a2c7078ca..3edee7305 100644 --- a/src/api/registry/api.registry.ts +++ b/src/api/registry/api.registry.ts @@ -39,38 +39,40 @@ export default { `${registryNew}${type}/nopaid/history/${dataId}`, // เครื่องราชฯ - profileNewInsign: `${registryNew}/insignia`, - profileNewInsignByProfileId: (profileId: string) => - `${registryNew}/insignia/${profileId}`, - profileNewInsignById: (dataId: string) => `${registryNew}/insignia/${dataId}`, - profileNewInsignHisById: (dataId: string) => - `${registryNew}/insignia/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: `${registryNew}/honor`, - profileNewHonorByProfileId: (profileId: string) => - `${registryNew}/honor/${profileId}`, - profileNewHonorById: (dataId: string) => `${registryNew}/honor/${dataId}`, - profileNewHonorHisById: (dataId: string) => - `${registryNew}/honor/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: `${registryNew}/assessments`, - profileNewAssessmentsByProfileId: (profileId: string) => - `${registryNew}/assessments/${profileId}`, - profileNewAssessmentsById: (dataId: string) => - `${registryNew}/assessments/${dataId}`, - profileNewAssessmentsHisById: (dataId: string) => - `${registryNew}/assessments/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: `${registryNew}/training`, - profileNewTrainingByProfileId: (profileId: string) => - `${registryNew}/training/${profileId}`, - profileNewTrainingByTrainingId: (trainingId: string) => - `${registryNew}/training/${trainingId}`, - profileNewTrainingHisByTrainingId: (trainingId: string) => - `${registryNew}/training/history/${trainingId}`, + 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`, @@ -91,21 +93,24 @@ export default { `${registryNew}${type}/ability/history/${abilityId}`, // ใบอนุญาตประกอบวิชาชีพ - profileNewCertificate: `${registryNew}/certificate`, - profileNewCertificateByProfileId: (profileId: string) => - `${registryNew}/certificate/${profileId}`, - profileNewCertificateByCertificateId: (certificateId: string) => - `${registryNew}/certificate/${certificateId}`, - profileNewCertificateHisByCertificateId: (certificateId: string) => - `${registryNew}/certificate/history/${certificateId}`, + 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: `${registryNew}/other`, - profileNewOtherByProfileId: (profileId: string) => - `${registryNew}/other/${profileId}`, - profileNewOtherById: (dataId: string) => `${registryNew}/other/${dataId}`, - profileNewOtherHisById: (dataId: string) => - `${registryNew}/other/history/${dataId}`, + 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`, @@ -167,4 +172,8 @@ export default { `${registryNew}${type}/changeName/${changeNameId}`, profileNewChangeNameHisByChangeNameId: (changeNameId: string, type: string) => `${registryNew}${type}/changeName/history/${changeNameId}`, + + //ข้อมูลครอบครับ + profileFamily: (empType: string, type: string) => + `${registryNew}${empType}/${type}`, }; diff --git a/src/components/CardProfile.vue b/src/components/CardProfile.vue index 0dfb67d54..2d391d2e9 100644 --- a/src/components/CardProfile.vue +++ b/src/components/CardProfile.vue @@ -59,13 +59,6 @@ function fetchProfile(id: string) { ) .then(async (res) => { profile.avatar = res.data.downloadUrl; - }) - .catch((e) => { - if (e.response.data.message === "ไม่พบไฟล์ในระบบ") { - profile.avatar = ""; - } else { - messageError($q, e); - } }); } } diff --git a/src/components/DialogAddEmployee.vue b/src/components/DialogAddEmployee.vue index f161a8a7f..84186868a 100644 --- a/src/components/DialogAddEmployee.vue +++ b/src/components/DialogAddEmployee.vue @@ -1,4 +1,3 @@ -divdivdiv