fix leave: case request deputy
This commit is contained in:
parent
e61f97faaf
commit
dd4f7bd936
2 changed files with 10 additions and 4 deletions
|
|
@ -56,6 +56,7 @@ const roleUser = ref<string>("");
|
||||||
const dataProfile = ref<DataProfile>();
|
const dataProfile = ref<DataProfile>();
|
||||||
const approveStep = ref<string>("");
|
const approveStep = ref<string>("");
|
||||||
const group = ref<string>("");
|
const group = ref<string>("");
|
||||||
|
const deputyName = ref<string>("สำนักปลัดกรุงเทพมหานคร");
|
||||||
|
|
||||||
const idCheck = computed(() => {
|
const idCheck = computed(() => {
|
||||||
if (
|
if (
|
||||||
|
|
@ -679,7 +680,8 @@ async function checkOfficer() {
|
||||||
try {
|
try {
|
||||||
const data = await fetchDataCheckIsoffice("SYS_RESIGN");
|
const data = await fetchDataCheckIsoffice("SYS_RESIGN");
|
||||||
isOfficer.value = data.isOfficer;
|
isOfficer.value = data.isOfficer;
|
||||||
isStaff.value = data.isStaff;
|
isStaff.value =
|
||||||
|
data.isStaff || dataDetail.value.rootOld === deputyName.value;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
}
|
}
|
||||||
|
|
@ -730,9 +732,9 @@ onMounted(async () => {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
fetchData(id.value),
|
fetchData(id.value),
|
||||||
fetchKeycloakPosition(),
|
fetchKeycloakPosition(),
|
||||||
checkOfficer(),
|
|
||||||
fetchFile(),
|
fetchFile(),
|
||||||
]).finally(() => {
|
]).finally(() => {
|
||||||
|
checkOfficer();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ const idCheck = computed(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const deputyName = ref<string>("สำนักปลัดกรุงเทพมหานคร");
|
||||||
const isOfficer = ref<boolean>(false);
|
const isOfficer = ref<boolean>(false);
|
||||||
const isStaff = ref<boolean>(false);
|
const isStaff = ref<boolean>(false);
|
||||||
const profileType = ref<string>("");
|
const profileType = ref<string>("");
|
||||||
|
|
@ -707,7 +708,10 @@ async function checkOfficer() {
|
||||||
try {
|
try {
|
||||||
const data = await fetchDataCheckIsoffice("SYS_RESIGN_EMP");
|
const data = await fetchDataCheckIsoffice("SYS_RESIGN_EMP");
|
||||||
isOfficer.value = data.isOfficer;
|
isOfficer.value = data.isOfficer;
|
||||||
isStaff.value = data.isStaff;
|
isStaff.value =
|
||||||
|
data.isStaff || dataDetail.value.rootOld === deputyName.value;
|
||||||
|
console.log("rootOld", dataDetail.value.rootOld);
|
||||||
|
console.log("isStaff", isStaff.value);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
}
|
}
|
||||||
|
|
@ -759,8 +763,8 @@ onMounted(async () => {
|
||||||
fetchData(id.value),
|
fetchData(id.value),
|
||||||
fetchKeycloakPosition(),
|
fetchKeycloakPosition(),
|
||||||
fetchFile(),
|
fetchFile(),
|
||||||
checkOfficer(),
|
|
||||||
]).finally(() => {
|
]).finally(() => {
|
||||||
|
checkOfficer();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue