เพิ่มเเจ้งเตือนเมื่อไม่ได้เลือกประเภท

This commit is contained in:
setthawutttty 2024-01-09 14:21:17 +07:00
parent 01b70ab7a0
commit 19296e5543

View file

@ -14,7 +14,7 @@ import config from "@/app.config";
const $q = useQuasar();
const selected = ref<any>([]);
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 = [];
},
`ยืนยันการส่งไปออกคำสั่ง`,
`ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่`
);
}
}
/**