fix leave: case request deputy

This commit is contained in:
Warunee Tamkoo 2026-01-20 11:48:54 +07:00
parent e61f97faaf
commit dd4f7bd936
2 changed files with 10 additions and 4 deletions

View file

@ -56,6 +56,7 @@ const roleUser = ref<string>("");
const dataProfile = ref<DataProfile>();
const approveStep = ref<string>("");
const group = ref<string>("");
const deputyName = ref<string>("สำนักปลัดกรุงเทพมหานคร");
const idCheck = computed(() => {
if (
@ -679,7 +680,8 @@ async function checkOfficer() {
try {
const data = await fetchDataCheckIsoffice("SYS_RESIGN");
isOfficer.value = data.isOfficer;
isStaff.value = data.isStaff;
isStaff.value =
data.isStaff || dataDetail.value.rootOld === deputyName.value;
} catch (err) {
messageError($q, err);
}
@ -730,9 +732,9 @@ onMounted(async () => {
await Promise.all([
fetchData(id.value),
fetchKeycloakPosition(),
checkOfficer(),
fetchFile(),
]).finally(() => {
checkOfficer();
hideLoader();
});
});