fix bug รายการลงเวลากรณีพิเศษ
This commit is contained in:
parent
3fc10ef14a
commit
62e45e2743
1 changed files with 21 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue