fix bug รายการลงเวลากรณีพิเศษ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-26 11:32:48 +07:00
parent 3fc10ef14a
commit 62e45e2743

View file

@ -12,7 +12,6 @@ import { checkPermission } from "@/utils/permissions";
import type {
DataDateMonthObject,
DetailData,
Pagination,
} from "@/modules/09_leave/interface/request/specialTime";
import DialogReason from "@/components/Dialogs/PopupReason.vue";
@ -28,6 +27,7 @@ const {
showLoader,
success,
date2Thai,
dialogConfirm,
} = mixin;
const emit = defineEmits(["update:change-page"]);
const rows = ref<any[]>([]);
@ -191,23 +191,25 @@ function closeDialog() {
/** API reject */
async function clickSave(reason: string) {
showLoader();
modalUnapprove.value = false;
const body = {
reason: reason,
};
await http
.put(config.API.specialTimeReject(id.value), body)
.then(async () => {
await fetchData();
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
dialogConfirm($q, async () => {
showLoader();
modalUnapprove.value = false;
const body = {
reason: reason,
};
await http
.put(config.API.specialTimeReject(id.value), body)
.then(async () => {
await fetchData();
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
}
/**
@ -473,6 +475,7 @@ onMounted(async () => {
"
>อน</q-btn
>
<q-badge
v-if="props.row.status == 'APPROVE'"
rounded