Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ function generateList(contractTypes, contracts) {
currentContracts.map(contract => {
let newClassification = 'NORMAL';

if (type.config.badExpirationDay < (contract.expiredDays || 0))
if (type?.config?.badExpirationDay < (contract.expiredDays || 0))
newClassification = 'BAD';
else if (type.config.negativeExpirationDay < (contract.expiredDays || 0))
else if (
type?.config?.negativeExpirationDay < (contract.expiredDays || 0)
)
newClassification = 'NEGATIVE';
else if (type.config.doubtExpirationDay < (contract.expiredDays || 0))
else if (type?.config?.doubtExpirationDay < (contract.expiredDays || 0))
newClassification = 'DOUBTFUL';
else if (type.config.expiredExpirationDay < (contract.expiredDays || 0))
else if (type?.config?.expiredExpirationDay < (contract.expiredDays || 0))
newClassification = 'EXPIRED';

addClassification(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ function ContractRow({ contract, history, isChecked, toggleBulk }: Props) {
</td>

<td key={'number'}>{displayValue(contract, 'number')} </td>
<td key={'marginAmount'}>{displayValue(contract, 'marginAmount')}</td>
<td key={'leaseAmount'}>{displayValue(contract, 'leaseAmount')}</td>
<td key={'loanBalanceAmount'}>
{displayValue(contract, 'loanBalanceAmount')}
</td>
<td key={'status'}>{displayValue(contract, 'status')}</td>
<td key={'tenor'}>{displayValue(contract, 'tenor')}</td>
<td key={'interestRate'}>{displayValue(contract, 'interestRate')}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,17 @@ class ContractsList extends React.Component<IProps, State> {
label={__('Contract Number')}
/>
</th>

<th>
<SortHandler
sortField={'marginAmount'}
label={__('marginAmount')}
sortField={'leaseAmount'}
label={__('leaseAmount')}
/>
</th>
<th>
<SortHandler
sortField={'leaseAmount'}
label={__('leaseAmount')}
sortField={'balanceAmount'}
label={__('balanceAmount')}
/>
</th>
<th>
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-loans-ui/src/locales/mn.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,6 @@
"Tenor must greater than": "Хугацаа бага байна",
"Tenor must less than": "Хугацаа их байна",
"Interest must greater than": "Хүү бага байна",
"Interest must less than": "Хүү их байна"
"Interest must less than": "Хүү их байна",
"balanceAmount": "Үлдэгдэл дүн"
}