diff --git a/src/components/pages/report/sale/tab/HppPerKandangTab.tsx b/src/components/pages/report/sale/tab/HppPerKandangTab.tsx index 7982ba99..209011c5 100644 --- a/src/components/pages/report/sale/tab/HppPerKandangTab.tsx +++ b/src/components/pages/report/sale/tab/HppPerKandangTab.tsx @@ -37,10 +37,6 @@ const HppPerKandangTab = () => { // ===== STATE MANAGEMENT ===== const [isPdfExportLoading, setIsPdfExportLoading] = useState(false); - // ===== PAGINATION STATE ===== - const [currentPage, setCurrentPage] = useState(1); - const [pageSize, setPageSize] = useState(10); - // ===== SUBMISSION STATE ===== const [isSubmitted, setIsSubmitted] = useState(false); @@ -162,7 +158,6 @@ const HppPerKandangTab = () => { return; } setIsSubmitted(true); - setCurrentPage(1); }, [tableFilterState.period]); // ===== DATA FETCHING ===== @@ -188,8 +183,6 @@ const HppPerKandangTab = () => { period: tableFilterState.period || undefined, sort_by: tableFilterState.sort_by || undefined, show_unrecorded: tableFilterState.show_unrecorded, - page: currentPage, - limit: pageSize, }; return ['hpp-per-kandang-report', params]; @@ -204,9 +197,7 @@ const HppPerKandangTab = () => { params.weight_max, params.period, params.sort_by, - params.show_unrecorded, - params.page, - params.limit + params.show_unrecorded ) ); @@ -255,8 +246,6 @@ const HppPerKandangTab = () => { period: tableFilterState.period || undefined, sort_by: tableFilterState.sort_by || undefined, show_unrecorded: tableFilterState.show_unrecorded, - limit: 10000, - page: 1, }; return ['hpp-per-kandang-report-export', params]; @@ -271,9 +260,7 @@ const HppPerKandangTab = () => { params.weight_max, params.period, params.sort_by, - params.show_unrecorded, - params.page, - params.limit + params.show_unrecorded ) ); @@ -399,27 +386,6 @@ const HppPerKandangTab = () => { kandangOptions, ]); - // ===== PAGINATION HANDLERS ===== - const handlePageChange = (page: number) => { - setCurrentPage(page); - }; - - const handleRowChange = (pageSize: number) => { - setPageSize(pageSize); - }; - - const handleNextPage = () => { - if (meta && currentPage < meta.total_pages) { - setCurrentPage(currentPage + 1); - } - }; - - const handlePrevPage = () => { - if (currentPage > 1) { - setCurrentPage(currentPage - 1); - } - }; - // ===== TABLE COLUMNS DEFINITION ===== const totals: Totals = useMemo(() => { return { @@ -756,60 +722,31 @@ const HppPerKandangTab = () => { Tidak ada data yang dapat ditampilkan... ) : ( - - 0} - className={{ - containerClassName: 'w-full', - tableWrapperClassName: 'overflow-x-auto mt-4', - tableClassName: 'w-full table-auto text-sm', - headerRowClassName: 'border-b border-b-gray-200 bg-gray-50', - headerColumnClassName: - 'px-4 py-3 text-xs font-semibold text-gray-700 text-left border border-gray-200', - bodyRowClassName: - 'hover:bg-gray-50 transition-colors border-b border-l border-r border-b-gray-200 border-l-gray-200 border-r-gray-200', - bodyColumnClassName: - 'px-4 py-3 text-xs text-gray-900 whitespace-nowrap', - tableFooterClassName: - 'bg-gray-100 font-semibold border border-gray-200', - footerRowClassName: 'border-t-2 border-gray-300', - footerColumnClassName: - 'px-4 py-3 text-xs text-gray-900 whitespace-nowrap', - paginationClassName: 'hidden', - }} - /> - +
0} + className={{ + containerClassName: 'w-full', + tableWrapperClassName: 'overflow-x-auto mt-4', + tableClassName: 'w-full table-auto text-sm', + headerRowClassName: 'border-b border-b-gray-200 bg-gray-50', + headerColumnClassName: + 'px-4 py-3 text-xs font-semibold text-gray-700 text-left border border-gray-200', + bodyRowClassName: + 'hover:bg-gray-50 transition-colors border-b border-l border-r border-b-gray-200 border-l-gray-200 border-r-gray-200', + bodyColumnClassName: + 'px-4 py-3 text-xs text-gray-900 whitespace-nowrap', + tableFooterClassName: + 'bg-gray-100 font-semibold border border-gray-200', + footerRowClassName: 'border-t-2 border-gray-300', + footerColumnClassName: + 'px-4 py-3 text-xs text-gray-900 whitespace-nowrap', + paginationClassName: 'hidden', + }} + /> )} - {meta && data.length > 0 && ( -
- -
- )} ); };