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} columns={salesColumns}
renderCustomHeaders={true} renderCustomHeaders={true}
customHeaderRows={salesCustomHeaderRows} customHeaderRows={salesCustomHeaderRows}
className={{ renderFooter={salesBroilerData.length > 0}
tableWrapperClassName: 'overflow-x-auto', footerContent={
tableClassName: 'w-full table-auto text-sm', <tfoot>
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>
<tr className='bg-gray-100 font-semibold'> <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'> <td className='px-4 py-3 text-xs text-gray-900 whitespace-nowrap border border-gray-300 border-t-0'>
Total Penjualan Total Penjualan
@@ -433,9 +422,17 @@ const SalesReportTable = ({
- -
</td> </td>
</tr> </tr>
</tbody> </tfoot>
</table> }
)} 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> </Card>
</div> </div>
), ),