แก้ commader

This commit is contained in:
setthawutttty 2025-05-07 22:19:29 +07:00
parent b8f2fbcc36
commit dc14fde9ce

View file

@ -371,15 +371,16 @@ function popUp(action: "pass" | "passNot", type: string) {
}
//pop up
function onSubmit(type: string) {
function onSubmit() {
console.log(roleUser.value);
if (actionPass.value) {
if (type !== "approver") {
if (roleUser.value == "commander") {
confirmpopUp("/comander");
} else {
confirmpopUp("");
}
} else {
if (type !== "approver") {
if (roleUser.value == "commander") {
rejectpopUp("/comander");
} else {
rejectpopUp("");
@ -1752,7 +1753,7 @@ onMounted(async () => {
<q-dialog v-model="modal" persistent>
<q-card style="width: 800px">
<q-form greedy @submit.prevent @validation-success="onSubmit('approver')">
<q-form greedy @submit.prevent @validation-success="onSubmit()">
<DialogHeader
:tittle="`${actionPass ? 'อนุญาตการลาออก' : 'ยับยั้งการลาออก'}`"
:close="closeModal"