feat(FE-326,327): add footer rendering to SalesReportTable for total sales display

This commit is contained in:
rstubryan
2025-12-04 14:25:27 +07:00
parent 15ced14e20
commit 949761d59d
@@ -375,20 +375,9 @@ const SalesReportTable = ({
columns={salesColumns}
renderCustomHeaders={true}
customHeaderRows={salesCustomHeaderRows}
className={{
tableWrapperClassName: 'overflow-x-auto',
tableClassName: 'w-full table-auto text-sm',
headerRowClassName: 'hidden',
bodyRowClassName: 'hover:bg-gray-50 transition-colors',
bodyColumnClassName:
'px-4 py-3 text-xs text-gray-900 whitespace-nowrap border border-gray-300',
}}
/>
{/* Summary Row */}
{salesBroilerData.length > 0 && (
<table className='w-full table-auto text-sm mt-0'>
<tbody>
renderFooter={salesBroilerData.length > 0}
footerContent={
<tfoot>
<tr className='bg-gray-100 font-semibold'>
<td className='px-4 py-3 text-xs text-gray-900 whitespace-nowrap border border-gray-300 border-t-0'>
Total Penjualan
@@ -433,9 +422,17 @@ const SalesReportTable = ({
-
</td>
</tr>
</tbody>
</table>
)}
</tfoot>
}
className={{
tableWrapperClassName: 'overflow-x-auto',
tableClassName: 'w-full table-auto text-sm',
headerRowClassName: 'hidden',
bodyRowClassName: 'hover:bg-gray-50 transition-colors',
bodyColumnClassName:
'px-4 py-3 text-xs text-gray-900 whitespace-nowrap border border-gray-300',
}}
/>
</Card>
</div>
),