diff --git a/src/modules/09_leave/views/07_LeaveHistoryMain.vue b/src/modules/09_leave/views/07_LeaveHistoryMain.vue index ca91cd5fa..93aaec70e 100644 --- a/src/modules/09_leave/views/07_LeaveHistoryMain.vue +++ b/src/modules/09_leave/views/07_LeaveHistoryMain.vue @@ -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, "ลบข้อมูลสำเร็จ"); })