diff --git a/src/modules/11_discipline/components/PopupSendToNext.vue b/src/modules/11_discipline/components/PopupSendToNext.vue index 8ee5bffba..92efc0c12 100644 --- a/src/modules/11_discipline/components/PopupSendToNext.vue +++ b/src/modules/11_discipline/components/PopupSendToNext.vue @@ -72,16 +72,20 @@ const initialPagination = ref({ /** ฟังชั่นส่งคนไปออกคำสั่ง */ function onclickSend() { - if (props.title == "ส่งไปพักราชการ") { - dialogConfirm( - $q, - async () => { - emit("returnPerson", selected.value); - modal.value = false; - }, - `ยืนยันการ${props.title}`, - `ต้องการยืนยันการ${props.title}หรือไม่` - ); + if (props.title == "ส่งไปพักราชการ" || props.title == "ส่งไปสืบสวน") { + if (selected.value.length === 0) { + dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 บุคคล"); + } else { + dialogConfirm( + $q, + async () => { + emit("returnPerson", selected.value); + modal.value = false; + }, + `ยืนยันการ${props.title}`, + `ต้องการยืนยันการ${props.title}หรือไม่` + ); + } } else { if (selected.value.length === 0) { dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 บุคคล");