diff --git a/src/components/pages/report/sale/tab/HppPerKandangTab.tsx b/src/components/pages/report/sale/tab/HppPerKandangTab.tsx index ff35eb45..5248521f 100644 --- a/src/components/pages/report/sale/tab/HppPerKandangTab.tsx +++ b/src/components/pages/report/sale/tab/HppPerKandangTab.tsx @@ -13,7 +13,7 @@ import { LocationApi } from '@/services/api/master-data'; import { KandangApi } from '@/services/api/master-data'; import { SaleReportApi } from '@/services/api/report/marketing-sale'; import Table from '@/components/Table'; -import { ColumnDef, Row } from '@tanstack/react-table'; +import { ColumnDef, Row, flexRender } from '@tanstack/react-table'; import { formatCurrency, formatNumber } from '@/lib/helper'; import { HppPerKandangReport, @@ -739,7 +739,23 @@ const HppPerKandangTab = () => { const renderCustomRow = useCallback( (row: Row) => { if (row.index === data.length - 1) { - const rows = [ + const defaultRow = ( + + {row.getVisibleCells().map((cell) => ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ))} + + ); + + const customRows = [ { ]; if (perWeightRangeSummary.length > 0) { - rows.push( + customRows.push( { ); } - return rows; + return [defaultRow, ...customRows]; } return null;