Loan Product creation with Global Configurations (#1777)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
709b171917
commit
7913707324
+2
-2
@@ -55,12 +55,12 @@
|
||||
|
||||
<ng-container matColumnDef="fromDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> From Date </th>
|
||||
<td mat-cell *matCellDef="let floatingRate"> {{ floatingRate.fromDate | dateFormat : 'dd MMMM yyyy' }} </td>
|
||||
<td mat-cell *matCellDef="let floatingRate"> {{ floatingRate.fromDate | dateFormat }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="interestRate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Interest Rate </th>
|
||||
<td mat-cell *matCellDef="let floatingRate"> {{ floatingRate.interestRate }} </td>
|
||||
<td mat-cell *matCellDef="let floatingRate"> {{ floatingRate.interestRate | number }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="isDifferential">
|
||||
|
||||
+10
-4
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Components */
|
||||
@@ -42,16 +42,22 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
private productsService: ProductsService,
|
||||
private settingsService: SettingsService,
|
||||
private router: Router) {
|
||||
this.route.data.subscribe((data: { loanProductsTemplate: any }) => {
|
||||
this.route.data.subscribe((data: { loanProductsTemplate: any, configurations: any }) => {
|
||||
this.loanProductsTemplate = data.loanProductsTemplate;
|
||||
const assetAccountData = this.loanProductsTemplate.accountingMappingOptions.assetAccountOptions || [];
|
||||
const liabilityAccountData = this.loanProductsTemplate.accountingMappingOptions.liabilityAccountOptions || [];
|
||||
this.loanProductsTemplate.accountingMappingOptions.assetAndLiabilityAccountOptions = assetAccountData.concat(liabilityAccountData);
|
||||
data.configurations.globalConfiguration.forEach((config: any) => {
|
||||
if (config.name === 'days-before-repayment-is-due') {
|
||||
this.loanProductsTemplate['dueDaysForRepaymentEvent'] = config.value;
|
||||
} else if (config.name === 'days-after-repayment-is-overdue') {
|
||||
this.loanProductsTemplate['overDueDaysForRepaymentEvent'] = config.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
ngOnInit() { }
|
||||
|
||||
get loanProductDetailsForm() {
|
||||
return this.loanProductDetailsStep.loanProductDetailsForm;
|
||||
|
||||
+2
-2
@@ -421,12 +421,12 @@
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Due days for repayment event</mat-label>
|
||||
<input type="number" matInput matTooltip="Specific days when repayment due notification should be sent." formControlName="dueDaysForRepaymentEvent" [min]="0">
|
||||
<input type="number" matInput matTooltip="Specific days before when repayment due notification should be sent." formControlName="dueDaysForRepaymentEvent" [min]="0">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>OverDue days for repayment event</mat-label>
|
||||
<input type="number" matInput matTooltip="Specific days when repayment Overdue notification should be sent." formControlName="overDueDaysForRepaymentEvent" [min]="0">
|
||||
<input type="number" matInput matTooltip="Specific days when after the repayment Overdue notification should be sent." formControlName="overDueDaysForRepaymentEvent" [min]="0">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
+2
-2
@@ -87,8 +87,8 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'maxTrancheCount': this.loanProductsTemplate.maxTrancheCount,
|
||||
'outstandingLoanBalance': this.loanProductsTemplate.outstandingLoanBalance,
|
||||
'dueDaysForRepaymentEvent': this.loanProductsTemplate.dueDaysForRepaymentEvent,
|
||||
'overDueDaysForRepaymentEvent': this.loanProductsTemplate.overDueDaysForRepaymentEvent,
|
||||
});
|
||||
'overDueDaysForRepaymentEvent': this.loanProductsTemplate.overDueDaysForRepaymentEvent
|
||||
});
|
||||
|
||||
if (this.loanProductsTemplate.delinquencyBucket) {
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
|
||||
@@ -128,6 +128,7 @@ import { ShareProductGeneralTabComponent } from './share-products/view-share-pro
|
||||
import { ShareProductDatatableTabComponent } from './share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component';
|
||||
import { ShareProductDatatablesResolver } from './share-products/share-product-datatables.resolver';
|
||||
import { ShareProductDatatableResolver } from './share-products/share-product-datatable.resolver';
|
||||
import { GlobalConfigurationsResolver } from 'app/system/configurations/global-configurations-tab/global-configurations.resolver';
|
||||
|
||||
/** Products Routes */
|
||||
const routes: Routes = [
|
||||
@@ -156,7 +157,8 @@ const routes: Routes = [
|
||||
component: CreateLoanProductComponent,
|
||||
data: { title: extract('Create Loan Product'), breadcrumb: 'Create' },
|
||||
resolve: {
|
||||
loanProductsTemplate: LoanProductsTemplateResolver
|
||||
loanProductsTemplate: LoanProductsTemplateResolver,
|
||||
configurations: GlobalConfigurationsResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user