From b2aa39cb67c24c4655ecb753b95c557cbb84949f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Alberto=20Hern=C3=A1ndez?= <44206706+josehernandezfintecheandomx@users.noreply.github.com> Date: Tue, 9 May 2023 22:09:45 -0600 Subject: [PATCH] Support for Charge-off and Undo charge-off to Loan account (#1748) Co-authored-by: Jose Alberto Hernandez --- .../client-datatable-step.component.html | 4 +- .../client-family-members-step.component.html | 4 +- .../client-general-step.component.html | 4 +- ...eposit-account-charges-step.component.html | 4 +- ...posit-account-currency-step.component.html | 4 +- ...eposit-account-details-step.component.html | 4 +- ...nt-interest-rate-chart-step.component.html | 4 +- ...posit-account-settings-step.component.html | 4 +- ...-deposit-account-terms-step.component.html | 4 +- ...posits-account-charges-step.component.html | 4 +- ...osits-account-currency-step.component.html | 4 +- ...posits-account-details-step.component.html | 4 +- ...nt-interest-rate-chart-step.component.html | 4 +- ...osits-account-settings-step.component.html | 4 +- ...deposits-account-terms-step.component.html | 4 +- .../loan-action-button.resolver.ts | 2 + .../glim-charges-step.component.html | 4 +- .../glim-details-step.component.html | 4 +- .../glim-terms-step.component.html | 4 +- .../loans-account-charges-step.component.html | 4 +- ...oans-account-datatable-step.component.html | 4 +- .../loans-account-details-step.component.html | 4 +- .../loans-account-preview-step.component.html | 2 - .../loans-account-preview-step.component.ts | 8 +- ...loans-account-schedule-step.component.html | 7 +- .../loans-account-terms-step.component.html | 4 +- .../charge-off/charge-off.component.html | 58 ++ .../charge-off/charge-off.component.scss | 4 + .../charge-off/charge-off.component.spec.ts | 25 + .../charge-off/charge-off.component.ts | 89 +++ .../loan-account-actions.component.html | 2 + .../loan-account-actions.component.ts | 8 +- .../make-repayment.component.ts | 8 +- .../prepay-loan/prepay-loan.component.ts | 7 +- .../loans-view/loan-accounts-button-config.ts | 518 +++++++++--------- .../loans-view/loans-view.component.html | 7 +- .../loans/loans-view/loans-view.component.ts | 18 + .../transactions-tab.component.html | 146 ++--- .../transactions-tab.component.scss | 3 + .../transactions-tab.component.ts | 88 ++- src/app/loans/loans.module.ts | 4 +- src/app/loans/loans.service.ts | 1 - .../campaign-message-step.component.html | 4 +- ...it-business-rule-parameters.component.html | 4 +- .../sms-campaign-step.component.html | 4 +- src/app/pipes/status-lookup.pipe.ts | 1 + ...sit-product-accounting-step.component.html | 4 +- ...eposit-product-charges-step.component.html | 4 +- ...posit-product-currency-step.component.html | 4 +- ...eposit-product-details-step.component.html | 4 +- ...ct-interest-rate-chart-step.component.html | 4 +- ...posit-product-settings-step.component.html | 6 +- ...-deposit-product-terms-step.component.html | 6 +- ...oan-product-accounting-step.component.html | 4 +- .../loan-product-charges-step.component.html | 4 +- .../loan-product-currency-step.component.html | 4 +- .../loan-product-details-step.component.html | 4 +- .../loan-product-settings-step.component.html | 4 +- .../loan-product-terms-step.component.html | 4 +- ...sit-product-accounting-step.component.html | 4 +- ...eposit-product-charges-step.component.html | 4 +- ...posit-product-currency-step.component.html | 4 +- ...eposit-product-details-step.component.html | 4 +- ...ct-interest-rate-chart-step.component.html | 6 +- ...posit-product-settings-step.component.html | 4 +- ...-deposit-product-terms-step.component.html | 4 +- ...ing-product-accounting-step.component.html | 4 +- ...saving-product-charges-step.component.html | 4 +- ...aving-product-currency-step.component.html | 4 +- ...saving-product-details-step.component.html | 4 +- ...aving-product-settings-step.component.html | 4 +- .../saving-product-terms-step.component.html | 4 +- ...are-product-accounting-step.component.html | 4 +- .../share-product-charges-step.component.html | 4 +- ...share-product-currency-step.component.html | 4 +- .../share-product-details-step.component.html | 4 +- ...e-product-market-price-step.component.html | 4 +- ...share-product-settings-step.component.html | 4 +- .../share-product-terms-step.component.html | 4 +- ...avings-account-charges-step.component.html | 4 +- ...avings-account-details-step.component.html | 4 +- .../savings-account-terms-step.component.html | 4 +- src/app/shared/shared.module.ts | 7 +- .../shared/svg-icon/svg-icon.component.html | 3 + .../shared/svg-icon/svg-icon.component.scss | 9 + .../svg-icon/svg-icon.component.spec.ts | 25 + src/app/shared/svg-icon/svg-icon.component.ts | 19 + ...shares-account-charges-step.component.html | 4 +- ...shares-account-details-step.component.html | 4 +- .../shares-account-terms-step.component.html | 4 +- .../images/icons_account_placeholder.svg | 6 + .../images/loans_account_placeholder.png | Bin 2730 -> 0 bytes src/assets/styles/_colours.scss | 3 + src/assets/styles/_status.scss | 4 + 94 files changed, 863 insertions(+), 481 deletions(-) create mode 100644 src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.html create mode 100644 src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.scss create mode 100644 src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.spec.ts create mode 100644 src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts create mode 100644 src/app/shared/svg-icon/svg-icon.component.html create mode 100644 src/app/shared/svg-icon/svg-icon.component.scss create mode 100644 src/app/shared/svg-icon/svg-icon.component.spec.ts create mode 100644 src/app/shared/svg-icon/svg-icon.component.ts create mode 100644 src/assets/images/icons_account_placeholder.svg delete mode 100644 src/assets/images/loans_account_placeholder.png diff --git a/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html b/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html index a8107a8f5..2587444a1 100644 --- a/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html +++ b/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html @@ -43,8 +43,8 @@ Previous diff --git a/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html b/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html index 8ec1e6ecd..bb2d5ec1f 100644 --- a/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html +++ b/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html @@ -59,8 +59,8 @@ Previous diff --git a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html index 9e100372c..2d4bc5f88 100644 --- a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html +++ b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html @@ -217,8 +217,8 @@ Previous diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html index 1f9a6f7ce..6930b3a01 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html @@ -104,7 +104,7 @@ Previous diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-currency-step/fixed-deposit-account-currency-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-currency-step/fixed-deposit-account-currency-step.component.html index 221b0993a..f40e0a992 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-currency-step/fixed-deposit-account-currency-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-currency-step/fixed-deposit-account-currency-step.component.html @@ -25,8 +25,8 @@ Previous diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html index b1177413a..d4f4260b3 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html @@ -42,8 +42,8 @@ Previous diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-interest-rate-chart-step/fixed-deposit-account-interest-rate-chart-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-interest-rate-chart-step/fixed-deposit-account-interest-rate-chart-step.component.html index ed26bb159..73b029b6b 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-interest-rate-chart-step/fixed-deposit-account-interest-rate-chart-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-interest-rate-chart-step/fixed-deposit-account-interest-rate-chart-step.component.html @@ -143,7 +143,7 @@ Previous diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html index 3e7c60e63..ee955f902 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html @@ -139,8 +139,8 @@ Previous diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html index f2462963c..1d25b2da7 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html @@ -94,8 +94,8 @@ Previous diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html index 750b1a7b7..33aab6a9a 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html @@ -105,7 +105,7 @@ Previous diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html index 364a03bad..497472d12 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html @@ -21,8 +21,8 @@ Previous diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html index 290516c5f..7290bd73f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html @@ -42,8 +42,8 @@ Previous diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html index dbb08623d..4f8b17a2c 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html @@ -148,7 +148,7 @@ Previous diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html index 715fe1dea..691375d5f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html @@ -202,8 +202,8 @@ Previous diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html index c513193f3..ed3ad0ced 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html @@ -62,8 +62,8 @@ Previous diff --git a/src/app/loans/common-resolvers/loan-action-button.resolver.ts b/src/app/loans/common-resolvers/loan-action-button.resolver.ts index 2e8138280..6c04fdb76 100644 --- a/src/app/loans/common-resolvers/loan-action-button.resolver.ts +++ b/src/app/loans/common-resolvers/loan-action-button.resolver.ts @@ -70,6 +70,8 @@ export class LoanActionButtonResolver implements Resolve { return this.loansService.getLoanChargeTemplateResource(loanId); } else if (loanActionButton === 'Foreclosure') { return this.loansService.getLoanForeclosureActionTemplate(loanId); + } else if (loanActionButton === 'Charge-Off') { + return this.loansService.getLoanActionTemplate(loanId, 'charge-off'); } else { return undefined; } diff --git a/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-charges-step/glim-charges-step.component.html b/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-charges-step/glim-charges-step.component.html index 1e8caf019..8b31bb7fa 100644 --- a/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-charges-step/glim-charges-step.component.html +++ b/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-charges-step/glim-charges-step.component.html @@ -163,7 +163,7 @@ Previous diff --git a/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-details-step/glim-details-step.component.html b/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-details-step/glim-details-step.component.html index 7137d593e..064ccd847 100644 --- a/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-details-step/glim-details-step.component.html +++ b/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-details-step/glim-details-step.component.html @@ -80,8 +80,8 @@ Previous diff --git a/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-terms-step/glim-terms-step.component.html b/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-terms-step/glim-terms-step.component.html index 5af9aab8a..defb47bee 100644 --- a/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-terms-step/glim-terms-step.component.html +++ b/src/app/loans/glim-account/create-glim-account/glim-account-stepper/glim-terms-step/glim-terms-step.component.html @@ -121,8 +121,8 @@ Previous diff --git a/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html b/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html index d8496967b..eda7942dd 100644 --- a/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html @@ -124,8 +124,8 @@ Previous diff --git a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html index 8917a7f5b..a47d21565 100644 --- a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html @@ -95,8 +95,8 @@ Previous + + + + + + + + + + diff --git a/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.scss b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.scss new file mode 100644 index 000000000..724137a4a --- /dev/null +++ b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.scss @@ -0,0 +1,4 @@ + +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.spec.ts b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.spec.ts new file mode 100644 index 000000000..8302d21ab --- /dev/null +++ b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ChargeOffComponent } from './charge-off.component'; + +describe('ChargeOffComponent', () => { + let component: ChargeOffComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ChargeOffComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ChargeOffComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts new file mode 100644 index 000000000..64070f386 --- /dev/null +++ b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts @@ -0,0 +1,89 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { Dates } from 'app/core/utils/dates'; +import { LoansService } from 'app/loans/loans.service'; +import { SettingsService } from 'app/settings/settings.service'; + +@Component({ + selector: 'mifosx-charge-off', + templateUrl: './charge-off.component.html', + styleUrls: ['./charge-off.component.scss'] +}) +export class ChargeOffComponent implements OnInit { + @Input() dataObject: any; + + /** Loan Id */ + loanId: string; + /** Payment Type Options */ + paymentTypes: any; + /** Show payment details */ + showPaymentDetails = false; + /** Minimum Date allowed. */ + minDate = new Date(2000, 0, 1); + /** Maximum Date allowed. */ + maxDate = new Date(); + /** Repayment Loan Form */ + chargeoffLoanForm: FormGroup; + + chargeOffReasonOptions: any = []; + + /** + * @param {FormBuilder} formBuilder Form Builder. + * @param {LoansService} loanService Loan Service. + * @param {ActivatedRoute} route Activated Route. + * @param {Router} router Router for navigation. + * @param {SettingsService} settingsService Settings Service + */ + constructor(private formBuilder: FormBuilder, + private loanService: LoansService, + private route: ActivatedRoute, + private router: Router, + private dateUtils: Dates, + private settingsService: SettingsService) { + this.loanId = this.route.snapshot.params['loanId']; + } + + /** + * Creates the repayment loan form + * and initialize with the required values + */ + ngOnInit() { + this.maxDate = this.settingsService.businessDate; + this.chargeOffReasonOptions = this.dataObject.chargeOffReasonOptions; + this.createChargeoffLoanForm(); + } + + /** + * Creates the create close form. + */ + createChargeoffLoanForm() { + this.chargeoffLoanForm = this.formBuilder.group({ + 'transactionDate': [this.settingsService.businessDate, Validators.required], + 'externalId': '', + 'chargeOffReasonId': '', + 'note': '' + }); + } + + submit() { + const chargeoffLoanFormData = this.chargeoffLoanForm.value; + const locale = this.settingsService.language.code; + const dateFormat = this.settingsService.dateFormat; + const prevTransactionDate: Date = this.chargeoffLoanForm.value.transactionDate; + if (chargeoffLoanFormData.transactionDate instanceof Date) { + chargeoffLoanFormData.transactionDate = this.dateUtils.formatDate(prevTransactionDate, dateFormat); + } + const data = { + ...chargeoffLoanFormData, + dateFormat, + locale + }; + const command = 'charge-off'; + this.loanService.submitLoanActionButton(this.loanId, data, command) + .subscribe((response: any) => { + this.router.navigate(['../../transactions'], { relativeTo: this.route }); + }); + } + +} diff --git a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html index 7fa50a0c3..1d97a109b 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html @@ -25,3 +25,5 @@ + + diff --git a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts index 5bdc2f88b..708613585 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts @@ -40,7 +40,9 @@ export class LoanAccountActionsComponent { 'Merchant Issued Refund': boolean, 'Payout Refund': boolean, 'Credit Balance Refund': boolean, - 'Edit Repayment Schedule': boolean + 'Edit Repayment Schedule': boolean, + 'Charge-Off': boolean, + 'Undo Charge-Off': boolean } = { 'Close': false, 'Undo Approval': false, @@ -69,7 +71,9 @@ export class LoanAccountActionsComponent { 'Merchant Issued Refund': false, 'Payout Refund': false, 'Credit Balance Refund': false, - 'Edit Repayment Schedule': false + 'Edit Repayment Schedule': false, + 'Charge-Off': false, + 'Undo Charge-Off': false }; actionButtonData: any; diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts index 1b05af7b3..f36fcbbf1 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, OnDestroy } from '@angular/core'; import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; @@ -16,7 +16,7 @@ import { Dates } from 'app/core/utils/dates'; templateUrl: './make-repayment.component.html', styleUrls: ['./make-repayment.component.scss'] }) -export class MakeRepaymentComponent implements OnInit { +export class MakeRepaymentComponent implements OnInit, OnDestroy { @Input() dataObject: any; /** Loan Id */ @@ -58,6 +58,10 @@ export class MakeRepaymentComponent implements OnInit { this.setRepaymentLoanDetails(); } + ngOnDestroy(): void { + + } + /** * Creates the create close form. */ diff --git a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts index dca0b56aa..65ba55a4f 100644 --- a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, OnDestroy } from '@angular/core'; import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; @@ -17,7 +17,7 @@ import { Dates } from 'app/core/utils/dates'; templateUrl: './prepay-loan.component.html', styleUrls: ['./prepay-loan.component.scss'] }) -export class PrepayLoanComponent implements OnInit { +export class PrepayLoanComponent implements OnInit, OnDestroy { @Input() dataObject: any; /** Loan Id */ @@ -66,6 +66,9 @@ export class PrepayLoanComponent implements OnInit { this.prepayData = this.dataObject; } + ngOnDestroy(): void { + } + /** * Creates the prepay loan form. */ diff --git a/src/app/loans/loans-view/loan-accounts-button-config.ts b/src/app/loans/loans-view/loan-accounts-button-config.ts index 2758b77da..7f5e59516 100644 --- a/src/app/loans/loans-view/loan-accounts-button-config.ts +++ b/src/app/loans/loans-view/loan-accounts-button-config.ts @@ -1,273 +1,273 @@ /** Recurring Deposits Account Buttons Configuration */ export class LoansAccountButtonConfiguration { - optionArray: { - name: string, - taskPermissionName?: string, - }[]; + optionArray: { + name: string, + taskPermissionName?: string, + }[]; - optionPaymentArray: { - name: string, - taskPermissionName?: string, - }[]; + optionPaymentArray: { + name: string, + taskPermissionName?: string, + }[]; - buttonsArray: { - name: string, - icon: string, - taskPermissionName?: string, - }[]; + buttonsArray: { + name: string, + icon: string, + taskPermissionName?: string, + }[]; - constructor(status: string) { - this.setOptions(status); - this.setButtons(status); - } - - get singleButtons() { - return this.buttonsArray; - } - - get options() { - return this.optionArray; - } - - get optionsPayment() { - return this.optionPaymentArray; + constructor(status: string) { + this.setOptions(status); + this.setButtons(status); } - setButtons(status: string) { - switch (status) { - case 'Active': - this.buttonsArray = [ - { - name: 'Add Loan Charge', - icon: 'plus', - taskPermissionName: 'CREATE_LOANCHARGE', - }, - { - name: 'Foreclosure', - icon: 'heart-broken', - taskPermissionName: 'FORECLOSURE_LOAN', - }, - { - name: 'Make Repayment', - icon: 'coins', - taskPermissionName: 'REPAYMENT_LOAN', - }, - { - name: 'Undo Disbursal', - icon: 'undo', - taskPermissionName: 'DISBURSALUNDO_LOAN', - } - ]; - break; - case 'Submitted and pending approval': - this.buttonsArray = [ - { - name: 'Add Loan Charge', - icon: 'plus', - taskPermissionName: 'CREATE_LOANCHARGE', - }, - { - name: 'Approve', - icon: 'check', - taskPermissionName: 'APPROVE_LOAN', - }, - { - name: 'Modify Application', - icon: 'edit', - taskPermissionName: 'UPDATE_LOAN', - }, - { - name: 'Reject', - icon: 'times', - taskPermissionName: 'REJECT_LOAN', - }, - ]; - break; - case 'Approved': - this.buttonsArray = [ - { - name: 'Disburse', - icon: 'hand-holding-usd', - taskPermissionName: 'DISBURSE_LOAN', - }, - { - name: 'Disburse to Savings', - icon: 'piggy-bank', - taskPermissionName: 'DISBURSETOSAVINGS_LOAN', - }, - { - name: 'Undo Approval', - icon: 'undo', - taskPermissionName: 'APPROVALUNDO_LOAN', - }, - ]; - break; - case 'Overpaid': - this.buttonsArray = [ - { - name: 'Transfer Funds', - icon: 'exchange', - taskPermissionName: 'CREATE_ACCOUNTTRANSFER', - }, - { - name: 'Credit Balance Refund', - icon: 'coins', - taskPermissionName: 'CREATE_CREDIT_BALANCE_REFUND', - } - ]; - break; - case 'Closed (written off)': - this.buttonsArray = [ - { - name: 'Recovery Payment', - icon: 'briefcase', - taskPermissionName: 'RECOVERYPAYMENT_LOAN', - }, - ]; - break; - case 'Closed (obligations met)': - this.buttonsArray = [ - { - name: 'Goodwill Credit', - icon: 'coins', - taskPermissionName: 'CREATE_GOODWILL_TRANSACTION', - }, - { - name: 'Payout Refund', - icon: 'coins', - taskPermissionName: 'CREATE_PAYOUT_REFUND', - }, - { - name: 'Merchant Issued Refund', - icon: 'coins', - taskPermissionName: 'CREATE_MERCHANT_ISSUED_REFUND', - } - ]; - break; - default: - this.buttonsArray = []; - } - } + get singleButtons() { + return this.buttonsArray; + } - setOptions(status: string) { - switch (status) { - case 'Active': - this.optionArray = [ - { - name: 'Waive Interest', - taskPermissionName: 'WAIVEINTERESTPORTION_LOAN', - }, - { - name: 'Reschedule', - taskPermissionName: 'CREATE_RESCHEDULELOAN', - }, - { - name: 'Write Off', - taskPermissionName: 'WRITEOFF_LOAN', - }, - { - name: 'Close (as Rescheduled)', - taskPermissionName: 'CLOSEASRESCHEDULED_LOAN', - }, - { - name: 'Close', - taskPermissionName: 'CLOSE_LOAN', - }, - { - name: 'Loan Screen Report', - taskPermissionName: 'READ_LOAN', - }, - { - name: 'View Guarantors', - taskPermissionName: 'READ_GUARANTOR', - }, - { - name: 'Create Guarantor', - taskPermissionName: 'CREATE_GUARANTOR', - }, - { - name: 'Recover From Guarantor', - taskPermissionName: 'RECOVERGUARANTEES_LOAN', - }, - ]; - this.optionPaymentArray = [ - { - name: 'Goodwill Credit', - taskPermissionName: 'CREATE_GOODWILL_TRANSACTION', - }, - { - name: 'Payout Refund', - taskPermissionName: 'CREATE_PAYOUT_REFUND', - }, - { - name: 'Merchant Issued Refund', - taskPermissionName: 'CREATE_MERCHANT_ISSUED_REFUND', - } - ]; - break; - case 'Submitted and pending approval': - this.optionArray = [ - { - name: 'Withdrawn by client', - taskPermissionName: 'WITHDRAW_LOAN', - }, - { - name: 'Delete', - taskPermissionName: 'DELETE_LOAN', - }, - { - name: 'Add Collateral', - taskPermissionName: 'CREATE_COLLATERAL', - }, - { - name: 'View Guarantors', - taskPermissionName: 'READ_GUARANTOR', - }, - { - name: 'Create Guarantor', - taskPermissionName: 'CREATE_GUARANTOR', - }, - { - name: 'Loan Screen Reports', - taskPermissionName: 'READ_LOAN', - }, - ]; - this.optionPaymentArray = []; - break; - case 'Approved': - this.optionArray = [ - { - name: 'Add Loan Charge', - taskPermissionName: 'CREATE_LOANCHARGE', - }, - { - name: 'View Guarantors', - taskPermissionName: 'READ_GUARANTOR', - }, - { - name: 'Create Guarantor', - taskPermissionName: 'CREATE_GUARANTOR', - }, - { - name: 'Loan Screen Report', - taskPermissionName: 'READ_LOAN', - }, - ]; - this.optionPaymentArray = []; - break; - default: - this.optionArray = []; - this.optionPaymentArray = []; - } - } + get options() { + return this.optionArray; + } - addOption(option: { name: string, icon?: string, taskPermissionName?: string }) { - this.optionArray.push(option); - } + get optionsPayment() { + return this.optionPaymentArray; + } - addButton(option: { name: string, icon: string, taskPermissionName?: string }) { - this.buttonsArray.push(option); + setButtons(status: string) { + switch (status) { + case 'Active': + this.buttonsArray = [ + { + name: 'Add Loan Charge', + icon: 'plus', + taskPermissionName: 'CREATE_LOANCHARGE', + }, + { + name: 'Foreclosure', + icon: 'heart-broken', + taskPermissionName: 'FORECLOSURE_LOAN', + }, + { + name: 'Make Repayment', + icon: 'coins', + taskPermissionName: 'REPAYMENT_LOAN', + }, + { + name: 'Undo Disbursal', + icon: 'undo', + taskPermissionName: 'DISBURSALUNDO_LOAN', + } + ]; + break; + case 'Submitted and pending approval': + this.buttonsArray = [ + { + name: 'Add Loan Charge', + icon: 'plus', + taskPermissionName: 'CREATE_LOANCHARGE', + }, + { + name: 'Approve', + icon: 'check', + taskPermissionName: 'APPROVE_LOAN', + }, + { + name: 'Modify Application', + icon: 'edit', + taskPermissionName: 'UPDATE_LOAN', + }, + { + name: 'Reject', + icon: 'times', + taskPermissionName: 'REJECT_LOAN', + }, + ]; + break; + case 'Approved': + this.buttonsArray = [ + { + name: 'Disburse', + icon: 'hand-holding-usd', + taskPermissionName: 'DISBURSE_LOAN', + }, + { + name: 'Disburse to Savings', + icon: 'piggy-bank', + taskPermissionName: 'DISBURSETOSAVINGS_LOAN', + }, + { + name: 'Undo Approval', + icon: 'undo', + taskPermissionName: 'APPROVALUNDO_LOAN', + }, + ]; + break; + case 'Overpaid': + this.buttonsArray = [ + { + name: 'Transfer Funds', + icon: 'exchange', + taskPermissionName: 'CREATE_ACCOUNTTRANSFER', + }, + { + name: 'Credit Balance Refund', + icon: 'coins', + taskPermissionName: 'CREATE_CREDIT_BALANCE_REFUND', + } + ]; + break; + case 'Closed (written off)': + this.buttonsArray = [ + { + name: 'Recovery Payment', + icon: 'briefcase', + taskPermissionName: 'RECOVERYPAYMENT_LOAN', + }, + ]; + break; + case 'Closed (obligations met)': + this.buttonsArray = [ + { + name: 'Goodwill Credit', + icon: 'coins', + taskPermissionName: 'CREATE_GOODWILL_TRANSACTION', + }, + { + name: 'Payout Refund', + icon: 'coins', + taskPermissionName: 'CREATE_PAYOUT_REFUND', + }, + { + name: 'Merchant Issued Refund', + icon: 'coins', + taskPermissionName: 'CREATE_MERCHANT_ISSUED_REFUND', + } + ]; + break; + default: + this.buttonsArray = []; } + } + + setOptions(status: string) { + switch (status) { + case 'Active': + this.optionArray = [ + { + name: 'Waive Interest', + taskPermissionName: 'WAIVEINTERESTPORTION_LOAN', + }, + { + name: 'Reschedule', + taskPermissionName: 'CREATE_RESCHEDULELOAN', + }, + { + name: 'Write Off', + taskPermissionName: 'WRITEOFF_LOAN', + }, + { + name: 'Close (as Rescheduled)', + taskPermissionName: 'CLOSEASRESCHEDULED_LOAN', + }, + { + name: 'Close', + taskPermissionName: 'CLOSE_LOAN', + }, + { + name: 'Loan Screen Report', + taskPermissionName: 'READ_LOAN', + }, + { + name: 'View Guarantors', + taskPermissionName: 'READ_GUARANTOR', + }, + { + name: 'Create Guarantor', + taskPermissionName: 'CREATE_GUARANTOR', + }, + { + name: 'Recover From Guarantor', + taskPermissionName: 'RECOVERGUARANTEES_LOAN', + } + ]; + this.optionPaymentArray = [ + { + name: 'Goodwill Credit', + taskPermissionName: 'CREATE_GOODWILL_TRANSACTION', + }, + { + name: 'Payout Refund', + taskPermissionName: 'CREATE_PAYOUT_REFUND', + }, + { + name: 'Merchant Issued Refund', + taskPermissionName: 'CREATE_MERCHANT_ISSUED_REFUND', + } + ]; + break; + case 'Submitted and pending approval': + this.optionArray = [ + { + name: 'Withdrawn by client', + taskPermissionName: 'WITHDRAW_LOAN', + }, + { + name: 'Delete', + taskPermissionName: 'DELETE_LOAN', + }, + { + name: 'Add Collateral', + taskPermissionName: 'CREATE_COLLATERAL', + }, + { + name: 'View Guarantors', + taskPermissionName: 'READ_GUARANTOR', + }, + { + name: 'Create Guarantor', + taskPermissionName: 'CREATE_GUARANTOR', + }, + { + name: 'Loan Screen Reports', + taskPermissionName: 'READ_LOAN', + }, + ]; + this.optionPaymentArray = []; + break; + case 'Approved': + this.optionArray = [ + { + name: 'Add Loan Charge', + taskPermissionName: 'CREATE_LOANCHARGE', + }, + { + name: 'View Guarantors', + taskPermissionName: 'READ_GUARANTOR', + }, + { + name: 'Create Guarantor', + taskPermissionName: 'CREATE_GUARANTOR', + }, + { + name: 'Loan Screen Report', + taskPermissionName: 'READ_LOAN', + }, + ]; + this.optionPaymentArray = []; + break; + default: + this.optionArray = []; + this.optionPaymentArray = []; + } + } + + addOption(option: { name: string, icon?: string, taskPermissionName?: string }) { + this.optionArray.push(option); + } + + addButton(option: { name: string, icon: string, taskPermissionName?: string }) { + this.buttonsArray.push(option); + } } diff --git a/src/app/loans/loans-view/loans-view.component.html b/src/app/loans/loans-view/loans-view.component.html index fbc9a0760..b2c6c49f1 100644 --- a/src/app/loans/loans-view/loans-view.component.html +++ b/src/app/loans/loans-view/loans-view.component.html @@ -6,8 +6,9 @@
- + +
@@ -18,7 +19,7 @@

+ [ngClass]="loanDetailsData.inArrears?'status-active-overdue':( iconLoanStatusColor() | statusLookup)"> Loan Product: {{loanDetailsData.loanProductName}}({{loanDetailsData.accountNo}})

diff --git a/src/app/loans/loans-view/loans-view.component.ts b/src/app/loans/loans-view/loans-view.component.ts index 7c18f9550..8a29573a6 100644 --- a/src/app/loans/loans-view/loans-view.component.ts +++ b/src/app/loans/loans-view/loans-view.component.ts @@ -147,6 +147,17 @@ export class LoansViewComponent implements OnInit { }); } + if (!this.loanDetailsData.chargedOff) { + // Charge-Off only when there is not Interest Recalculation and the Interest Rate is zero + if (!this.loanDetailsData.chargedOff && !this.loanDetailsData.isInterestRecalculationEnabled && this.loanDetailsData.interestRatePerPeriod === 0) { + this.buttonConfig.addButton({ + name: 'Charge-Off', + icon: 'coins', + taskPermissionName: 'CHARGEOFF_LOAN' + }); + } + } + } } @@ -187,6 +198,13 @@ export class LoansViewComponent implements OnInit { }); } + iconLoanStatusColor() { + if (this.loanDetailsData.chargedOff) { + return 'loanStatusType.chargeoff'; + } + return this.loanDetailsData.status.code; + } + /** * Delete loan Account */ diff --git a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html index 5991aa209..42aec7183 100644 --- a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html +++ b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html @@ -1,7 +1,8 @@
- Hide Accruals + Hide + Accruals @@ -12,76 +13,90 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -105,15 +120,18 @@ - + - - + + + +
Id {{ transaction.id }} Id {{ transaction.id }} + Office {{ transaction.officeName }} Office {{ + transaction.officeName }} External Id - - External Id + + Transaction Date {{ transaction.date | dateFormat }} Transaction Date {{ transaction.date | dateFormat }} Transaction Type {{ transaction.type.value }} Transaction Type {{ + transaction.type.value }} Amount {{ transaction.amount | formatNumber }} Amount {{ transaction.amount | formatNumber }} Breakdown {{ transaction.principalPortion | formatNumber }} Breakdown {{ transaction.principalPortion | formatNumber }} {{ transaction.interestPortion | formatNumber }} {{ transaction.interestPortion | formatNumber }} {{ transaction.feeChargesPortion | formatNumber }} {{ transaction.feeChargesPortion | formatNumber }} {{ transaction.penaltyChargesPortion | formatNumber }} {{ transaction.penaltyChargesPortion | formatNumber }} Loan Balance {{ transaction.outstandingLoanBalance | formatNumber }} Loan Balance {{ transaction.outstandingLoanBalance | formatNumber }} Actions - - - Actions + + + +
- +
diff --git a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.scss b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.scss index 4433e9c4d..eb3da1edc 100644 --- a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.scss +++ b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.scss @@ -32,6 +32,9 @@ .accrual { color: $msg-default; } + .chargeoff { + color: $status-chargeoff; + } } } diff --git a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts index a82401186..a598be1a4 100644 --- a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts +++ b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts @@ -4,6 +4,11 @@ import { FormControl } from '@angular/forms'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; +import { Dates } from 'app/core/utils/dates'; +import { LoansService } from 'app/loans/loans.service'; +import { MatDialog } from '@angular/material/dialog'; +import { SettingsService } from 'app/settings/settings.service'; +import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component'; @Component({ selector: 'mifosx-transactions-tab', @@ -32,7 +37,11 @@ export class TransactionsTabComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. */ constructor(private route: ActivatedRoute, - private router: Router) { + private dateUtils: Dates, + private router: Router, + private dialog: MatDialog, + private loansService: LoansService, + private settingsService: SettingsService) { this.route.parent.parent.data.subscribe((data: { loanDetailsData: any }) => { this.transactions = data.loanDetailsData.transactions; this.tempTransaction = data.loanDetailsData.transactions; @@ -42,6 +51,14 @@ export class TransactionsTabComponent implements OnInit { ngOnInit() { this.hideAccrualsParam = new FormControl(false); + this.setLoanTransactions(this.transactions); + } + + setLoanTransactions(transactions: any) { + this.transactions = transactions; + this.transactions.forEach((element: any) => { + element.date = this.dateUtils.parseDate(element.date); + }); this.dataSource = new MatTableDataSource(this.transactions); this.dataSource.paginator = this.paginator; this.dataSource.sort = this.sort; @@ -99,16 +116,26 @@ export class TransactionsTabComponent implements OnInit { } } - loanTransactionColor(loanTransaction: any): string { - if (loanTransaction.manuallyReversed) { + allowUndoTransaction(transaction: any) { + if (transaction.manuallyReversed) { + return false; + } + return ([27].includes(transaction.type.id)); + } + + loanTransactionColor(transaction: any): string { + if (transaction.manuallyReversed) { return 'strike'; } - if (loanTransaction.transactionRelations && loanTransaction.transactionRelations.length > 0) { + if (transaction.transactionRelations && transaction.transactionRelations.length > 0) { return 'linked'; } - if (this.isAccrual(loanTransaction.type)) { + if (this.isAccrual(transaction.type)) { return 'accrual'; } + if (this.isChargeOff(transaction.type)) { + return 'chargeoff'; + } return ''; } @@ -120,8 +147,59 @@ export class TransactionsTabComponent implements OnInit { $event.stopPropagation(); } + /** + * Stops the propagation to view pages. + * @param $event Mouse Event + */ + undoTransaction(transaction: any, $event: MouseEvent) { + $event.stopPropagation(); + const locale = this.settingsService.language.code; + const dateFormat = this.settingsService.dateFormat; + const loanId = this.route.parent.parent.snapshot.params['loanId']; + let command = 'undo'; + let operationDate = transaction.date; + let payload = {}; + if (this.isChargeOff(transaction.type)) { + command = 'undo-charge-off'; + operationDate = this.settingsService.businessDate; + } + payload = { + transactionDate: this.dateUtils.formatDate(operationDate && new Date(operationDate), dateFormat), + transactionAmount: 0, + dateFormat, + locale + }; + + const undoTransactionAccountDialogRef = this.dialog.open(ConfirmationDialogComponent, { + data: { heading: 'Undo Transaction', dialogContext: `Are you sure you want undo the transaction type ${transaction.type.value} with id ${transaction.id}` } + }); + undoTransactionAccountDialogRef.afterClosed().subscribe((response: { confirm: any }) => { + if (response.confirm) { + let transactionId = transaction.id; + if (this.isChargeOff(transaction.type)) { + transactionId = null; + } + this.loansService.executeLoansAccountTransactionsCommand(loanId, command, payload, transactionId).subscribe((responseCmd: any) => { + transaction.manuallyReversed = true; + this.reload(); + }); + } + }); + } + private isAccrual(transactionType: any): boolean { return (transactionType.accrual || transactionType.code === 'loanTransactionType.overdueCharge'); } + private isChargeOff(transactionType: any): boolean { + return (transactionType.chargeoff || transactionType.code === 'loanTransactionType.chargeOff'); + } + + private reload() { + const clientId = this.route.parent.parent.snapshot.params['clientId']; + const loanId = this.route.parent.parent.snapshot.params['loanId']; + const url: string = this.router.url; + this.router.navigateByUrl(`/clients/${clientId}/loans-accounts`, { skipLocationChange: true }) + .then(() => this.router.navigate([url])); + } } diff --git a/src/app/loans/loans.module.ts b/src/app/loans/loans.module.ts index af3ac3e15..10edfbf75 100644 --- a/src/app/loans/loans.module.ts +++ b/src/app/loans/loans.module.ts @@ -74,6 +74,7 @@ import { DisburseToSavingsAccountComponent } from './loans-view/loan-account-act import { LoansAccountDatatableStepComponent } from './loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component'; import { RescheduleLoanTabComponent } from './loans-view/reschedule-loan-tab/reschedule-loan-tab.component'; import { AdjustLoanChargeComponent } from './loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component'; +import { ChargeOffComponent } from './loans-view/loan-account-actions/charge-off/charge-off.component'; /** * Loans Module @@ -146,7 +147,8 @@ import { AdjustLoanChargeComponent } from './loans-view/loan-account-actions/adj DisburseToSavingsAccountComponent, LoansAccountDatatableStepComponent, RescheduleLoanTabComponent, - AdjustLoanChargeComponent + AdjustLoanChargeComponent, + ChargeOffComponent ], providers: [ ], }) diff --git a/src/app/loans/loans.service.ts b/src/app/loans/loans.service.ts index 75a69d3f1..37b6d2725 100644 --- a/src/app/loans/loans.service.ts +++ b/src/app/loans/loans.service.ts @@ -589,7 +589,6 @@ export class LoansService { delete loansAccountData.principalAmount; return loansAccountData; - } } diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html b/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html index 6f22d869a..3fa0f591b 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html @@ -20,8 +20,8 @@ Previous
diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.html b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.html index c537f2477..cb9dfc259 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.html +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.html @@ -59,7 +59,7 @@ Previous
diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html index db68e71bb..c152711e4 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html @@ -113,8 +113,8 @@ Previous diff --git a/src/app/pipes/status-lookup.pipe.ts b/src/app/pipes/status-lookup.pipe.ts index c544a7ec9..f150c99a3 100644 --- a/src/app/pipes/status-lookup.pipe.ts +++ b/src/app/pipes/status-lookup.pipe.ts @@ -16,6 +16,7 @@ export class StatusLookupPipe implements PipeTransform { 'loanStatusType.approved': 'status-approved', 'loanStatusType.active': 'status-active', 'loanStatusType.overpaid': 'status-overpaid', + 'loanStatusType.chargeoff': 'status-chargeoff', 'savingsAccountStatusType.submitted.and.pending.approval': 'status-pending', 'savingsAccountStatusType.approved': 'status-approved', 'savingsAccountStatusType.active': 'status-active', diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html index 28615a715..2088038d8 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html @@ -245,8 +245,8 @@ Previous diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html index 8cb737e9f..55c491681 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html @@ -68,7 +68,7 @@ Previous diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html index 57d502b7f..f86f33d83 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html @@ -38,8 +38,8 @@ Previous diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html index 57d702661..41a8b270e 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html @@ -34,8 +34,8 @@ Previous diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html index 1dd25c40f..aca34c640 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html @@ -221,8 +221,8 @@ Previous diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html index a73a1032a..2815423fb 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html @@ -97,7 +97,7 @@ - Is Withhold Tax Applicable? + Is Withhold Tax Applicable? @@ -120,8 +120,8 @@ Previous diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html index 453a63697..5f388634a 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html @@ -19,7 +19,7 @@ Maximum - + @@ -81,8 +81,8 @@ Previous diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html index 69dc25cc4..c55d8b113 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html @@ -429,8 +429,8 @@ Previous diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html index db6d2045a..de7da0911 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html @@ -134,7 +134,7 @@ Previous diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html index 3391cf82f..fef4eeb37 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html @@ -46,8 +46,8 @@ Previous diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html index 83424e74b..7e0b49cc4 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html @@ -58,8 +58,8 @@ Previous diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html index ba62bc3de..14bb8fb3b 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html @@ -466,8 +466,8 @@ Previous diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html index 82c219715..c7f629138 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html @@ -396,8 +396,8 @@ Previous diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html index b29f6a549..44505d55a 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html @@ -256,8 +256,8 @@ Previous diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html index b7df35dcc..f43ce2577 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html @@ -70,7 +70,7 @@ Previous diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html index ce060326a..0d1cbcf7e 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html @@ -38,8 +38,8 @@ Previous diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html index 2cd2ba81b..3ed3a3ed8 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html @@ -34,8 +34,8 @@ Previous diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html index d9fd9a4e1..5333c8aa2 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html @@ -61,7 +61,7 @@
-

It's required to add at least one Slab

+

It's required to add at least one Slab

@@ -221,8 +221,8 @@ Previous diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html index 30ccd71a2..153259baf 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html @@ -134,8 +134,8 @@ Previous diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html index 440c6e0a2..487e4e5b2 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html @@ -80,8 +80,8 @@ Previous diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html index 9482badda..d2a90391c 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html @@ -293,8 +293,8 @@ Previous diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html index 8cb737e9f..55c491681 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html @@ -68,7 +68,7 @@ Previous diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html index 7d4254799..42568b8fb 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html @@ -38,8 +38,8 @@ Previous diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.html index 9d473ba6e..fa36dee7c 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.html @@ -31,8 +31,8 @@ Previous diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html index c0819b1c7..1263cc5f6 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html @@ -127,8 +127,8 @@ Previous diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html index 4eb47eade..f13bf2a21 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html @@ -68,8 +68,8 @@ Previous diff --git a/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html index 06e7a988d..acaabd704 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html @@ -84,8 +84,8 @@ Previous diff --git a/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html index 8cb737e9f..55c491681 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html @@ -68,7 +68,7 @@ Previous diff --git a/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html index b960ae8a1..995a1f6f6 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html @@ -38,8 +38,8 @@ Previous diff --git a/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.html index b6233297f..5e9fe0b4e 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.html @@ -31,8 +31,8 @@ Previous diff --git a/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html index 87a682a42..7c6c94e26 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html @@ -50,7 +50,7 @@ Previous diff --git a/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html index 8a6acd98a..849f6b75d 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html @@ -66,8 +66,8 @@ Previous diff --git a/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.html index 59951584c..831985d75 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.html @@ -42,8 +42,8 @@ Previous diff --git a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html index 4663f6da6..ab01ac016 100644 --- a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html @@ -138,7 +138,7 @@ Previous diff --git a/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html b/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html index 1df8df860..74203964b 100644 --- a/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html @@ -47,8 +47,8 @@ Previous diff --git a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html index 782002ad9..216f148e5 100644 --- a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html @@ -144,8 +144,8 @@ Previous diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 32baa1789..49dac83a9 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -35,6 +35,7 @@ import { DirectivesModule } from 'app/directives/directives.module'; import { EntityDatatableTabComponent } from './tabs/entity-datatable-tab/entity-datatable-tab.component'; import { DatatableSingleRowComponent } from './tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component'; import { DatatableMultiRowComponent } from './tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component'; +import { SvgIconComponent } from './svg-icon/svg-icon.component'; /** * Shared Module @@ -75,7 +76,8 @@ import { DatatableMultiRowComponent } from './tabs/entity-datatable-tab/datatabl EntityDocumentsTabComponent, EntityDatatableTabComponent, DatatableSingleRowComponent, - DatatableMultiRowComponent + DatatableMultiRowComponent, + SvgIconComponent ], exports: [ FileUploadComponent, @@ -96,7 +98,8 @@ import { DatatableMultiRowComponent } from './tabs/entity-datatable-tab/datatabl ExternalIdentifierComponent, EntityNotesTabComponent, EntityDocumentsTabComponent, - EntityDatatableTabComponent + EntityDatatableTabComponent, + SvgIconComponent ] }) export class SharedModule { } diff --git a/src/app/shared/svg-icon/svg-icon.component.html b/src/app/shared/svg-icon/svg-icon.component.html new file mode 100644 index 000000000..40ff1692b --- /dev/null +++ b/src/app/shared/svg-icon/svg-icon.component.html @@ -0,0 +1,3 @@ + + + diff --git a/src/app/shared/svg-icon/svg-icon.component.scss b/src/app/shared/svg-icon/svg-icon.component.scss new file mode 100644 index 000000000..24051934f --- /dev/null +++ b/src/app/shared/svg-icon/svg-icon.component.scss @@ -0,0 +1,9 @@ +@import "assets/styles/helper"; + +.icon { + flex: 1; +} + +.chargeoff { + color: #ffa726; +} diff --git a/src/app/shared/svg-icon/svg-icon.component.spec.ts b/src/app/shared/svg-icon/svg-icon.component.spec.ts new file mode 100644 index 000000000..f4276b578 --- /dev/null +++ b/src/app/shared/svg-icon/svg-icon.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SvgIconComponent } from './svg-icon.component'; + +describe('SvgIconComponent', () => { + let component: SvgIconComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ SvgIconComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(SvgIconComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/svg-icon/svg-icon.component.ts b/src/app/shared/svg-icon/svg-icon.component.ts new file mode 100644 index 000000000..8c041cc90 --- /dev/null +++ b/src/app/shared/svg-icon/svg-icon.component.ts @@ -0,0 +1,19 @@ +import { Component, Input, OnInit } from '@angular/core'; + +@Component({ + selector: 'mifosx-svg-icon', + templateUrl: './svg-icon.component.html', + styleUrls: ['./svg-icon.component.scss'] +}) +export class SvgIconComponent implements OnInit { + @Input() iconFile: string; + @Input() iconName: string; + @Input() iconClass: string; + @Input() iconWidth: string; + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html index b2fd82acf..3f25e6a83 100644 --- a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html @@ -71,7 +71,7 @@ Previous diff --git a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html index 2854dd0a4..241d0e42a 100644 --- a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html @@ -38,8 +38,8 @@ Previous diff --git a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html index e658c48a8..8eab76305 100644 --- a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html @@ -97,8 +97,8 @@ Previous diff --git a/src/assets/images/icons_account_placeholder.svg b/src/assets/images/icons_account_placeholder.svg new file mode 100644 index 000000000..841657a2a --- /dev/null +++ b/src/assets/images/icons_account_placeholder.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/images/loans_account_placeholder.png b/src/assets/images/loans_account_placeholder.png deleted file mode 100644 index 69a204969d928c9b6f82e6a54b87315d82a56a0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2730 zcmZ`*cQ_mB8x4tFr8P^?O09|=BWUf4T}q9Jd9QV~m$=uc5m6K+YR0-zZK+a~)ZV!< zf*6-pCmJhS6s2v_TEFQ1_x_&e`_B74=bY!f-}~R2dBxFMkY9=)000QuAS_+jb@=%5 zaiR1iO>TJzkx-0c~0!*``d zt7D}`y9ej{FfkJy%>8KQd>r`hd7J$II;dwHLGJ?#O2tKv2 zJ4%~&K$X2cNmg6d=y#11W+Cb%OudR)um#wa0nY&w?r7CvNFFW{PIR8do85fefHlh8 zLmrl21#e+9sBxg!-^ah(rF{bu6c78%9K?PxW!1;HHn^L4rNs?sT*jr?GrTDyc8`m- z=zmNXLEO!_$+|2xe3&F8A=%LrSHX1#@CvwoVs{boD8ConA)x&oKY(d-9q}$xp|0_x zbr&}F3o@w@o0=N=KR))8L7@`MBIH3bUKvALsOMEu65>(^$lftl?3&a~HYgiST z2&b~}LEzUi212pwl-I>eai<;pr6P1fvm&L5zfnki;_XTl1Gyoc%?lCG(9uZwssxn= ztL}J5btmI%IrkcP_0J7Lhd>MIj}HfwMAn}hrYOeDezHf9`*1n!SaOwL%0u& z*E75Y(+^ARnmSWkG=w$E=pqv2jdLD8`AF_f6)AWn+^ft|-R7b5(?#jRe$v+tQVZVX zQB6v%VuJ&=60=zX>#6+IN+9&fc9R_Ugrc!{$h1EnL$fsS!kCrJ7wbihIyGC_J=3+n z?ski@V4;^x92i>r&}rnmQy8;@hGmkz;^Bj2mzCuFC>QE}2J6m8C57CBA`sQFNZNM7 zMn+pOwt`I}6>>4xQUV{1J;~p7vF@&f34FYxkb88?lIm0hv7NA!iR2CypRQ8Ktz4Y7 z8};@@`>bWe+ce!BC3s8o+^~nGi+W}Wjcw*QAlmLuJT}0+6TvA&e|w^-pF=D>nxA!# zglZ@ylo$WtZjk)$IM@+tDP#9G?Mv&qp)V)todZjC<+St?{N;bDAEFSeGm`Icse4+* z3bIR@9bH4+F!Mw6w`tAb*S!o$eIA_Bd{bQDFMKz6UI~!oqKS30cCo|esNYWC@ab&D zYT-u|Pca^fODoM^edCUQFLEiBx^s=bDwxxwjI^%E^$NLIhPt8;)RCX`SE3xq!})hM zhohWn;r6?C*4~qOAd`U(lpZMuObL@@D#J9~*=NWABsj{g2$S=vMv~=a{XFuyzG?+a z8pBzh=CNeTSVq)a>`wgCSK~gXs14#?_-?M!F&D~`#e1<(pFKU;rpJ<-UCvZ*K|~DD z+U2M}K?JEA?iQ6T#UYf}Cu)UpQ$Ob&t(~2NXtJ8kdJ{2B3QgV5-2c@B_4K?kqN`3$ z5&XQ#BHJ4BAz?@2p1rt8t95NaTk29r&!PwHK2H8`+!>i)VWMGxC0%2x@fsHop{4t6P zK~McL$VTgZ4H;R=T(xC8MC0Xs!>$FA1?$z?vvX7-d*{=*Q-YY&MpxdA4-{^cxt#m+ad`FJ3nL z*0^sw$UH|W>c8U|7cPLk8rg;t47H%x49A^dUdalSmis)a$C)&^M(rqxfakc7V+$U-MN%smTO_8%F8V+;Yt)Pws@CA9e)GHMFr=nQ9I4x^>xH zOH2L8LAmaqaBlM7IpZ}7Q0s0eWY)FFLS)6Dh4iL5btR+H*Zn5XV#s}Pa6a>N>5wN5 zRtnH-+`jbUSNLfnI5f)iW6XU*DcR)o*)6m2fK6cr%*DZ!{(54d9RlZKRK6i!R97Mw^>obm6 z|BMsCQ=Yh>T~SRuEB7-A%=d)^7UGQ2D>34Aa_$y3NQL2(kT}o}4_utHPe=5>24E)> zgr?=0`qH${8XI@2LajLy)v3wbFL3Hac0vyrNa>Y((5q8${J(t@8s9s??66{mq(ta# zEiU*i0ts9be*7eXheQX^l2?Uk{`O}7Nx=X5|K^VRe?gr=27VxMEn`IN_p~{@1vX44)s&9Po%N46aeB_$ z5-iYM91C^5Ln0;{-3|XyFW+;P$=L=DYni<>i>{qPYy3g0x<>1Ht#;c>jhXVVF#l6X zpjEw;f*dWfxrSDW0km?x-Z6HyiVvV`#ol@dv-J=pdpfUb2ll{We?{&{^rLHAUXsy> zG&I}FPCvGOMT-rfL(VTNXRQ1)9MXBV*aA{LlHzePr=o^G01nG9`zhF>*m-%yJ1!#Z zf?o@;qE$_l948S5*l^<*82<2w<~qs2B(O^rsY-mx(q zdzHrPSOM%K&kj)$vI9Ao_t*TJ*QJPpL?hxwV$%Eq;y-u1{PWdJ-we5X$OpSg+3Xz@ NU}NQI`PAGm<$tzXBf