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