Merge branch 'oat_dev' into develop

This commit is contained in:
oat_dev 2024-03-27 11:14:24 +07:00
commit 2a80210893
2 changed files with 30 additions and 6 deletions

View file

@ -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}`,
};

View file

@ -215,7 +215,8 @@ const educationOptionFilter = ref([
{ label: "ไม่ใช่", value: false },
]);
let educationLevelOption: any = [];
const educationLevelOption = ref([]);
const educationLevelOptionFilter = ref([]);
const historyDialog = ref<boolean>(false);
const educationData = reactive<RequestItemsObject>({
@ -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) =>