diff --git a/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue b/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue index 31757ab8c..dc6aa74df 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue @@ -14,7 +14,7 @@ import config from "@/app.config"; const $q = useQuasar(); const selected = ref([]); const mixin = useCounterMixin(); -const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin; +const { showLoader, success, messageError, dialogConfirm, hideLoader,dialogMessageNotify } = mixin; const emit = defineEmits([ "update:filterKeyword2", "update:selected", @@ -110,17 +110,21 @@ const optionsType = ref<[]>([]); //popup ยืนยันส่งัว function saveOrder() { - dialogConfirm( - $q, - async () => { - await emit("returnPerson", selected.value, type.value); - props.closeModal?.(); - type.value = ""; - selected.value = []; - }, - `ยืนยันการส่งไปออกคำสั่ง`, - `ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่` - ); + if (type.value === "") { + dialogMessageNotify($q,'กรุณาเลือกประเภทคำสั่ง') + } else { + dialogConfirm( + $q, + async () => { + await emit("returnPerson", selected.value, type.value); + props.closeModal?.(); + type.value = ""; + selected.value = []; + }, + `ยืนยันการส่งไปออกคำสั่ง`, + `ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่` + ); + } } /**