Skip to content

Commit

Permalink
FINERACT-2092: Payment Waiver - UI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
somasorosdpc committed Jun 17, 2024
1 parent 52da1f5 commit 123c2b7
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/app/loans/common-resolvers/loan-action-button.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export class LoanActionButtonResolver implements Resolve<Object> {
return this.loansService.getLoanActionTemplate(loanId, 'repayment');
} else if (loanActionButton === 'Goodwill Credit') {
return this.loansService.getLoanActionTemplate(loanId, 'goodwillCredit');
} if (loanActionButton === 'Payment Waiver') {
return this.loansService.getLoanActionTemplate(loanId, 'paymentWaiver');
} else if (loanActionButton === 'Payout Refund') {
return this.loansService.getLoanActionTemplate(loanId, 'payoutRefund');
} else if (loanActionButton === 'Merchant Issued Refund') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<mifosx-prepay-loan [dataObject]="actionButtonData" *ngIf="actions['Prepay Loan']"></mifosx-prepay-loan>
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment>
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment>
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Payment Waiver']"></mifosx-make-repayment>
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Payout Refund']"></mifosx-make-repayment>
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Merchant Issued Refund']"></mifosx-make-repayment>
<mifosx-loan-credit-balance-refund [dataObject]="actionButtonData" *ngIf="actions['Credit Balance Refund']"></mifosx-loan-credit-balance-refund>
Expand All @@ -29,4 +30,4 @@
<mifosx-undo-command [actionName]="actionName" *ngIf="actions['Undo Charge-Off']"></mifosx-undo-command>
<mifosx-asset-transfer-loan *ngIf="actions['Sell Loan'] || actions['Buy Back Loan']"></mifosx-asset-transfer-loan>
<mifosx-loan-reaging [dataObject]="actionButtonData" *ngIf="actions['Re-Age']"></mifosx-loan-reaging>
<mifosx-loan-reamortize [dataObject]="actionButtonData" *ngIf="actions['Re-Amortize']"></mifosx-loan-reamortize>
<mifosx-loan-reamortize [dataObject]="actionButtonData" *ngIf="actions['Re-Amortize']"></mifosx-loan-reamortize>
9 changes: 9 additions & 0 deletions src/app/loans/loans-view/loan-accounts-button-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export class LoansAccountButtonConfiguration {
icon: 'coins',
taskPermissionName: 'CREATE_GOODWILL_TRANSACTION',
},
{
name: 'Payment Waiver',
icon: 'coins',
taskPermissionName: 'CREATE_PAYMENTWAIVER_TRANSACTION',
},
{
name: 'Payout Refund',
icon: 'coins',
Expand Down Expand Up @@ -200,6 +205,10 @@ export class LoansAccountButtonConfiguration {
name: 'Goodwill Credit',
taskPermissionName: 'CREATE_GOODWILL_TRANSACTION',
},
{
name: 'Payment Waiver',
taskPermissionName: 'CREATE_PAYMENTWAIVER_TRANSACTION',
},
{
name: 'Payout Refund',
taskPermissionName: 'CREATE_PAYOUT_REFUND',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class TransactionsTabComponent implements OnInit {
* REAMORTIZE:30
*/
showTransactions(transactionsData: LoanTransaction) {
if ([1, 2, 4, 9, 20, 21, 22, 23, 26, 28, 29, 30].includes(transactionsData.type.id)) {
if ([1, 2, 4, 9, 20, 21, 22, 23, 26, 28, 29, 30, 31].includes(transactionsData.type.id)) {
this.router.navigate([transactionsData.id], { relativeTo: this.route });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class ViewTransactionComponent implements OnInit {
}

allowChargebackTransaction(transactionType: LoanTransactionType): boolean {
return (transactionType.repayment
return (transactionType.repayment || transactionType.paymentWaiver
|| transactionType.goodwillCredit || transactionType.payoutRefund
|| transactionType.merchantIssuedRefund || transactionType.downPayment);
}
Expand Down
1 change: 1 addition & 0 deletions src/app/loans/models/loan-transaction-type.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface LoanTransactionType {
merchantIssuedRefund: boolean;
payoutRefund: boolean;
goodwillCredit: boolean;
paymentWaiver: boolean;
chargeRefund: boolean;
contra: boolean;
waiveInterest: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface LoanTransactionType {
merchantIssuedRefund: boolean;
payoutRefund: boolean;
goodwillCredit: boolean;
paymentWaiver: boolean;
chargeRefund: boolean;
contra: boolean;
waiveInterest: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,7 @@
"Navigation": "Navigation",
"Notifications": "Notifications",
"Organization": "Organization",
"Payment Waiver": "Payment Waiver",
"Payments": "Payments",
"Payout Refund": "Payout Refund",
"Post Interest": "Post Interest",
Expand Down

0 comments on commit 123c2b7

Please sign in to comment.