แก้ bug ระบบลา

This commit is contained in:
Warunee Tamkoo 2025-06-18 12:39:45 +07:00
parent a13bfdffb2
commit e7a1fe47e7
3 changed files with 26 additions and 16 deletions

View file

@ -114,7 +114,10 @@ async function getData() {
keyword: keyword.value,
isAct: isAct.value,
keycloakId: props.keycloakUserId,
type: props.profileType === "officer" ? props.profileType : "employee",
type:
props.profileType?.toLocaleLowerCase() === "officer"
? "officer"
: "employee",
})
.then(async (res) => {
const data = res.data.result;
@ -150,7 +153,8 @@ function onSubmit() {
.post(
config.API.addApproverByType(
props.type?.toLocaleLowerCase() as string,
props.profileType?.toLocaleLowerCase() as string,
// props.profileType?.toLocaleLowerCase() as string,
"officer",
pageId.value
),
body
@ -161,9 +165,9 @@ function onSubmit() {
props.fetchDetailLeave?.(pageId.value);
})
.catch((e) => {
hideLoader();
messageError($q, e);
})
.finally(() => {});
});
});
} else {
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 คน");
@ -192,6 +196,7 @@ watch(
}
);
</script>
<template>
<q-dialog v-model="modal" persistent>
<q-card class="col-12" style="width: 80%">