From 3c858e308ca9b612554615425ef90fb90506ef43 Mon Sep 17 00:00:00 2001 From: Muskan Khedia <36980003+muskankhedia@users.noreply.github.com> Date: Sun, 30 Aug 2020 19:50:58 +0530 Subject: [PATCH] refactor: loans module (#1237) --- .../make-account-transfers.component.html | 2 +- .../make-account-transfers.component.ts | 2 +- src/app/clients/clients-routing.module.ts | 3 +- .../clients-view/clients-view.component.html | 2 +- .../general-tab/general-tab.component.html | 12 +- .../general-tab/general-tab.component.ts | 2 +- ...individual-collection-sheet.component.html | 2 +- src/app/groups/groups-routing.module.ts | 3 +- .../general-tab/general-tab.component.html | 4 +- .../loan-action-button.resolver.ts | 32 +- .../common-resolvers/loan-details.resolver.ts | 2 +- ...ans-confirmation-dialog-box.component.html | 8 - ...ans-confirmation-dialog-box.component.scss | 0 ...-confirmation-dialog-box.component.spec.ts | 25 -- ...loans-confirmation-dialog-box.component.ts | 22 -- src/app/loans/loans-routing.module.ts | 152 ++++---- .../charges-tab/charges-tab.component.ts | 6 +- .../floating-interest-rates.component.ts | 4 +- .../add-collateral.component.html | 70 ++-- .../add-loan-charge.component.html | 102 +++--- .../add-loan-charge.component.scss | 3 + .../add-loan-charge.component.ts | 2 +- .../approve-loan/approve-loan.component.html | 90 ++--- .../approve-loan/approve-loan.component.ts | 2 +- .../assign-loan-officer.component.html | 66 ++-- .../assign-loan-officer.component.scss | 3 + .../assign-loan-officer.component.ts | 2 +- .../close-as-rescheduled.component.html | 52 +-- .../close-as-rescheduled.component.scss | 3 + .../create-guarantor.component.html | 261 +++++++------- .../disburse-loan-account.component.html | 92 ++--- .../disburse-loan-account.component.scss | 3 + .../disburse/disburse.component.html | 158 ++++---- .../disburse/disburse.component.scss | 4 + .../foreclosure/foreclosure.component.html | 92 ++--- .../foreclosure/foreclosure.component.scss | 3 + .../loan-account-actions.component.html | 48 ++- .../loan-account-actions.component.scss | 3 - .../loan-account-actions.component.ts | 94 ++--- .../loan-reschedule.component.html | 144 ++++---- .../loan-reschedule.component.scss | 3 + .../loan-reschedule.component.ts | 2 +- .../loan-screen-reports.component.html | 2 +- .../loans-account-close.component.html | 52 +-- .../loans-account-close.component.scss | 3 + .../make-repayment.component.html | 158 ++++---- .../make-repayment.component.scss | 4 + .../prepay-loan/prepay-loan.component.html | 180 +++++----- .../prepay-loan/prepay-loan.component.scss | 4 + .../recovery-repayment.component.html | 160 +++++---- .../recovery-repayment.component.scss | 4 + .../reject-loan/reject-loan.component.html | 52 +-- .../undo-approval.component.html | 19 +- .../undo-approval.component.scss | 3 + .../undo-disbursal.component.html | 19 +- .../undo-disbursal.component.scss | 3 + .../view-guarantors.component.html | 338 +++++++++--------- .../view-guarantors.component.scss | 4 + .../view-guarantors.component.ts | 2 +- .../waive-interest.component.html | 70 ++-- .../waive-interest.component.scss | 3 + .../withdrawn-by-client.component.html | 52 +-- .../withdrawn-by-client.component.scss | 3 + .../write-off-page.component.html | 66 ++-- .../write-off-page.component.scss | 3 + .../loan-collateral-tab.component.ts | 4 +- .../loan-documents-tab.component.ts | 4 +- .../loan-tranche-details.component.ts | 4 +- .../loans/loans-view/loans-view.component.ts | 5 +- .../original-schedule-tab.component.ts | 4 +- .../repayment-schedule-tab.component.ts | 4 +- .../transactions-tab.component.html | 2 +- .../transactions-tab.component.ts | 8 +- .../export-transactions.component.ts | 4 +- .../view-reciept/view-reciept.component.html | 2 +- .../view-transaction.component.scss | 1 - .../view-charge/view-charge.component.ts | 4 +- src/app/loans/loans.module.ts | 2 - .../notifications-page.component.ts | 2 +- .../search-page/search-page.component.ts | 2 +- .../notifications-tray.component.ts | 2 +- .../loan-approval.component.html | 2 +- .../loan-disbursal.component.html | 4 +- 83 files changed, 1480 insertions(+), 1369 deletions(-) delete mode 100644 src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.html delete mode 100644 src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.scss delete mode 100644 src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.spec.ts delete mode 100644 src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.ts diff --git a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html index 10e72305c..23757f073 100644 --- a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html +++ b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html @@ -131,7 +131,7 @@ - + diff --git a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts index 76cc356d3..3a2785766 100644 --- a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts +++ b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts @@ -186,7 +186,7 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit { fromOfficeId: this.accountTransferTemplateData.fromClient.officeId }; this.accountTransfersService.createAccountTransfer(makeAccountTransferData).subscribe(() => { - this.router.navigate(['../../'], { relativeTo: this.route }); + this.router.navigate(['../../general'], { relativeTo: this.route }); }); } diff --git a/src/app/clients/clients-routing.module.ts b/src/app/clients/clients-routing.module.ts index 4e34e12fb..5e154b13c 100644 --- a/src/app/clients/clients-routing.module.ts +++ b/src/app/clients/clients-routing.module.ts @@ -229,8 +229,7 @@ const routes: Routes = [ ] }, { - path: 'loans', - data: { title: extract('Loans'), breadcrumb: 'loans', routeParamBreadcrumb: false }, + path: 'loans-accounts', loadChildren: () => import('../loans/loans.module').then(m => m.LoansModule) }, { diff --git a/src/app/clients/clients-view/clients-view.component.html b/src/app/clients/clients-view/clients-view.component.html index 081f63cf9..eed7ba1b3 100644 --- a/src/app/clients/clients-view/clients-view.component.html +++ b/src/app/clients/clients-view/clients-view.component.html @@ -62,7 +62,7 @@ - + diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.html b/src/app/clients/clients-view/general-tab/general-tab.component.html index 97d8ac985..e4d489322 100644 --- a/src/app/clients/clients-view/general-tab/general-tab.component.html +++ b/src/app/clients/clients-view/general-tab/general-tab.component.html @@ -82,7 +82,7 @@ - +
@@ -137,20 +137,20 @@ Actions @@ -166,7 +166,7 @@ + [routerLink]="['../', 'loans-accounts', row.id, 'general']" class="select-row"> @@ -215,7 +215,7 @@ + [routerLink]="['../', 'loans-accounts', row.id, 'general']" class="select-row"> diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.ts b/src/app/clients/clients-view/general-tab/general-tab.component.ts index c3a042e2b..21b07fced 100644 --- a/src/app/clients/clients-view/general-tab/general-tab.component.ts +++ b/src/app/clients/clients-view/general-tab/general-tab.component.ts @@ -148,7 +148,7 @@ export class GeneralTabComponent { */ routeTransferFund(loanId: any) { const queryParams: any = { loanId: loanId, accountType: 'fromloans' }; - this.router.navigate(['../', 'loans', loanId, 'transfer-funds', 'make-account-transfer'], { relativeTo: this.route, queryParams: queryParams }); + this.router.navigate(['../', 'loans-accounts', loanId, 'transfer-funds', 'make-account-transfer'], { relativeTo: this.route, queryParams: queryParams }); } } diff --git a/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html b/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html index f36520529..f7cc51415 100644 --- a/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html +++ b/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html @@ -104,7 +104,7 @@ Actions - + diff --git a/src/app/groups/groups-routing.module.ts b/src/app/groups/groups-routing.module.ts index ada35628a..3a8978b71 100644 --- a/src/app/groups/groups-routing.module.ts +++ b/src/app/groups/groups-routing.module.ts @@ -134,8 +134,7 @@ const routes: Routes = [ } }, { - path: 'loans', - data: { title: extract('Loans'), breadcrumb: 'loans', routeParamBreadcrumb: false }, + path: 'loans-accounts', loadChildren: () => import('../loans/loans.module').then(m => m.LoansModule) }, { diff --git a/src/app/groups/groups-view/general-tab/general-tab.component.html b/src/app/groups/groups-view/general-tab/general-tab.component.html index 99139b457..20f8b76de 100644 --- a/src/app/groups/groups-view/general-tab/general-tab.component.html +++ b/src/app/groups/groups-view/general-tab/general-tab.component.html @@ -136,7 +136,7 @@ - + @@ -187,7 +187,7 @@ - + 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 6d999769b..2707c64ea 100644 --- a/src/app/loans/common-resolvers/loan-action-button.resolver.ts +++ b/src/app/loans/common-resolvers/loan-action-button.resolver.ts @@ -26,39 +26,39 @@ export class LoanActionButtonResolver implements Resolve { resolve(route: ActivatedRouteSnapshot): Observable { const loanId = route.parent.paramMap.get('loanId'); const loanActionButton = route.paramMap.get('action'); - if (loanActionButton === 'assign-loan-officer' || loanActionButton === 'change-loan-officer') { + if (loanActionButton === 'Assign Loan Officer' || loanActionButton === 'Change Loan Officer') { return this.loansService.getLoanTemplate(loanId); // } else if (loanActionButton === 'make-repayment') { // return this.loansService.getLoanActionTemplate(loanId, 'repayment'); - } else if (loanActionButton === 'waive-interest') { + } else if (loanActionButton === 'Waive Interest') { return this.loansService.getLoanActionTemplate(loanId, 'waiveinterest'); - } else if (loanActionButton === 'write-off') { + } else if (loanActionButton === 'Write Off') { return this.loansService.getLoanActionTemplate(loanId, 'writeoff'); - } else if (loanActionButton === 'close') { + } else if (loanActionButton === 'Close') { return this.loansService.getLoanActionTemplate(loanId, 'close'); - } else if (loanActionButton === 'close-as-rescheduled') { + } else if (loanActionButton === 'Close (as Rescheduled)') { return this.loansService.getLoanActionTemplate(loanId, 'close-rescheduled'); - } else if (loanActionButton === 'reschedule') { + } else if (loanActionButton === 'Reschedule') { return this.loansService.rescheduleLoanTemplate(); - } else if (loanActionButton === 'prepay-loan') { + } else if (loanActionButton === 'Prepay Loan') { return this.loansService.getLoanActionTemplate(loanId, 'prepayLoan'); - } else if (loanActionButton === 'add-collateral') { + } else if (loanActionButton === 'Add Collateral') { return this.loansService.getLoanCollateralTemplate(loanId); - } else if (loanActionButton === 'disburse-to-savings') { + } else if (loanActionButton === 'Disburse to Savings') { return this.loansService.getLoanActionTemplate(loanId, 'disburseToSavings'); - } else if (loanActionButton === 'recovery-payment') { + } else if (loanActionButton === 'Recovery Payment') { return this.loansService.getLoanActionTemplate(loanId, 'recoverypayment'); - } else if (loanActionButton === 'view-guarantors') { + } else if (loanActionButton === 'View Guarantors') { return this.loansService.getLoanAccountResource(loanId, 'guarantors'); - } else if (loanActionButton === 'create-guarantor') { + } else if (loanActionButton === 'Create Guarantor') { return this.loansService.getGuarantorTemplate(loanId); - } else if (loanActionButton === 'disburse') { + } else if (loanActionButton === 'Disburse') { return this.loansService.getLoanActionTemplate(loanId, 'disburse'); - } else if (loanActionButton === 'loan-screen-reports') { + } else if (loanActionButton === 'Loan Screen Reports') { return this.loansService.getLoanScreenReportsData(); - } else if (loanActionButton === 'approve') { + } else if (loanActionButton === 'Approve') { return this.loansService.getLoanApprovalTemplate(loanId); - } else if (loanActionButton === 'add-loan-charge') { + } else if (loanActionButton === 'Add Loan Charge') { return this.loansService.getLoanChargeTemplateResource(loanId); } else { return undefined; diff --git a/src/app/loans/common-resolvers/loan-details.resolver.ts b/src/app/loans/common-resolvers/loan-details.resolver.ts index 339e0c88c..8b365ef3a 100644 --- a/src/app/loans/common-resolvers/loan-details.resolver.ts +++ b/src/app/loans/common-resolvers/loan-details.resolver.ts @@ -24,7 +24,7 @@ export class LoanDetailsResolver implements Resolve { * @returns {Observable} */ resolve(route: ActivatedRouteSnapshot): Observable { - const loanId = route.paramMap.get('loanId') || route.parent.paramMap.get('loanId'); + const loanId = route.paramMap.get('loanId') || route.parent.paramMap.get('loanId') || route.parent.parent.paramMap.get('loanId'); return this.loansService.getLoanAccountAssociationDetails(loanId); } diff --git a/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.html b/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.html deleted file mode 100644 index 71e6ca6b0..000000000 --- a/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.html +++ /dev/null @@ -1,8 +0,0 @@ -

{{data.heading}}

-
-

{{ data.dialogContext }}

-
- - - - \ No newline at end of file diff --git a/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.scss b/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.spec.ts b/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.spec.ts deleted file mode 100644 index 052b07604..000000000 --- a/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { LoansConfirmationDialogBoxComponent } from './loans-confirmation-dialog-box.component'; - -describe('LoansConfirmationDialogBoxComponent', () => { - let component: LoansConfirmationDialogBoxComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ LoansConfirmationDialogBoxComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(LoansConfirmationDialogBoxComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.ts b/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.ts deleted file mode 100644 index 8bd1c3260..000000000 --- a/src/app/loans/custom-dialog/loans-confirmation-dialog-box/loans-confirmation-dialog-box.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component'; - -@Component({ - selector: 'mifosx-loans-confirmation-dialog-box', - templateUrl: './loans-confirmation-dialog-box.component.html', - styleUrls: ['./loans-confirmation-dialog-box.component.scss'] -}) -export class LoansConfirmationDialogBoxComponent implements OnInit { - - /** - * @param {MatDialogRef} dialogRef Component reference to dialog. - * @param {any} data Provides a confirmation for all the loans account actions. - */ - constructor(public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any) { } - - ngOnInit() { - } - -} diff --git a/src/app/loans/loans-routing.module.ts b/src/app/loans/loans-routing.module.ts index b92b077b9..0e25262c4 100644 --- a/src/app/loans/loans-routing.module.ts +++ b/src/app/loans/loans-routing.module.ts @@ -33,7 +33,6 @@ import { ExportTransactionsComponent } from './loans-view/transactions/export-tr /** Custom Resolvers */ import { LoanDetailsResolver } from './common-resolvers/loan-details.resolver'; import { LoanNotesResolver } from './common-resolvers/loan-notes.resolver'; -import { LoanDetailsChargesResolver } from './common-resolvers/loan-details-charges.resolver'; import { LoanDatatablesResolver } from './common-resolvers/loan-datatables.resolver'; import { LoanDatatableResolver } from './common-resolvers/loan-datatable.resolver'; import { LoanActionButtonResolver } from './common-resolvers/loan-action-button.resolver'; @@ -49,10 +48,10 @@ import { LoansAccountTransactionTemplateResolver } from './common-resolvers/loan const routes: Routes = [ { path: '', - // Component to View All existing Loans Comes Here + data: { title: extract('Loans'), breadcrumb: 'Loans', routeParamBreadcrumb: false }, children: [ { - path: 'create-loans-account', + path: 'create', data: { title: extract('Create Loans Account'), breadcrumb: 'Create Loans Account' }, component: CreateLoansAccountComponent, resolve: { @@ -62,7 +61,6 @@ const routes: Routes = [ { path: ':loanId', data: { title: extract('Loan View'), routeParamBreadcrumb: 'loanId' }, - // Component For Loan View Comes Here children: [ { path: '', @@ -86,24 +84,15 @@ const routes: Routes = [ path: 'original-schedule', component: OriginalScheduleTabComponent, data: { title: extract('Original Schedule'), breadcrumb: 'Original Schedule', routeParamBreadcrumb: false }, - resolve: { - loanDetailsAssociationData: LoanDetailsChargesResolver - } }, { path: 'repayment-schedule', component: RepaymentScheduleTabComponent, data: { title: extract('Repayment Schedule'), breadcrumb: 'Repayment Schedule', routeParamBreadcrumb: false }, - resolve: { - loanDetailsAssociationData: LoanDetailsChargesResolver - } }, { path: 'transactions', data: { title: extract('Loans Account Transactions'), breadcrumb: 'Transactions', routeParamBreadcrumb: false }, - resolve: { - loanDetailsAssociationData: LoanDetailsChargesResolver - }, children: [ { path: '', @@ -113,35 +102,6 @@ const routes: Routes = [ { path: 'export', component: ExportTransactionsComponent - }, - { - path: ':id', - data: { routeParamBreadcrumb: 'id' }, - children: [ - { - path: '', - component: ViewTransactionComponent, - resolve: { - loansAccountTransaction: LoansAccountTransactionResolver - } - }, - { - path: 'edit', - component: EditTransactionComponent, - data: { breadcrumb: 'Edit', routeParamBreadcrumb: false }, - resolve: { - loansAccountTransactionTemplate: LoansAccountTransactionTemplateResolver - } - }, - { - path: 'reciept', - component: ViewRecieptComponent, - data: { breadcrumb: 'Reciept', routeParamBreadcrumb: false }, - resolve: { - loansTransactionReciept: LoansTransactionRecieptResolver - } - } - ] } ] }, @@ -149,17 +109,11 @@ const routes: Routes = [ path: 'loan-collateral', component: LoanCollateralTabComponent, data: { title: extract('Loan Collateral Details'), breadcrumb: 'Loan Collateral Details', routeParamBreadcrumb: false }, - resolve: { - loanDetailsAssociationData: LoanDetailsChargesResolver - } }, { path: 'loan-tranche-details', component: LoanTrancheDetailsComponent, data: { title: extract('Loan Tranche Details'), breadcrumb: 'Loan Tranche Details', routeParamBreadcrumb: false }, - resolve: { - loanDetailsAssociationData: LoanDetailsChargesResolver - } }, { path: 'overdue-charges', @@ -170,38 +124,18 @@ const routes: Routes = [ path: 'floating-interest-rates', component: FloatingInterestRatesComponent, data: { title: extract('Floating Interest Rates'), breadcrumb: 'Floating Interest Rates', routeParamBreadcrumb: false }, - resolve: { - loanDetailsAssociationData: LoanDetailsChargesResolver - } }, { path: 'charges', data: { title: extract('Loans Account Charges'), breadcrumb: 'Charges', routeParamBreadcrumb: false }, - children: [ - { - path: '', - component: ChargesTabComponent, - resolve: { - loanDetailsAssociationData: LoanDetailsChargesResolver - } - }, - { - path: ':id', - data: { routeParamBreadcrumb: 'id' }, - component: ViewChargeComponent, - resolve: { - loansAccountCharge: LoansAccountChargeResolver - } - } - ] + component: ChargesTabComponent, }, { path: 'loan-documents', component: LoanDocumentsTabComponent, data: { title: extract('Loan Documents'), breadcrumb: 'Loan Documents', routeParamBreadcrumb: false }, resolve: { - loanDocuments: LoanDocumentsResolver, - loanDetailsData: LoanDetailsResolver + loanDocuments: LoanDocumentsResolver }, }, { @@ -228,20 +162,81 @@ const routes: Routes = [ } }] }, + ], + }, + { + path: 'transactions', + data: { title: extract('Loans Account Transactions'), breadcrumb: 'Transactions', routeParamBreadcrumb: false }, + resolve: { + loanDetailsAssociationData: LoanDetailsResolver + }, + children: [ { - path: 'actions/:action', - component: LoanAccountActionsComponent, - data: { title: extract('Loan Account Actions'), routeParamBreadcrumb: 'action' }, - resolve: { - actionButtonData: LoanActionButtonResolver - } + path: '', + redirectTo: '../transactions', pathMatch: 'prefix' }, { - path: 'transfer-funds', - loadChildren: () => import('../account-transfers/account-transfers.module').then(m => m.AccountTransfersModule) + path: ':id', + data: { routeParamBreadcrumb: 'id' }, + children: [ + { + path: '', + component: ViewTransactionComponent, + resolve: { + loansAccountTransaction: LoansAccountTransactionResolver + } + }, + { + path: 'edit', + component: EditTransactionComponent, + data: { breadcrumb: 'Edit', routeParamBreadcrumb: false }, + resolve: { + loansAccountTransactionTemplate: LoansAccountTransactionTemplateResolver + } + }, + { + path: 'reciept', + component: ViewRecieptComponent, + data: { breadcrumb: 'Reciept', routeParamBreadcrumb: false }, + resolve: { + loansTransactionReciept: LoansTransactionRecieptResolver + } + } + ] } ] }, + { + path: 'charges', + data: { title: extract('Loans Account Charges'), breadcrumb: 'Charges', routeParamBreadcrumb: false }, + children: [ + { + path: '', + redirectTo: '../charges', pathMatch: 'prefix' + }, + { + path: ':id', + data: { routeParamBreadcrumb: 'id' }, + component: ViewChargeComponent, + resolve: { + loansAccountCharge: LoansAccountChargeResolver, + loanDetailsData: LoanDetailsResolver + } + } + ] + }, + { + path: 'actions/:action', + component: LoanAccountActionsComponent, + data: { title: extract('Loan Account Actions'), routeParamBreadcrumb: 'action' }, + resolve: { + actionButtonData: LoanActionButtonResolver + } + }, + { + path: 'transfer-funds', + loadChildren: () => import('../account-transfers/account-transfers.module').then(m => m.AccountTransfersModule) + }, { path: 'edit-loans-account', data: { title: extract('Edit Loans Account'), breadcrumb: 'Edit Loans Account', routeParamBreadcrumb: 'Edit' }, @@ -261,7 +256,6 @@ const routes: Routes = [ providers: [ LoanDetailsResolver, LoanNotesResolver, - LoanDetailsChargesResolver, LoanDatatablesResolver, LoanDatatableResolver, LoanActionButtonResolver, diff --git a/src/app/loans/loans-view/charges-tab/charges-tab.component.ts b/src/app/loans/loans-view/charges-tab/charges-tab.component.ts index e0032364e..a56aa27e5 100644 --- a/src/app/loans/loans-view/charges-tab/charges-tab.component.ts +++ b/src/app/loans/loans-view/charges-tab/charges-tab.component.ts @@ -52,8 +52,8 @@ export class ChargesTabComponent implements OnInit { private datePipe: DatePipe, private router: Router, public dialog: MatDialog) { - this.route.data.subscribe(( data: { loanDetailsAssociationData: any }) => { - this.loanDetails = data.loanDetailsAssociationData; + this.route.parent.data.subscribe(( data: { loanDetailsData: any }) => { + this.loanDetails = data.loanDetailsData; }); } @@ -206,7 +206,7 @@ export class ChargesTabComponent implements OnInit { private reload() { const clientId = this.loanDetails.clientId; const url: string = this.router.url; - this.router.navigateByUrl(`/clients/${clientId}/loans`, { skipLocationChange: true }) + this.router.navigateByUrl(`/clients/${clientId}/loans-accounts`, { skipLocationChange: true }) .then(() => this.router.navigate([url])); } diff --git a/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts b/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts index c3519536e..c9bd5a432 100644 --- a/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts +++ b/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts @@ -20,8 +20,8 @@ export class FloatingInterestRatesComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. */ constructor(private route: ActivatedRoute) { - this.route.data.subscribe(( data: { loanDetailsAssociationData: any }) => { - this.loanDetails = data.loanDetailsAssociationData; + this.route.parent.data.subscribe(( data: { loanDetailsData: any }) => { + this.loanDetails = data.loanDetailsData; }); } diff --git a/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html b/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html index fc226102b..d563e5662 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html +++ b/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html @@ -1,44 +1,50 @@
-
+ - + -
+ - - Collateral Type - - {{ collateral.name }} - - - Collateral type required - - +
- - Value - - - Value is required - - + + Collateral Type + + + {{ collateral.name }} + + + Collateral type required + + - - Description - - - + + Value + + + Value is required + + -
+ + Description + + - - - - -
+
+ + + + + + +
+ + + +
- -
diff --git a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html index a87f96b61..637ffdc5b 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html +++ b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html @@ -1,55 +1,65 @@ -
+
- + -
- - Charge - - - {{ loanCharge.name + ' (' + loanCharge?.currency.name + ')' }} - - - - Charge is required - - + - - Amount - - - Amount is required - - + - - Charge Calculation - - +
+ + Charge + + + {{ loanCharge.name + ' (' + loanCharge?.currency.name + ')' }} + + + + Charge is required + + - - Charge Time - - + + Amount + + + Amount is required + + - - Due On - - - - - Due Date is required - - + + Charge Calculation + + -
+ + Charge Time + + - - - - + + Due On + + + + + Due Date is required + + -
- \ No newline at end of file +
+ + + + + + +
+ + + + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.scss b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts index d4b3cf1fb..c7e5961dc 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts @@ -105,7 +105,7 @@ export class AddLoanChargeComponent implements OnInit { loanCharge.locale = 'en'; loanCharge.dateFormat = dateFormat; this.loansService.createLoanCharge(this.loanId, 'charges', loanCharge).subscribe(res => { - this.router.navigate(['../../'], { relativeTo: this.route }); + this.router.navigate(['../../general'], { relativeTo: this.route }); }); } } diff --git a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html index a1dc7dd80..f75c85b8f 100644 --- a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html +++ b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html @@ -1,58 +1,62 @@
-
+ - + -
+ - - Approved On - - - - - Approved Date is required - - +
- - Expected disbursement on - - - - + + Approved On + + + + + Approved Date is required + + - - Approved Amount - - + + Expected disbursement on + + + + - - Transaction Amount - - - Transaction Amount is required - - + + Approved Amount + + - - Note - - + + Transaction Amount + + + Transaction Amount is required + + -
+ + Note + + - - - - +
-
+ + + + - + + + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts index 863329d8e..799bf1e3e 100644 --- a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts @@ -88,7 +88,7 @@ export class ApproveLoanComponent implements OnInit { local }; this.loanService.loanActionButtons(this.loanId, 'approve', approveLoanFormData).subscribe((response: any) => { - this.router.navigate(['../../'], { relativeTo: this.route }); + this.router.navigate(['../../general'], { relativeTo: this.route }); }); } diff --git a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html index 001bb977c..190d7adf2 100644 --- a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html +++ b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html @@ -1,42 +1,48 @@
-
+ - + -
+ - - To Loan Officer - - - {{ loanOfficer.displayName }} - - - - Loan Officer is required - - +
- - Assignment Date - - - - - Assignment Date is required - - + + To Loan Officer + + + {{ loanOfficer.displayName }} + + + + Loan Officer is required + + -
+ + Assignment Date + + + + + Assignment Date is required + + - - - - +
-
+ + + + - + + + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.scss b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts index 6599ed61b..6618fcb8e 100644 --- a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts @@ -68,7 +68,7 @@ export class AssignLoanOfficerComponent implements OnInit { this.loanService.loanActionButtons(this.loanId, 'assignLoanOfficer', assignForm) .subscribe((response: any) => { - this.router.navigate([`../../${this.loanId}/general`], { relativeTo: this.route }); + this.router.navigate([`../../general`], { relativeTo: this.route }); }); } diff --git a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html index 869e73892..7fd26c76d 100644 --- a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html +++ b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html @@ -1,35 +1,41 @@
-
+ - + -
+ - - Closed On - - - - - Closed Date is required - - +
- - Note - - + + Closed On + + + + + Closed Date is required + + -
+ + Note + + - - - - +
-
+ + + + - + + + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.scss b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html b/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html index 657fbdaa9..d66270b11 100644 --- a/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html +++ b/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html @@ -1,156 +1,161 @@
-
- + -
+ - - Existing Client - + - +
- - Name - - - Name is required - - + + Existing Client + - - - {{ client.displayName }} - - + - - Relationship - - - {{ relationType.name }} + + Name + + + Name is required + + + + + + {{ client.displayName }} - - - - + - Account - - - {{ accountOption.productName }} - {{ accountOption.accountNo }} + Relationship + + + {{ relationType.name }} + + + + + + + + Account + + + {{ accountOption.productName }} - {{ accountOption.accountNo }} + + + + + + Amount + + + + + + + + + + + Relationship + + + {{ relationType.name }} - Amount - + First Name + + + First Name is required + + + + + Last Name + + + Last Name is required + + + + + Date Of Birth + + + + + + + Address Line 1 + + + + + Address Line 2 + + + + + City + + + + + Zip + + + + + Mobile + + + + + Residence Phone # + - +
- + + + + - - Relationship - - - {{ relationType.name }} - - - +
- - First Name - - - First Name is required - - - - - Last Name - - - Last Name is required - - - - - Date Of Birth - - - - - - - Address Line 1 - - - - - Address Line 2 - - - - - City - - - - - Zip - - - - - Mobile - - - - - Residence Phone # - - - - + + +
+
+
Client Details
+
+
+
Name
+
{{newGuarantorForm.controls.name.value.displayName}}
+
+
+
Id
+
{{newGuarantorForm.controls.name.value.id}}
+
+
+
Office
+
{{newGuarantorForm.controls.name.value.officeName}}
+
+
- - - - - - - - - - -
-
-
Client Details
-
-
-
Name
-
{{newGuarantorForm.controls.name.value.displayName}}
-
-
-
Id
-
{{newGuarantorForm.controls.name.value.id}}
-
-
-
Office
-
{{newGuarantorForm.controls.name.value.officeName}}
-
-
-
+
diff --git a/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.html b/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.html index ffe3c5534..ee15510db 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.html +++ b/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.html @@ -1,51 +1,57 @@
-
+ - - -
- - - Disbursement On - - - - - Disbursement Date is required - - + - - Transaction amount - - - Transaction Amount is required - - - - - Fixed EMI amount - - - Fixed EMI Amount is required - - + - - Note - - +
+ + + Disbursement On + + + + + Disbursement Date is required + + + + + Transaction amount + + + Transaction Amount is required + + + + + Fixed EMI amount + + + Fixed EMI Amount is required + + + + + Note + + + +
+ + + + + + +
+ + -
- - - - - - -
- - +
diff --git a/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.scss b/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/disburse-loan-account/disburse-loan-account.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html index 7cc85268c..d68a90843 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html +++ b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html @@ -1,91 +1,97 @@
-
+ - + -
+ - - Disbursed On - - - - - Disbursed On Dateis required - - +
- - Transaction Amount - - - Transaction Amount is required - - + + Disbursed On + + + + + Disbursed On Dateis required + + - - Payment Type - - - {{ paymentType.name }} - - - + + Transaction Amount + + + Transaction Amount is required + + + + + Payment Type + + + {{ paymentType.name }} + + + + +
+ Show Payment Details + + + + +
+ + + + Account # + + + + + Cheque # + + + + + Routing Code + + + + + Reciept # + + + + + Bank # + + + + + + Note + + -
- Show Payment Details - - - -
- - - Account # - - - - - Cheque # - - - - - Routing Code - - - - - Reciept # - - - - - Bank # - - - + + + + - - Note - - + -
+ - - - - - -
- - +
diff --git a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.scss b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.scss index cd2e90d69..3b9ed34b0 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.scss @@ -1,3 +1,7 @@ .expandCollapsebutton { margin-top: -7px; } + +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html index 5a9d6842b..a7986cf35 100644 --- a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html +++ b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html @@ -1,60 +1,66 @@
-
+ - + -
+ - - Transaction Date - - - - - Transaction Date is required - - +
- - Principal - - + + Transaction Date + + + + + Transaction Date is required + + - - Interest - - + + Principal + + - - Fee Amount - - + + Interest + + - - Penalty Amount - - + + Fee Amount + + - - Transaction Amount - - + + Penalty Amount + + - - Note - - + + Transaction Amount + + -
+ + Note + + - - - - +
-
+ + + + - + + + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.scss b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} 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 c5c9fa222..0e4268b5a 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 @@ -1,26 +1,22 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.scss b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.scss index fc106c4a7..e69de29bb 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.scss @@ -1,3 +0,0 @@ -.container { - padding: 3%; -} 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 b189adefb..728cbe6e0 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 @@ -13,50 +13,50 @@ import { ActivatedRoute, Router } from '@angular/router'; export class LoanAccountActionsComponent { /** flag object to store possible actions and render appropriate UI to the user */ - actions: { close: boolean, - undo_approval: boolean, - write_off: boolean, - add_collateral: boolean, - assign_loan_officer: boolean, - foreclosure: boolean, - prepay_loan: boolean, - reject: boolean, - disburse_to_savings: boolean, - make_repayment: boolean, - waive_interest: boolean, - close_as_rescheduled: boolean, - reschedule: boolean, - recovery_payment: boolean, - view_guarantors: boolean, - create_guarantor: boolean, - disburse: boolean, - withdrawn_by_client: boolean, - undo_disbursal: boolean, - loan_screen_reports: boolean, - approve: boolean, - add_loan_charge: boolean } = { - close: false, - undo_approval: false, - write_off: false, - add_collateral: false, - assign_loan_officer: false, - foreclosure: false, - prepay_loan: false, - reject: false, - disburse_to_savings: false, - make_repayment: false, - waive_interest: false, - close_as_rescheduled: false, - reschedule: false, - recovery_payment: false, - view_guarantors: false, - create_guarantor: false, - disburse: false, - withdrawn_by_client: false, - undo_disbursal: false, - loan_screen_reports: false, - approve: false, - add_loan_charge: false }; + actions: { 'Close': boolean, + 'Undo Approval': boolean, + 'Write Off': boolean, + 'Add Collateral': boolean, + 'Assign Loan Officer': boolean, + 'Foreclosure': boolean, + 'Prepay Loan': boolean, + 'Reject': boolean, + 'Disburse To Savings': boolean, + 'Make Repayment': boolean, + 'Waive Interest': boolean, + 'Close (as Rescheduled)': boolean, + 'Reschedule': boolean, + 'Recovery Payment': boolean, + 'View Guarantors': boolean, + 'Create Guarantor': boolean, + 'Disburse': boolean, + 'Withdrawn by Client': boolean, + 'Undo Disbursal': boolean, + 'Loan Screen Reports': boolean, + 'Approve': boolean, + 'Add Loan Charge': boolean } = { + 'Close': false, + 'Undo Approval': false, + 'Write Off': false, + 'Add Collateral': false, + 'Assign Loan Officer': false, + 'Foreclosure': false, + 'Prepay Loan': false, + 'Reject': false, + 'Disburse To Savings': false, + 'Make Repayment': false, + 'Waive Interest': false, + 'Close (as Rescheduled)': false, + 'Reschedule': false, + 'Recovery Payment': false, + 'View Guarantors': false, + 'Create Guarantor': false, + 'Disburse': false, + 'Withdrawn by Client': false, + 'Undo Disbursal': false, + 'Loan Screen Reports': false, + 'Approve': false, + 'Add Loan Charge': false }; actionButtonData: any; actionName: any; @@ -73,13 +73,13 @@ export class LoanAccountActionsComponent { this.route.params.subscribe(params => { this.actionName = params['action']; - if (this.actionName === 'change-loan-officer') { - this.actionName = 'assign-loan-officer'; + if (this.actionName === 'Change Loan Officer') { + this.actionName = 'Assign Loan Officer'; } for (const key of Object.keys(this.actions)) { this.actions[key] = false; } - this.actions[this.actionName.replace(/-/g, '_')] = true; + this.actions[this.actionName] = true; }); } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html index 140bbd6e4..597fc690b 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html @@ -1,75 +1,80 @@
-
+ - + -
+ - - Reschedule from Installment On - - - - - Reschedule Date is required - - +
- - Reason for Rescheduling - - - {{ rescheduleReasonCode.name }} - - - - Reason for Rescheduling is required - - - - - Submitted On - - - - - Submitted On Date is required - - - - - Comments - - - - Change Repayment Date - - - Installment Rescheduled to - - - - - - - Introduce Mid-term grace periods - - - - Principal Grace Periods - + Reschedule from Installment On + + + + + Reschedule Date is required + - Interest Grace Periods - + Reason for Rescheduling + + + {{ rescheduleReasonCode.name }} + + + + Reason for Rescheduling is required + - - Extend Repayment Period - + + Submitted On + + + + + Submitted On Date is required + + + + + Comments + + + + Change Repayment Date + + + + Installment Rescheduled to + + + + + + + Introduce Mid-term grace periods + + + + Principal Grace Periods + + + + + Interest Grace Periods + + + + + Extend Repayment Period + Number Of new Repayments @@ -77,7 +82,7 @@ - Adjust interest rates for remainder of loan + Adjust interest rates for remainder of loan New Interest Rate @@ -85,15 +90,18 @@ -
+
- - - - + + + + -
+ - + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.scss b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts index 43508ceac..3715610ef 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts @@ -80,7 +80,7 @@ export class LoanRescheduleComponent implements OnInit { // TODO: needs to be updated // mentioned in Community App: - // location.path('/loans/' + scope.loanId + '/viewreschedulerequest/'+ data.resourceId); + // location.path('/loans-accounts/' + scope.loanId + '/viewreschedulerequest/'+ data.resourceId); this.router.navigate(['../../general'], { relativeTo: this.route }); }); } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html b/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html index 5a2438b89..9c01a9902 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html @@ -25,7 +25,7 @@
- + diff --git a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html index 67595ca60..b21e9d60a 100644 --- a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html @@ -1,35 +1,41 @@
-
+ - + -
+ - - Closed On - - - - - Closed Date is required - - +
- - Note - - + + Closed On + + + + + Closed Date is required + + -
+ + Note + + - - - - +
-
+ + + + - + + + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.scss b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html index 65a6ff2bb..7370ca86b 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html @@ -1,91 +1,97 @@
-
+ - + -
+ - - Transaction Date - - - - - Transaction Date is required - - +
- - Transaction Amount - - - Transaction Amount is required - - + + Transaction Date + + + + + Transaction Date is required + + - - Payment Type - - - {{ paymentType.name }} - - - + + Transaction Amount + + + Transaction Amount is required + + + + + Payment Type + + + {{ paymentType.name }} + + + + +
+ Show Payment Details + + + + +
+ + + + Account # + + + + + Cheque # + + + + + Routing Code + + + + + Reciept # + + + + + Bank # + + + + + + Note + + -
- Show Payment Details - - - -
- - - Account # - - - - - Cheque # - - - - - Routing Code - - - - - Reciept # - - - - - Bank # - - - + + + + - - Note - - + -
+ - - - - - -
- - +
diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.scss b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.scss index cd2e90d69..3b9ed34b0 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.scss @@ -1,3 +1,7 @@ .expandCollapsebutton { margin-top: -7px; } + +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html index 354210f97..07389e331 100644 --- a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html +++ b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html @@ -1,104 +1,110 @@
-
+ - + -
+ - - Transaction Date - - - - - Transaction Date is required - - +
- - Transaction Amount - - - Transaction Amount is required - - + + Transaction Date + + + + + Transaction Date is required + + - - Principal - - + + Transaction Amount + + + Transaction Amount is required + + - - Interest Amount - - - Interest Amount is required - - + + Principal + + - - Payment Type - - - {{ paymentType.name }} - - - + + Interest Amount + + + Interest Amount is required + + + + + Payment Type + + + {{ paymentType.name }} + + + + +
+ Show Payment Details + + + + +
+ + + + Account # + + + + + Cheque # + + + + + Routing Code + + + + + Reciept # + + + + + Bank # + + + + + + Note + + -
- Show Payment Details - - - -
- - - Account # - - - - - Cheque # - - - - - Routing Code - - - - - Reciept # - - - - - Bank # - - - + + + + - - Note - - + -
+ - - - - - -
- - +
diff --git a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.scss b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.scss index cd2e90d69..3b9ed34b0 100644 --- a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.scss @@ -1,3 +1,7 @@ .expandCollapsebutton { margin-top: -7px; } + +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html index a7c488d7a..16e7cbee5 100644 --- a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html +++ b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html @@ -1,93 +1,97 @@
-
+ - + -
+ - - Transaction Date - - - - - Transaction Date is required - - +
- - Transaction Amount - - - Transaction Amount is required - - + + Transaction Date + + + + + Transaction Date is required + + - - Payment Type - - - {{ paymentType.name }} - - - + + Transaction Amount + + + Transaction Amount is required + + + + + Payment Type + + + {{ paymentType.name }} + + + + +
+ Show Payment Details + + + + +
+ + + + Account # + + + + + Cheque # + + + + + Routing Code + + + + + Reciept # + + + + + Bank # + + + + + + Note + + -
- Show Payment Details - - - -
- - - Account # - - + + + + - - Cheque # - - + - - Routing Code - - + - - Reciept # - - - - - Bank # - - - - - - Note - - - -
- - - - - - -
- - +
diff --git a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.scss b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.scss index cd2e90d69..3b9ed34b0 100644 --- a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.scss @@ -1,3 +1,7 @@ .expandCollapsebutton { margin-top: -7px; } + +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html b/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html index da666d03f..1e94ed2a9 100644 --- a/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html +++ b/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html @@ -1,35 +1,41 @@
-
+ - + -
+ - - Rejected On - - - - - Rejected Date is required - - +
- - Note - - + + Rejected On + + + + + Rejected Date is required + + -
+ + Note + + - - - - +
-
+ + + + - + + + + +
diff --git a/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.html b/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.html index 82a963ebc..074d39833 100644 --- a/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.html +++ b/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.html @@ -1,17 +1,22 @@
- + - - Note - - + + + + Note + + + + - + - +
diff --git a/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.scss b/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html b/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html index fe9ce104e..aea9fbae7 100644 --- a/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html +++ b/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html @@ -1,17 +1,22 @@
- + - - Note - - + + + + Note + + + + - + - +
diff --git a/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.scss b/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.scss index e69de29bb..1915ad6d3 100644 --- a/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.scss +++ b/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.scss @@ -0,0 +1,3 @@ +.container { + max-width: 37rem; +} diff --git a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html index a831a6a6e..03b956c37 100644 --- a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html +++ b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html @@ -1,174 +1,186 @@ -