diff --git a/src/api/registry/api.registry.ts b/src/api/registry/api.registry.ts index 215bffd4e..cb5fc4a92 100644 --- a/src/api/registry/api.registry.ts +++ b/src/api/registry/api.registry.ts @@ -142,4 +142,13 @@ profileNewLeaveType:()=>`${env.API_URI}/leave/type`, profileSalaryNew: `${env.API_URI}/org/profileSalary`, profileSalaryNewById: (id: string) => `${env.API_URI}/org/profileSalary/${id}`, + + // ประวัติการเปลี่ยนชื่อ-นามสกุล +profileNewChangeName: `${registryNew}changeName`, +profileNewChangeNameByProfileId: (profileId: string) => + `${registryNew}changeName/${profileId}`, +profileNewChangeNameByChangeNameId: (changeNameId: string) => + `${registryNew}changeName/${changeNameId}`, +profileNewChangeNameHisByChangeNameId: (changeNameId: string) => + `${registryNew}changeName/history/${changeNameId}`, }; diff --git a/src/modules/04_registryNew/components/detail/PersonalInformation/05_Education.vue b/src/modules/04_registryNew/components/detail/PersonalInformation/05_Education.vue index 63f7f0120..eb9b28d92 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/05_Education.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/05_Education.vue @@ -215,7 +215,8 @@ const educationOptionFilter = ref([ { label: "ไม่ใช่", value: false }, ]); -let educationLevelOption: any = []; +const educationLevelOption = ref([]); +const educationLevelOptionFilter = ref([]); const historyDialog = ref(false); const educationData = reactive({ @@ -300,13 +301,20 @@ async function onSubmit() { function filterSelector(val: string, update: Function, refData: string) { switch (refData) { - case "options": + case "educationOption": update(() => { educationOption.value = educationOptionFilter.value.filter( (v: any) => v.label.indexOf(val) > -1 ); }); break; + case "educationLevelOption": + update(() => { + educationLevelOption.value = educationLevelOptionFilter.value.filter( + (v: any) => v.label.indexOf(val) > -1 + ); + }); + break; default: break; } @@ -386,8 +394,13 @@ async function fetchEducationLevel() { .get(config.API.orgEducationLevel) .then(async (res) => { res.data.result.map((r: any) => { - educationLevelOption.push(r.name); + educationLevelOption.value.push({ + value: r.id, + label: r.name, + }); }); + educationLevelOptionFilter.value = educationLevelOption.value; + console.log(educationLevelOptionFilter.value); }) .catch((err) => { messageError($q, err); @@ -755,6 +768,8 @@ onMounted(async () => { outlined dense emit-value + option-value="label" + option-label="label" map-options bg-color="white" v-model="educationData.educationLevel" @@ -762,7 +777,7 @@ onMounted(async () => { input-debounce="0" use-input @filter="(inputValue:string, - doneFn:Function) => filterSelector(inputValue, doneFn,'options' + doneFn:Function) => filterSelector(inputValue, doneFn,'educationLevelOption' ) " :rules="[(val) => !!val || `${'กรุณาเลือกระดับการศึกษา'}`]" label="ระดับการศึกษา" @@ -1030,12 +1045,12 @@ onMounted(async () => { bg-color="white" v-model="educationData.isEducation" :options="educationOption" - option-value="value" + option-value="label" option-label="label" input-debounce="0" use-input @filter="(inputValue:string, - doneFn:Function) => filterSelector(inputValue, doneFn,'options' + doneFn:Function) => filterSelector(inputValue, doneFn,'educationOption' ) " :rules="[ (val) =>