diff --git a/src/modules/13_salary/components/SalaryLists/ProcessStep.vue b/src/modules/13_salary/components/SalaryLists/ProcessStep.vue index d4ded6251..811975d4b 100644 --- a/src/modules/13_salary/components/SalaryLists/ProcessStep.vue +++ b/src/modules/13_salary/components/SalaryLists/ProcessStep.vue @@ -12,7 +12,7 @@ const $q = useQuasar(); //ใช้ noti quasar const mixin = useCounterMixin(); const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin; -const sendStep = ref(4); +const sendStep = ref(1); const fileUpload = ref(null); const document = ref(""); /** @@ -48,10 +48,27 @@ async function uploadFile(event: any) { } function saveReccommend() { - modalRecommend.value = false; + dialogConfirm( + $q, + async () => { + sendStep.value = sendStep.value + 1; + modalRecommend.value = false; + }, + "ยืนยันการ" + titleRecommend.value, + "ต้องการยืนยันการ" + titleRecommend.value + "หรือไม่?" + ); } -function sendToDirector() {} +function sendToDirector(msg: string) { + dialogConfirm( + $q, + async () => { + sendStep.value = sendStep.value == 3 ? 6 : sendStep.value + 1; + }, + "ยืนยันการ" + msg, + "ต้องการยืนยันการ" + msg + "หรือไม่?" + ); +} const modalRecommend = ref(false); const titleRecommend = ref(""); @@ -111,7 +128,7 @@ function sendAndRecommend(title: string) { unelevated color="public" label="ส่งเอกสารให้ ผอ. ตรวจสอบ" - @click="sendToDirector()" + @click="sendToDirector('ส่งเอกสารให้ ผอ. ตรวจสอบ')" /> @@ -120,35 +137,43 @@ function sendAndRecommend(title: string) { unelevated color="public" label="ยืนยันและส่งเอกสารให้ สกจ." - @click="sendToDirector()" + @click="sendToDirector('ยืนยันและส่งเอกสารให้ สกจ.')" /> + +