เพิ้ม validate การเลือกตำแหน่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-06 17:07:22 +07:00
parent fdda661a3f
commit 9e27068e1e

View file

@ -46,6 +46,7 @@ const {
messageError,
success,
dialogRemove,
dialogMessageNotify,
} = mixin;
const selected = ref<any>([]);
const search = ref<string>("");
@ -309,7 +310,11 @@ function validateForm() {
}
}
if (hasError.every((result) => result === true)) {
onSubmit();
if (rows.value.length !== 0) {
onSubmit();
} else {
dialogMessageNotify($q, "กรุณาเลือกตำแหน่งอย่างน้อย 1 ตำแหน่ง");
}
} else {
}
}
@ -428,8 +433,6 @@ function onSubmitSelectEdit() {
);
}
/** input ค้นหา */
const searchRef = ref<any>(null);
async function searchInput() {
@ -724,7 +727,6 @@ async function clearFormPositionSelect() {
:options="optionFilter"
emit-value
dense
map-options
outlined
option-label="name"