@@ -17,7 +17,7 @@ export class LoanProductResolver implements Resolve<Object> {
|
||||
/**
|
||||
* @param {ProductsService} productsService Products service.
|
||||
*/
|
||||
constructor(private productsService: ProductsService) {}
|
||||
constructor(private productsService: ProductsService) { }
|
||||
|
||||
/**
|
||||
* Returns the loan product data.
|
||||
|
||||
@@ -24,6 +24,7 @@ import { ViewShareProductComponent } from './share-products/view-share-product/v
|
||||
import { EditShareProductComponent } from './share-products/edit-share-product/edit-share-product.component';
|
||||
import { ManageTaxConfigurationsComponent } from './manage-tax-configurations/manage-tax-configurations.component';
|
||||
import { RecurringDepositProductsComponent } from './recurring-deposit-products/recurring-deposit-products.component';
|
||||
import { ViewRecurringDepositProductComponent } from './recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component';
|
||||
import { ChargesComponent } from './charges/charges.component';
|
||||
import { ViewChargeComponent } from './charges/view-charge/view-charge.component';
|
||||
import { FixedDepositProductsComponent } from './fixed-deposit-products/fixed-deposit-products.component';
|
||||
@@ -56,6 +57,7 @@ import { ShareProductsTemplateResolver } from './share-products/share-products-t
|
||||
import { ShareProductResolver } from './share-products/share-product-resolver';
|
||||
import { ShareProductAndTemplateResolver } from './share-products/edit-share-product/share-product-and-template.resolver';
|
||||
import { RecurringDepositProductsResolver } from './recurring-deposit-products/recurring-deposit-products.resolver';
|
||||
import { RecurringDepositProductResolver } from './recurring-deposit-products/recurring-deposit-product.resolver';
|
||||
import { ChargesResolver } from './charges/charges.resolver';
|
||||
import { ChargeResolver } from './charges/charge.resolver';
|
||||
import { FixedDepositProductsResolver } from './fixed-deposit-products/fixed-deposit-products.resolver';
|
||||
@@ -72,6 +74,7 @@ import { EditChargeComponent } from './charges/edit-charge/edit-charge.component
|
||||
import { ChargesTemplateResolver } from './charges/charges-template.resolver';
|
||||
import { TaxGroupResolver } from './manage-tax-groups/tax-group.resolver';
|
||||
import { DividendsResolver } from './share-products/dividends-share-product/dividends.resolver';
|
||||
import { RecurringDepositProductsTemplateResolver } from './recurring-deposit-products/recurring-deposit-products-template.resolver';
|
||||
|
||||
/** Products Routes */
|
||||
const routes: Routes = [
|
||||
@@ -298,11 +301,30 @@ const routes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'recurring-deposit-products',
|
||||
component: RecurringDepositProductsComponent,
|
||||
resolve: {
|
||||
data: { title: extract('Recurring Deposit Products'), breadcrumb: 'Recurring Deposit Products' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: RecurringDepositProductsComponent,
|
||||
resolve: {
|
||||
recurringDepositProducts: RecurringDepositProductsResolver
|
||||
},
|
||||
data: { title: extract('Recurring Deposit Products'), breadcrumb: 'Recurring Deposit Products' },
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
data: { title: extract('View Recurring Deposit Product'), routeParamBreadcrumb: 'id' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: ViewRecurringDepositProductComponent,
|
||||
resolve: {
|
||||
recurringDepositProduct: RecurringDepositProductResolver,
|
||||
recurringDepositProductsTemplate: RecurringDepositProductsTemplateResolver
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'fixed-deposit-products',
|
||||
@@ -448,6 +470,7 @@ const routes: Routes = [
|
||||
ShareProductResolver,
|
||||
ShareProductAndTemplateResolver,
|
||||
RecurringDepositProductsResolver,
|
||||
RecurringDepositProductResolver,
|
||||
ChargesResolver,
|
||||
ChargeResolver,
|
||||
ChargesTemplateResolver,
|
||||
@@ -463,7 +486,8 @@ const routes: Routes = [
|
||||
TaxComponentTemplateResolver,
|
||||
EditTaxComponentComponent,
|
||||
TaxGroupResolver,
|
||||
DividendsResolver
|
||||
DividendsResolver,
|
||||
RecurringDepositProductsTemplateResolver
|
||||
]
|
||||
})
|
||||
export class ProductsRoutingModule { }
|
||||
|
||||
@@ -75,6 +75,7 @@ import { MatFormFieldModule, MatSelectModule, MatOptionModule } from '@angular/m
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ViewTaxGroupComponent } from './manage-tax-groups/view-tax-group/view-tax-group.component';
|
||||
import { ShareProductsDividendsComponent } from './share-products/dividends-share-product/dividends.components';
|
||||
import { ViewRecurringDepositProductComponent } from './recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component';
|
||||
|
||||
/**
|
||||
* Products Module
|
||||
@@ -153,7 +154,8 @@ import { ShareProductsDividendsComponent } from './share-products/dividends-shar
|
||||
EditChargeComponent,
|
||||
ViewTaxGroupComponent,
|
||||
ShareProductsDividendsComponent,
|
||||
DepositProductIncentiveFormDialogComponent
|
||||
DepositProductIncentiveFormDialogComponent,
|
||||
ViewRecurringDepositProductComponent
|
||||
],
|
||||
entryComponents: [
|
||||
DepositProductIncentiveFormDialogComponent,
|
||||
|
||||
@@ -101,6 +101,20 @@ export class ProductsService {
|
||||
return this.http.get('/recurringdepositproducts');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} recurringDepositProductId Product Id of recurring Deposit
|
||||
* @param {boolean} template Template
|
||||
* @return {Observable<any>} Recurring Deposit Product Details
|
||||
*/
|
||||
getRecurringDepositProduct(recurringDepositProductId: string, template: boolean = false): Observable<any> {
|
||||
const httpParams = new HttpParams().set('template', template.toString());
|
||||
return this.http.get(`/recurringdepositproducts/${recurringDepositProductId}`, { params: httpParams });
|
||||
}
|
||||
|
||||
getRecurringDepositProductsTemplate(): Observable<any> {
|
||||
return this.http.get('/recurringdepositproducts/template');
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} Charges data.
|
||||
*/
|
||||
@@ -253,4 +267,13 @@ export class ProductsService {
|
||||
getProductMix(productId: string): Observable<any> {
|
||||
return this.http.get(`/loanproducts/${productId}/productmix`);
|
||||
}
|
||||
|
||||
/*
|
||||
* @param {string} productId Product ID
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
getAllInterestRateCharts(productId: string): Observable<any> {
|
||||
const httpParams = new HttpParams().set('productId', productId);
|
||||
return this.http.get(`/interestratecharts`, {params: httpParams});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { ProductsService } from '../products.service';
|
||||
|
||||
/**
|
||||
* Recurring Deposit Product data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class RecurringDepositProductResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {ProductsService} productsService Products service.
|
||||
*/
|
||||
constructor(private productsService: ProductsService) { }
|
||||
|
||||
/**
|
||||
* Returns the recurring deposit product data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const id = route.paramMap.get('id');
|
||||
return this.productsService.getRecurringDepositProduct(id);
|
||||
}
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { ProductsService } from '../products.service';
|
||||
|
||||
@Injectable()
|
||||
export class RecurringDepositProductsTemplateResolver implements Resolve<Object> {
|
||||
|
||||
constructor(private productsService: ProductsService) {}
|
||||
|
||||
/**
|
||||
* Returns the recurring deposit products template data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(): Observable<any> {
|
||||
return this.productsService.getRecurringDepositProductsTemplate();
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [routerLink]="[row.id]" class="select-row"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
+499
@@ -0,0 +1,499 @@
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column" class="container m-b-20">
|
||||
<button mat-raised-button color="primary">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
Edit
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<mat-card>
|
||||
|
||||
<mat-card-content>
|
||||
|
||||
<div fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h2 class="mat-h2" fxFlexFill>{{ recurringDepositProduct.name }}</h2>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Details</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Short Name:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.shortName }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.description">
|
||||
<span fxFlex="40%">Description:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.description }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Currency Details</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Currency:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.currency.name }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Decimal Places:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.currency.decimalPlaces }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Currency in Multiples Of:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.currency.inMultiplesOf | number}}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Terms</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Deposit Amount:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.depositAmount + ' (Min: ' + (recurringDepositProduct.minDepositAmount ? recurringDepositProduct.minDepositAmount : recurringDepositProduct.depositAmount) + ', Max: ' + (recurringDepositProduct.maxDepositAmount ? recurringDepositProduct.maxDepositAmount : recurringDepositProduct.depositAmount) + ')' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Interest Compounding Period:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.interestCompoundingPeriodType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Interest Posting Period:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.interestPostingPeriodType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Interested Calculated Using:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.interestCalculationType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Days in Years:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.interestCalculationDaysInYearType.value }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Settings</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.lockinPeriodFrequency">
|
||||
<span fxFlex="40%">Lock-in Period:</span>
|
||||
<span fxFlex="60%" *ngIf="recurringDepositProduct.lockinPeriodFrequency !== undefined">
|
||||
{{ recurringDepositProduct.lockinPeriodFrequency }}
|
||||
{{ recurringDepositProduct.lockinPeriodFrequencyType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.minDepositTerm">
|
||||
<span fxFlex="40%">Minimum Deposit Term:</span>
|
||||
<span fxFlex="60%"
|
||||
*ngIf="recurringDepositProduct.minDepositTerm !== undefined">{{ recurringDepositProduct.minDepositTerm }}
|
||||
|
||||
{{ recurringDepositProduct.minDepositTermType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.maxDepositTerm">
|
||||
<span fxFlex="40%">Maximum Deposit Term:</span>
|
||||
<span fxFlex="60%"
|
||||
*ngIf="recurringDepositProduct.maxDepositTerm !== undefined">{{ recurringDepositProduct.maxDepositTerm }}
|
||||
|
||||
{{ recurringDepositProduct.maxDepositTermType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.inMultipleOfDepositTerm">
|
||||
<span fxFlex="40%">Deposit Term In multiple of:</span>
|
||||
<span fxFlex="60%"
|
||||
*ngIf="recurringDepositProduct.inMultipleOfDepositTerm !== undefined">{{ recurringDepositProduct.inMultipleOfDepositTerm }}
|
||||
-
|
||||
{{ recurringDepositProduct.inMultipleOfDepositTermType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.isMandatoryDeposit !== undefined">
|
||||
<span fxFlex="40%">Recurring Deposit Type:</span>
|
||||
<span fxFlex="60%" *ngIf="recurringDepositProduct.isMandatoryDeposit"> Mandatory </span>
|
||||
<span fxFlex="60%" *ngIf="!recurringDepositProduct.isMandatoryDeposit"> Voluntary </span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.preClosurePenalInterest">
|
||||
<span fxFlex="40%">Apply penal interest (less):</span>
|
||||
<span fxFlex="60%">{{recurringDepositProduct.preClosurePenalInterest}} % On
|
||||
|
||||
{{recurringDepositProduct.preClosurePenalInterestOnType.value}}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Is withhold tax Applicable:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.withHoldTax }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.withHoldTax">
|
||||
<span fxFlex="40%">Withhold Tax group:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.taxGroup.name }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column" >
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Interest Rate Charts</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.activeChart.name">
|
||||
<span fxFlex="40%">Name:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.activeChart.name }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Valid from Date:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.activeChart.fromDate | date }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.activeChart.endDate">
|
||||
<span fxFlex="40%">End Date:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.activeChart.endDate | date }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.activeChart.description">
|
||||
<span fxFlex="40%">Description:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.activeChart.description }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Primary Grouping by Amount:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.activeChart.isPrimaryGroupingByAmount ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="recurringDepositProduct.activeChart.chartSlabs" multiTemplateDataRows>
|
||||
|
||||
<ng-container matColumnDef="period">
|
||||
<th mat-header-cell *matHeaderCellDef> Period </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">
|
||||
<div *ngIf="chartSlab.fromPeriod !== undefined">
|
||||
{{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }}
|
||||
</div>
|
||||
<div *ngIf="chartSlab.fromPeriod == undefined">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amountRange">
|
||||
<th mat-header-cell *matHeaderCellDef> Amount Range </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">
|
||||
<div *ngIf="chartSlab.amountRangeFrom !== undefined">
|
||||
{{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }}
|
||||
</div>
|
||||
|
||||
<div *ngIf="chartSlab.amountRangeFrom == undefined">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="annualInterestRate">
|
||||
<th mat-header-cell *matHeaderCellDef> Interest </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">
|
||||
{{ chartSlab.annualInterestRate }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef> Description </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">
|
||||
{{ chartSlab.description }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef> Actions </th>
|
||||
<td mat-cell *matCellDef="let chartSlab; let chartSlabIndex = dataIndex">
|
||||
<button mat-button color="primary" (click)="expandChartSlabIndex = expandChartSlabIndex === chartSlabIndex ? null : chartSlabIndex">
|
||||
<span *ngIf="expandChartSlabIndex !== chartSlabIndex">
|
||||
<fa-icon icon="eye"></fa-icon>
|
||||
View Incentives
|
||||
</span>
|
||||
<span *ngIf="expandChartSlabIndex === chartSlabIndex">
|
||||
<fa-icon icon="eye-slash"></fa-icon>
|
||||
Hide Incentives
|
||||
</span>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="incentives">
|
||||
<td mat-cell *matCellDef="let chartSlab; let chartSlabIndex = dataIndex" [attr.colspan]="chartSlabsDisplayedColumns.length">
|
||||
<div fxLayout="row wrap" fxFlexFill class="incentives" [@expandChartSlab]="chartSlabIndex === expandChartSlabIndex? 'expanded' : 'collapsed'">
|
||||
<mat-card fxLayout="row wrap" fxFlexFill>
|
||||
|
||||
<h4 class="mat-h4" fxFlex="23%">
|
||||
Incentives
|
||||
</h4>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="chartSlab.incentives">
|
||||
|
||||
<ng-container matColumnDef="entityType">
|
||||
<th mat-header-cell *matHeaderCellDef> Entity Type </th>
|
||||
<td mat-cell *matCellDef="let incentive">
|
||||
{{ incentive.entityType | find:recurringDepositProductTemplate.chartTemplate.entityTypeOptions:'id':'value' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="attributeName">
|
||||
<th mat-header-cell *matHeaderCellDef> Attribute Name </th>
|
||||
<td mat-cell *matCellDef="let incentive">
|
||||
{{ incentive.attributeName | find:recurringDepositProductTemplate.chartTemplate.attributeNameOptions:'id':'value' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="conditionType">
|
||||
<th mat-header-cell *matHeaderCellDef> Condition Type </th>
|
||||
<td mat-cell *matCellDef="let incentive">
|
||||
{{ incentive.conditionType | find:recurringDepositProductTemplate.chartTemplate.conditionTypeOptions:'id':'value' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="attributeValue">
|
||||
<th mat-header-cell *matHeaderCellDef> Attribute Value </th>
|
||||
<td mat-cell *matCellDef="let incentive" [ngSwitch]="incentive.attributeName">
|
||||
<span *ngSwitchCase="2">{{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.genderOptions:'id':'name' }}</span>
|
||||
<span *ngSwitchCase="3">{{ incentive.attributeValue }}</span>
|
||||
<span *ngSwitchCase="4">{{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.clientTypeOptions:'id':'name' }}</span>
|
||||
<span *ngSwitchCase="5">{{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.clientClassificationOptions:'id':'name' }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="incentiveType">
|
||||
<th mat-header-cell *matHeaderCellDef> Incentive Type </th>
|
||||
<td mat-cell *matCellDef="let incentive">
|
||||
{{ incentive.incentiveType | find:recurringDepositProductTemplate.chartTemplate.incentiveTypeOptions:'id':'value'}}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> Amount </th>
|
||||
<td mat-cell *matCellDef="let incentive">
|
||||
{{ incentive.amount }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="incentivesDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: incentivesDisplayedColumns;"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="chartSlabsDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: chartSlabsDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: chartSlabsIncentivesDisplayedColumns;" class="incentives-row"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="recurringDepositProduct.charges.length" fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Charges</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="recurringDepositProduct.charges">
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> Name </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="type">
|
||||
<th mat-header-cell *matHeaderCellDef> Type </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> Amount </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount | number }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="collectedon">
|
||||
<th mat-header-cell *matHeaderCellDef> Collected On </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeTimeType.value }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="chargesDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: chargesDisplayedColumns;"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Accounting</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Type:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingRule.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.accountingRule.id === 2" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Assets</h4>
|
||||
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<span fxFlex="40%">Saving reference:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.savingsReferenceAccount.name }}</span>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Liabilities</h4>
|
||||
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<span fxFlex="40%">Saving control:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.savingsControlAccount.name }}</span>
|
||||
<span fxFlex="40%">Savings transfers in suspense:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.transfersInSuspenseAccount.name }}</span>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Expenses</h4>
|
||||
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<span fxFlex="40%">Interest on savings:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.interestOnSavingsAccount.name }}</span>
|
||||
<span fxFlex="40%">Write-off:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.writeOffAccount.name }}</span>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Income</h4>
|
||||
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<span fxFlex="40%">Income from fees:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.incomeFromFeeAccount.name }}</span>
|
||||
<span fxFlex="40%">Income from penalties:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.incomeFromPenaltyAccount.name }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositProduct.paymentChannelToFundSourceMappings?.length || recurringDepositProduct.feeToIncomeAccountMappings?.length || recurringDepositProduct.penaltyToIncomeAccountMappings?.length " fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Advanced Accounting Rules</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div *ngIf="recurringDepositProduct.paymentChannelToFundSourceMappings?.length" fxFlexFill fxLayout="row wrap"
|
||||
fxLayout.lt-md="column">
|
||||
<h4 class="mat-h4" fxFlexFill>Configure Fund Sources for Payment Channels</h4>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table
|
||||
[dataSource]="recurringDepositProduct.paymentChannelToFundSourceMappings">
|
||||
|
||||
<ng-container matColumnDef="paymentTypeId">
|
||||
<th mat-header-cell *matHeaderCellDef> Payment Type </th>
|
||||
<td mat-cell *matCellDef="let paymentFundSource">
|
||||
{{ paymentFundSource.paymentType.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="fundSourceAccountId">
|
||||
<th mat-header-cell *matHeaderCellDef> Fund Source </th>
|
||||
<td mat-cell *matCellDef="let paymentFundSource">
|
||||
{{ paymentFundSource.fundSourceAccount.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="paymentFundSourceDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: paymentFundSourceDisplayedColumns;"></tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="recurringDepositProduct.feeToIncomeAccountMappings?.length" fxFlexFill fxLayout="row wrap"
|
||||
fxLayout.lt-md="column">
|
||||
|
||||
|
||||
<h4 class="mat-h4" fxFlexFill>Fees to Specific Income Accounts</h4>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table
|
||||
[dataSource]="recurringDepositProduct.feeToIncomeAccountMappings">
|
||||
|
||||
<ng-container matColumnDef="chargeId">
|
||||
<th mat-header-cell *matHeaderCellDef> Fees </th>
|
||||
<td mat-cell *matCellDef="let feesIncome">
|
||||
{{ feesIncome.charge.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="incomeAccountId">
|
||||
<th mat-header-cell *matHeaderCellDef> Income Account </th>
|
||||
<td mat-cell *matCellDef="let feesIncome">
|
||||
{{ feesIncome.incomeAccount.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="feesPenaltyIncomeDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: feesPenaltyIncomeDisplayedColumns;"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="recurringDepositProduct.penaltyToIncomeAccountMappings?.length" fxFlexFill fxLayout="row wrap"
|
||||
fxLayout.lt-md="column">
|
||||
|
||||
<h4 class="mat-h4" fxFlexFill>Penalties to Specific Income Accounts</h4>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table
|
||||
[dataSource]="recurringDepositProduct.penaltyToIncomeAccountMappings">
|
||||
|
||||
<ng-container matColumnDef="chargeId">
|
||||
<th mat-header-cell *matHeaderCellDef> Penalty </th>
|
||||
<td mat-cell *matCellDef="let penaltyIncome">
|
||||
{{ penaltyIncome.charge.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="incomeAccountId">
|
||||
<th mat-header-cell *matHeaderCellDef> Income Account </th>
|
||||
<td mat-cell *matCellDef="let penaltyIncome">
|
||||
{{ penaltyIncome.incomeAccount.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="feesPenaltyIncomeDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: feesPenaltyIncomeDisplayedColumns;"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mat-elevation-z1 {
|
||||
margin: 1em 0 1.5em 0;
|
||||
}
|
||||
|
||||
h2, h3, h4 {
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
span {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
.margin-t {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.interestCarts {
|
||||
float:right;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
|
||||
tr.incentives-row {
|
||||
height: 0;
|
||||
|
||||
> td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.incentives {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mat-card {
|
||||
border-radius: 0;
|
||||
|
||||
> h4 {
|
||||
font-weight: 500;
|
||||
margin: 0.5em 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mat-elevation-z1 {
|
||||
margin: 1em 0 1.5em 0;
|
||||
}
|
||||
|
||||
h2, h3, h4 {
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
span {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
mat-divider {
|
||||
margin: 0 0 0.5em 0;
|
||||
}
|
||||
|
||||
.margin-t {
|
||||
margin-top: 1em;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ViewRecurringDepositProductComponent } from './view-recurring-deposit-product.component';
|
||||
|
||||
describe('ViewRecurringDepositProductComponent', () => {
|
||||
let component: ViewRecurringDepositProductComponent;
|
||||
let fixture: ComponentFixture<ViewRecurringDepositProductComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ViewRecurringDepositProductComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ViewRecurringDepositProductComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { trigger, state, transition, animate, style } from '@angular/animations';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-view-recurring-deposit-product',
|
||||
templateUrl: './view-recurring-deposit-product.component.html',
|
||||
styleUrls: ['./view-recurring-deposit-product.component.scss'],
|
||||
animations: [
|
||||
trigger('expandChartSlab', [
|
||||
state('collapsed', style({height: '0px', minHeight: '0'})),
|
||||
state('expanded', style({height: '*'})),
|
||||
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
|
||||
])
|
||||
]
|
||||
})
|
||||
export class ViewRecurringDepositProductComponent implements OnInit {
|
||||
|
||||
recurringDepositProduct: any;
|
||||
recurringDepositProductTemplate: any;
|
||||
|
||||
chartSlabsIncentivesDisplayedColumns: string[] = ['incentives'];
|
||||
chartSlabsDisplayedColumns: string[] = ['period', 'amountRange', 'annualInterestRate', 'description', 'actions'];
|
||||
incentivesDisplayedColumns: string[] = ['entityType', 'attributeName', 'conditionType', 'attributeValue', 'incentiveType', 'amount'];
|
||||
chargesDisplayedColumns: string[] = ['name', 'type', 'amount', 'collectedon'];
|
||||
paymentFundSourceDisplayedColumns: string[] = ['paymentTypeId', 'fundSourceAccountId'];
|
||||
feesPenaltyIncomeDisplayedColumns: string[] = ['chargeId', 'incomeAccountId'];
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data.subscribe((data: { recurringDepositProduct: any, recurringDepositProductsTemplate: any}) => {
|
||||
this.recurringDepositProduct = data.recurringDepositProduct;
|
||||
this.recurringDepositProductTemplate = data.recurringDepositProductsTemplate;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user