ปรับแก้ วินัย อีกนิด

This commit is contained in:
setthawutttty 2023-12-27 16:00:35 +07:00
parent 264c53f872
commit fc55ffc928
2 changed files with 117 additions and 111 deletions

View file

@ -72,7 +72,7 @@ const saveOrder = () => {
async function Ordersave(){
const persons = selected.value.map((r) => r.id);
if (props.title == "ส่งไปออกคำสั่งลงโทษทางวินัย") {
// if (props.title == "") {
const body = {
persons,
};
@ -90,25 +90,25 @@ async function Ordersave(){
props.getData?.();
hideLoader();
});
} else if (props.title == "ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ") {
const body = {
persons,
};
showLoader();
await http
.put(config.API.discardResult(idPath.value, type.value as string), body)
.then((res: any) => {
success($q, `${props.title}สำเร็จ`);
props.closeModal?.();
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
props.getData?.();
hideLoader();
});
}
// } else if (props.title == "/") {
// const body = {
// persons,
// };
// showLoader();
// await http
// .put(config.API.discardResult(idPath.value, type.value as string), body)
// .then((res: any) => {
// success($q, `${props.title}`);
// props.closeModal?.();
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(async () => {
// props.getData?.();
// hideLoader();
// });
// }
};
const emit = defineEmits([
@ -193,6 +193,7 @@ watch(
<div class="row justify-between">
<div class="col-5">
<q-toolbar style="padding: 0">
<q-select
outlined
dense