fix currentPage ===> จำนวนสิทธิ์และวันลาที่ใช้ไป

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-07-15 14:20:24 +07:00
parent 07338cdb63
commit 972bae6cd6

View file

@ -6,6 +6,7 @@ import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { checkPermission } from "@/utils/permissions";
import { updateCurrentPage } from "@/utils/function";
import { useCounterMixin } from "@/stores/mixin";
import { useLeaveHistoryDataStore } from "@/modules/09_leave/stores/LeaveHistoryStore";
@ -186,6 +187,11 @@ function onDeleteLeaveBeginning(id: string) {
await http
.delete(config.API.leaveBeginning + `/${id}`)
.then(async () => {
formFilter.page = await updateCurrentPage(
formFilter.page,
maxPage.value,
rows.value.length
);
await fetchDataLeaveBeginning();
success($q, "ลบข้อมูลสำเร็จ");
})