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