diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index 01f20074d..7016296e1 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -185,7 +185,13 @@ defineExpose({ (false); //อ่ายได้อย่างเดียว +const workflowRef = ref(null); //ข้อมูลรายการสถานะ const statusOptionMain = ref( store.optionStatus.filter((e) => e.id !== "") @@ -248,8 +249,12 @@ onMounted(async () => {
{
{ />
-
+
บันทึก @@ -302,7 +314,11 @@ onMounted(async () => {
- +
diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 15b380d4e..529806d8d 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -46,7 +46,7 @@ const { /** ตัวแปร */ const modalPersonal = ref(false); const personId = ref(""); -const roleUser = ref(""); +// const roleUser = ref(""); const dataProfile = ref(); const id = ref(route.params.id.toString()); @@ -210,72 +210,72 @@ function popUp(action: "pass" | "passNot") { } //เงื่อนไขpop up -function conditionPopup() { - if (myFormConfirm.value !== null) { - myFormConfirm.value.validate().then(async (check) => { - if (check) { - if (actionPass.value) { - await confirmpopUp(); - } else { - await rejectpopUp(); - } - } - }); - } -} +// function conditionPopup() { +// if (myFormConfirm.value !== null) { +// myFormConfirm.value.validate().then(async (check) => { +// if (check) { +// if (actionPass.value) { +// await confirmpopUp(); +// } else { +// await rejectpopUp(); +// } +// } +// }); +// } +// } //pop up ยืนยันการอนุญาต -async function confirmpopUp() { - dialogConfirm( - $q, - async () => { - const body = { - reason: reasonReign.value, - }; - await http - .put(config.API.resignConfirm(roleUser.value, id.value), body) - .then(() => { - success($q, "การอนุญาตสำเร็จ"); - closeModal(); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - fetchData(id.value); - }); - }, - "ยืนยันการอนุญาต", - "ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?" - ); -} +// async function confirmpopUp() { +// dialogConfirm( +// $q, +// async () => { +// const body = { +// reason: reasonReign.value, +// }; +// await http +// .put(config.API.resignConfirm(roleUser.value, id.value), body) +// .then(() => { +// success($q, "การอนุญาตสำเร็จ"); +// closeModal(); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// fetchData(id.value); +// }); +// }, +// "ยืนยันการอนุญาต", +// "ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?" +// ); +// } //pop up การยับยั้งสำเร็จ -async function rejectpopUp() { - dialogConfirm( - $q, - async () => { - const body = { - reason: reasonReign.value, - date: dateBreak.value, - }; - await http - .put(config.API.resignReject(roleUser.value, id.value), body) - .then(() => { - success($q, "การยับยั้งสำเร็จ"); - closeModal(); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - fetchData(id.value); - }); - }, - "ยืนยันการยับยั้ง", - "ต้องการยืนยันการยับยั้งนี้หรือไม่ ?" - ); -} +// async function rejectpopUp() { +// dialogConfirm( +// $q, +// async () => { +// const body = { +// reason: reasonReign.value, +// date: dateBreak.value, +// }; +// await http +// .put(config.API.resignReject(roleUser.value, id.value), body) +// .then(() => { +// success($q, "การยับยั้งสำเร็จ"); +// closeModal(); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// fetchData(id.value); +// }); +// }, +// "ยืนยันการยับยั้ง", +// "ต้องการยืนยันการยับยั้งนี้หรือไม่ ?" +// ); +// } /** * กดยกเลิก @@ -511,20 +511,20 @@ onMounted(async () => { fetchData(id.value); fetchFile(); const user = await tokenParsed(); - if (user) { - const commander = await user.role.includes("commander"); - const oligarch = await user.role.includes("oligarch"); - const officer = await user.role.includes("officer"); - if (commander) { - roleUser.value = "commander"; - } else if (oligarch) { - roleUser.value = "oligarch"; - } else if (officer) { - roleUser.value = "officer"; - } else { - roleUser.value = "admin"; - } - } + // if (user) { + // const commander = await user.role.includes("commander"); + // const oligarch = await user.role.includes("oligarch"); + // const officer = await user.role.includes("officer"); + // if (commander) { + // roleUser.value = "commander"; + // } else if (oligarch) { + // roleUser.value = "oligarch"; + // } else if (officer) { + // roleUser.value = "officer"; + // } else { + // roleUser.value = "admin"; + // } + // } }); @@ -551,7 +551,7 @@ onMounted(async () => {
ข้อมูลการลาออก
- +
@@ -749,8 +749,8 @@ onMounted(async () => {
@@ -793,7 +793,7 @@ onMounted(async () => { v-model="isNoDebt" label="ไม่เป็นหนี้สหกรณ์" color="teal" - :disable="!conditions" + :disable="!conditions && !workflowRef?.permission.isUpdate" />
@@ -801,7 +801,7 @@ onMounted(async () => { v-model="isNoBurden" label="ไม่มีภาระผูกพันค้ำประกันทุนการศึกษา" color="teal" - :disable="!conditions" + :disable="!conditions && !workflowRef?.permission.isUpdate" />
@@ -809,15 +809,9 @@ onMounted(async () => { v-model="isDiscipline" label="ไม่มีพฤติการณ์ทางวินัย" color="teal" - :disable="!conditions" + :disable="!conditions && !workflowRef?.permission.isUpdate" />
-
@@ -833,8 +827,8 @@ onMounted(async () => { { {
-
+
{
- +