mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE): Highlight negative accounts receivable values
This commit is contained in:
@@ -470,11 +470,17 @@ const CustomerPaymentTab = () => {
|
||||
cell: (props) => {
|
||||
const value = props.row.original.accounts_receivable;
|
||||
return (
|
||||
<div className='text-right text-error'>{formatCurrency(value)}</div>
|
||||
<div className={`text-right ${value < 0 ? 'text-error' : ''}`}>
|
||||
{formatCurrency(value)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
footer: () => (
|
||||
<div className='text-right font-semibold text-gray-900'>
|
||||
<div
|
||||
className={`text-right font-semibold ${
|
||||
summary.total_accounts_receivable < 0 ? 'text-error' : ''
|
||||
}`}
|
||||
>
|
||||
{formatCurrency(summary.total_accounts_receivable) || '-'}
|
||||
</div>
|
||||
),
|
||||
@@ -782,8 +788,14 @@ const CustomerPaymentTab = () => {
|
||||
className='px-4 py-3 text-xs text-gray-900 whitespace-nowrap'
|
||||
colSpan={13}
|
||||
></td>
|
||||
<td className='px-4 py-3 text-xs text-gray-900 whitespace-nowrap'>
|
||||
<div className='text-right text-error'>
|
||||
<td className='px-4 py-3 text-xs whitespace-nowrap'>
|
||||
<div
|
||||
className={`text-right ${
|
||||
row.original.accounts_receivable < 0
|
||||
? 'text-error'
|
||||
: ''
|
||||
}`}
|
||||
>
|
||||
{formatCurrency(row.original.accounts_receivable)}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user