From ba09c07dabe64ffb1b2392ec1c9b7a1342d0a4f1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 8 Oct 2025 16:09:54 +0700 Subject: [PATCH] fix(leaveHistory): params --- src/composables/usePagination.ts | 6 +++++- .../09_leave/components/07_LeaveHistory/DialogForm.vue | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/composables/usePagination.ts b/src/composables/usePagination.ts index 6cdb1b521..e5558f97c 100644 --- a/src/composables/usePagination.ts +++ b/src/composables/usePagination.ts @@ -34,7 +34,11 @@ export function usePagination( if (!newPagination?.page || !newPagination?.rowsPerPage) return; pagination.value = { ...newPagination }; - if (fetchFunction) { + if ( + fetchFunction && + pagination.value.rowsNumber && + pagination.value.rowsNumber > 0 + ) { await fetchFunction(); // เรียกฟังก์ชันที่ส่งเข้ามา } } diff --git a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue index cec901b26..384253293 100644 --- a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue +++ b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue @@ -131,9 +131,7 @@ async function fetchDataPerson() { system: (route.meta?.Key as string) || undefined, }, { - params: { - ...params.value, - }, + params: params.value, } ); const result = res.data.result;