diff --git a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html index 7df234f87..781ec6bb1 100644 --- a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html +++ b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html @@ -184,7 +184,7 @@ Activation Date - diff --git a/src/app/clients/clients-view/charges/view-charge/view-charge.component.html b/src/app/clients/clients-view/charges/view-charge/view-charge.component.html index ca24bbae5..e7c160c7f 100644 --- a/src/app/clients/clients-view/charges/view-charge/view-charge.component.html +++ b/src/app/clients/clients-view/charges/view-charge/view-charge.component.html @@ -25,7 +25,7 @@ - + +
+ +

Charges

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name + {{ charge.name }} + Type + {{ charge.chargeCalculationType.value }} + Amount + {{ charge.amount | number }} + Collected On + {{ charge.chargeTimeType.value }} +
+ +
+ +

Accounting

+ + + +
+ Type: + {{ fixedDepositProductData.accountingRule.value }} +
+ +
+ +

Assets

+ +
+ Saving reference: + {{ fixedDepositProductData.accountingMappings.savingsReferenceAccount.name }} +
+ +

Liabilities

+ +
+ Saving control: + {{ fixedDepositProductData.accountingMappings.savingsControlAccount.name }} + Savings transfers in suspense: + {{ fixedDepositProductData.accountingMappings.transfersInSuspenseAccount.name }} +
+ +

Expenses

+ +
+ Interest on savings: + {{ fixedDepositProductData.accountingMappings.interestOnSavingsAccount.name }} +
+ +

Income

+ +
+ Income from fees: + {{ fixedDepositProductData.accountingMappings.incomeFromFeeAccount.name }} + Income from penalties: + {{ fixedDepositProductData.accountingMappings.incomeFromPenaltyAccount.name }} +
+ +
+ +

Advanced Accounting Rules

+ + + +
+ +
+

Configure Fund Sources for Payment Channels

+ + + + + + + + + + + + + + + + +
Payment Type + {{ paymentFundSource.paymentType.name }} + Fund Source + {{ paymentFundSource.fundSourceAccount.name }} +
+ +
+ +
+ +

Fees to Specific Income Accounts

+ + + + + + + + + + + + + + + + +
Fees + {{ feesIncome.charge.name }} + Income Account + {{ feesIncome.incomeAccount.name }} +
+ +
+ +
+ +

Penalties to Specific Income Accounts

+ + + + + + + + + + + + + + + + +
Penalty + {{ penaltyIncome.charge.name }} + Income Account + {{ penaltyIncome.incomeAccount.name }} +
+ +
+ +
+ +
+ + + +
+ + + + diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.scss b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.scss new file mode 100644 index 000000000..ffb197031 --- /dev/null +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.scss @@ -0,0 +1,62 @@ +@import "assets/styles/helper"; + +.tab-container { + padding: 1%; + margin: 1%; +} + +.mat-h3 { + margin-top: 10px !important; + font-weight: 300; + color: $status-approved; +} + +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; +} + +.mat-card .mat-divider-horizontal.mat-divider-inset { + margin: 0 0 0.5em 0; +} + +.margin-t { + margin-top: 1em; +} + +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; + } + } + } +} diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.spec.ts b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.spec.ts new file mode 100644 index 000000000..968909047 --- /dev/null +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FixedDepositGeneralTabComponent } from './fixed-deposit-general-tab.component'; + +describe('FixedDepositGeneralTabComponent', () => { + let component: FixedDepositGeneralTabComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ FixedDepositGeneralTabComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(FixedDepositGeneralTabComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.ts b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.ts new file mode 100644 index 000000000..af7d52038 --- /dev/null +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.ts @@ -0,0 +1,43 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { trigger, state, transition, animate, style } from '@angular/animations'; + +@Component({ + selector: 'mifosx-fixed-deposit-general-tab', + templateUrl: './fixed-deposit-general-tab.component.html', + styleUrls: ['./fixed-deposit-general-tab.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 FixedDepositGeneralTabComponent implements OnInit { + /** Fixed Deposit Product data. */ + fixedDepositProductData: any; + fixedDepositProductsTemplate: 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']; + + /** + * Retrieves the fixed deposit product data from `resolve`. + * @param {ActivatedRoute} route Activated Route. + */ + constructor(private route: ActivatedRoute) { + this.route.data.subscribe((data: { fixedDepositProduct: any, fixedDepositProductsTemplate: any }) => { + this.fixedDepositProductData = data.fixedDepositProduct; + this.fixedDepositProductsTemplate = data.fixedDepositProductsTemplate; + }); + } + + ngOnInit(): void { + } + +} diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html index ad9eb7c3b..afc8aaae4 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html @@ -1,495 +1,23 @@ -
- -
+ -
+ - + - + -
+ -

{{ fixedDepositProductData.name }}

- - - -

Details

- - - -
- Short Name: - {{ fixedDepositProductData.shortName }} -
- -
- Description: - {{ fixedDepositProductData.description }} -
- -

Currency

- - - -
- Currency: - {{ fixedDepositProductData.currency.name }} -
- -
- Decimal Places: - {{ fixedDepositProductData.currency.decimalPlaces }} -
- -
- Currency in Multiples Of: - {{ fixedDepositProductData.currency.inMultiplesOf | number}} -
- -

Terms

- - - -
- Deposit Amount: - {{ fixedDepositProductData.depositAmount + ' (Min: ' + (fixedDepositProductData.minDepositAmount ? fixedDepositProductData.minDepositAmount : fixedDepositProductData.depositAmount) + ', Max: ' + (fixedDepositProductData.maxDepositAmount ? fixedDepositProductData.maxDepositAmount : fixedDepositProductData.depositAmount) + ')' }} -
- -
- Interest Compounding Period: - {{ fixedDepositProductData.interestCompoundingPeriodType.value }} -
- -
- Interest Posting Period: - {{ fixedDepositProductData.interestPostingPeriodType.value }} -
- -
- Interest Calculated Using: - {{ fixedDepositProductData.interestCalculationType.value }} -
- -
- Days in Years: - {{ fixedDepositProductData.interestCalculationDaysInYearType.value }} -
- -

Settings

- - - -
- Lock-in Period: - - {{ fixedDepositProductData.lockinPeriodFrequency }} {{ fixedDepositProductData.lockinPeriodFrequencyType.value }} -
- -
- Minimum Deposit Term: - {{ fixedDepositProductData.minDepositTerm }} -   - {{ fixedDepositProductData.minDepositTermType.value }} -
- -
- Maximum Deposit Term: - {{ fixedDepositProductData.maxDepositTerm }} -   - {{ fixedDepositProductData.maxDepositTermType.value }} -
- -
- Deposit Term In multiple of: - {{ fixedDepositProductData.inMultiplesOfDepositTerm }} - - - {{ fixedDepositProductData.inMultiplesOfDepositTermType.value }} -
- -
- Apply Penal Interest (less): - {{ fixedDepositProductData.preClosurePenalApplicable ? 'Yes' : 'No' }} -
- -
- Penal Interest (%): - {{fixedDepositProductData.preClosurePenalInterest}}     %     On -    - {{fixedDepositProductData.preClosurePenalInterestOnType.value}} -
- -
- Balance Required For Interest Calculation: - {{ fixedDepositProductData.minBalanceForInterestCalculation | number }} -
- -
- Is withhold tax Applicable: - {{ fixedDepositProductData.withHoldTax ? 'Yes' : 'No' }} -
- -
- Withhold Tax group: - {{ fixedDepositProductData.taxGroup.name }} -
- -
- -

Interest Rate Chart

- - - -
- -
- Name: - {{ fixedDepositProductData.activeChart.name }} -
- -
- Valid from Date: - {{ fixedDepositProductData.activeChart.fromDate | dateFormat }} -
- -
- End Date: - {{ fixedDepositProductData.activeChart.endDate | dateFormat }} -
- -
- Description: - {{ fixedDepositProductData.activeChart.description }} -
- -
- Primary Grouping by Amount: - {{ fixedDepositProductData.activeChart.isPrimaryGroupingByAmount ? 'Yes' : 'No' }} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Period -
- {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }} -
-
-   -
-
Amount Range -
- {{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }} -
- -
-   -
-
Interest - {{ chartSlab.annualInterestRate }} - Description - {{ chartSlab.description }} - Actions - - -
- - -

- Incentives -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Entity Type - {{ incentive.entityType | find:fixedDepositProductsTemplate.chartTemplate.entityTypeOptions:'id':'value' }} - Attribute Name - {{ incentive.attributeName | find:fixedDepositProductsTemplate.chartTemplate.attributeNameOptions:'id':'value' }} - Condition Type - {{ incentive.conditionType | find:fixedDepositProductsTemplate.chartTemplate.conditionTypeOptions:'id':'value' }} - Attribute Value - {{ incentive.attributeValue | find:fixedDepositProductsTemplate.chartTemplate.genderOptions:'id':'name' }} - {{ incentive.attributeValue }} - {{ incentive.attributeValue | find:fixedDepositProductsTemplate.chartTemplate.clientTypeOptions:'id':'name' }} - {{ incentive.attributeValue | find:fixedDepositProductsTemplate.chartTemplate.clientClassificationOptions:'id':'name' }} - Incentive Type - {{ incentive.incentiveType | find:fixedDepositProductsTemplate.chartTemplate.incentiveTypeOptions:'id':'value'}} - Amount - {{ incentive.amount }} -
- -
-
-
- -
- -
- -
- -

Charges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name - {{ charge.name }} - Type - {{ charge.chargeCalculationType.value }} - Amount - {{ charge.amount | number }} - Collected On - {{ charge.chargeTimeType.value }} -
- -
- -

Accounting

- - - -
- Type: - {{ fixedDepositProductData.accountingRule.value }} -
- -
- -

Assets

- -
- Saving reference: - {{ fixedDepositProductData.accountingMappings.savingsReferenceAccount.name }} -
- -

Liabilities

- -
- Saving control: - {{ fixedDepositProductData.accountingMappings.savingsControlAccount.name }} - Savings transfers in suspense: - {{ fixedDepositProductData.accountingMappings.transfersInSuspenseAccount.name }} -
- -

Expenses

- -
- Interest on savings: - {{ fixedDepositProductData.accountingMappings.interestOnSavingsAccount.name }} -
- -

Income

- -
- Income from fees: - {{ fixedDepositProductData.accountingMappings.incomeFromFeeAccount.name }} - Income from penalties: - {{ fixedDepositProductData.accountingMappings.incomeFromPenaltyAccount.name }} -
- -
- -

Advanced Accounting Rules

- - - -
- -
-

Configure Fund Sources for Payment Channels

- - - - - - - - - - - - - - - - -
Payment Type - {{ paymentFundSource.paymentType.name }} - Fund Source - {{ paymentFundSource.fundSourceAccount.name }} -
- -
- -
- -

Fees to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Fees - {{ feesIncome.charge.name }} - Income Account - {{ feesIncome.incomeAccount.name }} -
- -
- -
- -

Penalties to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Penalty - {{ penaltyIncome.charge.name }} - Income Account - {{ penaltyIncome.incomeAccount.name }} -
- -
- -
- -
- -
- -
- -
- -
+
diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.scss b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.scss index 385fa6847..c345a82ac 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.scss +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.scss @@ -1,49 +1,13 @@ -table { - width: 100%; -} +.product-card { + margin: 0 auto; + max-width: 80rem; + width: 90%; + padding: 0; -.mat-elevation-z1 { - margin: 1em 0 1.5em 0; -} - -h2, h3, h4 { - margin: 0; - font-weight: 500; -} - -span { - margin: 0.5em 0; -} - -.mat-card .mat-divider-horizontal.mat-divider-inset { - margin: 0 0 0.5em 0; -} - -.margin-t { - margin-top: 1em; -} - -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; - } - } + .navigation-tabs { + overflow: auto; + } + i:hover { + cursor: pointer; } } diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts index 64af47fca..d160cf9f8 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts @@ -1,9 +1,6 @@ /** Angular Imports */ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { MatTable } from '@angular/material/table'; -import { MatDialog } from '@angular/material/dialog'; -import { trigger, state, transition, animate, style } from '@angular/animations'; /** * Fixed Deposit Product component. @@ -11,37 +8,21 @@ import { trigger, state, transition, animate, style } from '@angular/animations' @Component({ selector: 'mifosx-view-fixed-deposit-product', templateUrl: './view-fixed-deposit-product.component.html', - styleUrls: ['./view-fixed-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)')) - ]) - ] + styleUrls: ['./view-fixed-deposit-product.component.scss'] }) export class ViewFixedDepositProductComponent implements OnInit { - /** Fixed Deposit Product data. */ - fixedDepositProductData: any; - fixedDepositProductsTemplate: any; + fixedDepositDatatables: 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']; - - /** - * Retrieves the fixed deposit product data from `resolve`. - * @param {ActivatedRoute} route Activated Route. - */ constructor(private route: ActivatedRoute) { - this.route.data.subscribe((data: { fixedDepositProduct: any, fixedDepositProductsTemplate: any }) => { - this.fixedDepositProductData = data.fixedDepositProduct; - this.fixedDepositProductsTemplate = data.fixedDepositProductsTemplate; + this.route.data.subscribe((data: { fixedDepositDatatables: any }) => { + this.fixedDepositDatatables = []; + data.fixedDepositDatatables.forEach((datatable: any) => { + if (datatable.entitySubType === 'Fixed Deposit') { + this.fixedDepositDatatables.push(datatable); + } + }); }); } diff --git a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html index 88875e0da..5920fcb42 100644 --- a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html +++ b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html @@ -47,12 +47,12 @@ From Date - {{ floatingRatePeriod.fromDate | dateFormat : 'dd MMMM yyyy' }} + {{ floatingRatePeriod.fromDate | dateFormat }} Interest Rate - {{ floatingRatePeriod.interestRate }} + {{ floatingRatePeriod.interestRate | number }} @@ -68,11 +68,11 @@ Actions - - diff --git a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts index 2dcb9555b..37e3eccec 100644 --- a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts +++ b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts @@ -106,7 +106,9 @@ export class CreateFloatingRateComponent implements OnInit { */ addFloatingRatePeriod() { const floatingRatePeriodDialogRef = this.dialog.open(FloatingRatePeriodDialogComponent, { - data: {} + data: { + fromDate: this.settingsService.businessDate + } }); floatingRatePeriodDialogRef.afterClosed().subscribe((response: any) => { if (response) { @@ -131,7 +133,8 @@ export class CreateFloatingRateComponent implements OnInit { data: { fromDate: ratePeriod.fromDate, interestRate: ratePeriod.interestRate, - isDifferentialToBaseLendingRate: ratePeriod.isDifferentialToBaseLendingRate + isDifferentialToBaseLendingRate: ratePeriod.isDifferentialToBaseLendingRate, + isNew: true } }); editFloatingRatePeriodDialogRef.afterClosed().subscribe((response: any) => { diff --git a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html index 025ee8079..da6b42c10 100644 --- a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html +++ b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html @@ -24,7 +24,7 @@
- + Is Differential? @@ -38,4 +38,4 @@ - \ No newline at end of file + diff --git a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts index dec8d8bd0..ac571199b 100644 --- a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts +++ b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; +import { SettingsService } from 'app/settings/settings.service'; /** * Floating Rate Period Dialog Component. @@ -25,6 +26,7 @@ export class FloatingRatePeriodDialogComponent implements OnInit { */ constructor(public dialogRef: MatDialogRef, public formBuilder: FormBuilder, + private settingsService: SettingsService, @Inject(MAT_DIALOG_DATA) public data: any) { } @@ -32,7 +34,14 @@ export class FloatingRatePeriodDialogComponent implements OnInit { * Creates the floating rate period form. */ ngOnInit() { - const rowDisabled: Boolean = this.data ? (new Date(this.data.fromDate) < new Date() ? true : false) : false; + this.minDate = this.settingsService.businessDate; + let rowDisabled = false; + if (this.data && (new Date(this.data.fromDate) < this.minDate)) { + rowDisabled = true; + } + if (this.data.isNew) { + rowDisabled = false; + } this.floatingRatePeriodForm = this.formBuilder.group({ 'fromDate': [{ value: this.data ? new Date(this.data.fromDate) : '', disabled: rowDisabled }, Validators.required], 'interestRate': [{ value: this.data ? this.data.interestRate : '', disabled: rowDisabled }, Validators.required], diff --git a/src/app/products/products-routing.module.ts b/src/app/products/products-routing.module.ts index cca87e5eb..a9d857d58 100644 --- a/src/app/products/products-routing.module.ts +++ b/src/app/products/products-routing.module.ts @@ -120,6 +120,10 @@ import { SavingProductDatatableResolver } from './saving-products/saving-product import { SavingProductDatatablesResolver } from './saving-products/saving-product-datatables.resolver'; import { SavingProductGeneralTabComponent } from './saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component'; import { SavingProductDatatableTabComponent } from './saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component'; +import { FixedDepositGeneralTabComponent } from './fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component'; +import { FixedDepositDatatableTabComponent } from './fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-datatable-tab/fixed-deposit-datatable-tab.component'; +import { RecurringDepositGeneralTabComponent } from './recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component'; +import { RecurringDepositDatatableTabComponent } from './recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component'; /** Products Routes */ const routes: Routes = [ @@ -556,20 +560,36 @@ const routes: Routes = [ } }, { - path: ':id', - data: { title: extract('View Recurring Deposit Product'), routeParamBreadcrumb: 'id' }, + path: ':productId', + data: { title: extract('View Recurring Deposit Product'), breadcrumb: 'productId', routeParamBreadcrumb: 'productId' }, + component: ViewRecurringDepositProductComponent, resolve: { - recurringDepositProduct: RecurringDepositProductResolver + recurringDepositDatatables: SavingProductDatatablesResolver }, children: [ { path: '', - component: ViewRecurringDepositProductComponent, + redirectTo: 'general', + pathMatch: 'full' + }, + { + path: 'general', + component: RecurringDepositGeneralTabComponent, resolve: { - recurringDepositProduct: RecurringDepositProductResolver, - recurringDepositProductsTemplate: RecurringDepositProductsTemplateResolver + recurringDepositProduct: RecurringDepositProductResolver } }, + { + path: 'datatables', + children: [{ + path: ':datatableName', + component: RecurringDepositDatatableTabComponent, + data: { title: extract('Data Table View'), routeParamBreadcrumb: 'datatableName' }, + resolve: { + recurringDepositDatatable: SavingProductDatatableResolver + } + }] + }, { path: 'edit', data: { title: extract('Edit Recurring Deposit Product'), breadcrumb: 'edit', routeParamBreadcrumb: false }, @@ -602,20 +622,36 @@ const routes: Routes = [ }, }, { - path: ':id', - data: { title: extract('View Fixed Deposit Product'), routeParamBreadcrumb: 'id' }, + path: ':productId', + data: { title: extract('View Fixed Deposit Product'), breadcrumb: 'productId', routeParamBreadcrumb: 'productId' }, + component: ViewFixedDepositProductComponent, resolve: { - fixedDepositProduct: FixedDepositProductResolver, + fixedDepositDatatables: SavingProductDatatablesResolver }, children: [ { path: '', - component: ViewFixedDepositProductComponent, + redirectTo: 'general', + pathMatch: 'full' + }, + { + path: 'general', + component: FixedDepositGeneralTabComponent, resolve: { - fixedDepositProduct: FixedDepositProductResolver, - fixedDepositProductsTemplate: FixedDepositProductsTemplateResolver + fixedDepositProduct: FixedDepositProductResolver } }, + { + path: 'datatables', + children: [{ + path: ':datatableName', + component: FixedDepositDatatableTabComponent, + data: { title: extract('Data Table View'), routeParamBreadcrumb: 'datatableName' }, + resolve: { + fixedDepositDatatable: SavingProductDatatableResolver + } + }] + }, { path: 'edit', data: { title: extract('Edit Fixed Deposit Product'), breadcrumb: 'edit', routeParamBreadcrumb: false }, diff --git a/src/app/products/products.module.ts b/src/app/products/products.module.ts index dfddc9d31..3ecdb3550 100644 --- a/src/app/products/products.module.ts +++ b/src/app/products/products.module.ts @@ -110,6 +110,10 @@ import { DatatableTabComponent } from './loan-products/view-loan-product/datatab import { GeneralTabComponent } from './loan-products/view-loan-product/general-tab/general-tab.component'; import { SavingProductGeneralTabComponent } from './saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component'; import { SavingProductDatatableTabComponent } from './saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component'; +import { FixedDepositGeneralTabComponent } from './fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component'; +import { FixedDepositDatatableTabComponent } from './fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-datatable-tab/fixed-deposit-datatable-tab.component'; +import { RecurringDepositDatatableTabComponent } from './recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component'; +import { RecurringDepositGeneralTabComponent } from './recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component'; /** * Products Module @@ -227,7 +231,11 @@ import { SavingProductDatatableTabComponent } from './saving-products/view-savin DatatableTabComponent, GeneralTabComponent, SavingProductGeneralTabComponent, - SavingProductDatatableTabComponent + SavingProductDatatableTabComponent, + FixedDepositGeneralTabComponent, + FixedDepositDatatableTabComponent, + RecurringDepositDatatableTabComponent, + RecurringDepositGeneralTabComponent ], entryComponents: [ DepositProductIncentiveFormDialogComponent, diff --git a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts index 5c71a52f6..3bbbbc703 100644 --- a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts +++ b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts @@ -25,8 +25,8 @@ export class RecurringDepositProductAndTemplateResolver implements Resolve} */ resolve(route: ActivatedRouteSnapshot): Observable { - const recurringDepositProductId = route.paramMap.get('id'); - return this.productsService.getRecurringDepositProductAndTemplate(recurringDepositProductId); + const productId = route.parent.paramMap.get('productId'); + return this.productsService.getRecurringDepositProductAndTemplate(productId); } } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts index 48d48806d..0fd98693a 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts @@ -24,8 +24,8 @@ export class RecurringDepositProductResolver implements Resolve { * @returns {Observable} */ resolve(route: ActivatedRouteSnapshot): Observable { - const id = route.paramMap.get('id'); - return this.productsService.getRecurringDepositProduct(id); + const productId = route.parent.paramMap.get('productId'); + return this.productsService.getRecurringDepositProduct(productId); } } diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.html b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.html new file mode 100644 index 000000000..f35eb100c --- /dev/null +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.html @@ -0,0 +1,9 @@ +
+ + +
diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.scss b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.spec.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.spec.ts new file mode 100644 index 000000000..134d52a52 --- /dev/null +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RecurringDepositDatatableTabComponent } from './recurring-deposit-datatable-tab.component'; + +describe('RecurringDepositDatatableTabComponent', () => { + let component: RecurringDepositDatatableTabComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ RecurringDepositDatatableTabComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(RecurringDepositDatatableTabComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.ts new file mode 100644 index 000000000..5d09c1479 --- /dev/null +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'mifosx-recurring-deposit-datatable-tab', + templateUrl: './recurring-deposit-datatable-tab.component.html', + styleUrls: ['./recurring-deposit-datatable-tab.component.scss'] +}) +export class RecurringDepositDatatableTabComponent implements OnInit { + + entityId: string; + entityDatatable: any; + multiRowDatatableFlag: boolean; + + constructor(private route: ActivatedRoute) { + this.entityId = this.route.parent.parent.snapshot.paramMap.get('productId'); + + this.route.data.subscribe((data: { recurringDepositDatatable: any }) => { + this.entityDatatable = data.recurringDepositDatatable; + this.multiRowDatatableFlag = this.entityDatatable.columnHeaders[0].columnName === 'id' ? true : false; + }); + } + + ngOnInit(): void { + } + +} diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.html b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.html new file mode 100644 index 000000000..2603bd124 --- /dev/null +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.html @@ -0,0 +1,499 @@ +
+ +
+ +
+ + + + + +
+ +

{{ recurringDepositProduct.name }}

+ + + +

Details

+ + + +
+ Short Name: + {{ recurringDepositProduct.shortName }} +
+ +
+ Description: + {{ recurringDepositProduct.description }} +
+ +

Currency Details

+ + + +
+ Currency: + {{ recurringDepositProduct.currency.name }} +
+ +
+ Decimal Places: + {{ recurringDepositProduct.currency.decimalPlaces }} +
+ +
+ Currency in Multiples Of: + {{ recurringDepositProduct.currency.inMultiplesOf | number}} +
+ +

Terms

+ + + +
+ Deposit Amount: + {{ recurringDepositProduct.depositAmount + ' (Min: ' + (recurringDepositProduct.minDepositAmount ? recurringDepositProduct.minDepositAmount : recurringDepositProduct.depositAmount) + ', Max: ' + (recurringDepositProduct.maxDepositAmount ? recurringDepositProduct.maxDepositAmount : recurringDepositProduct.depositAmount) + ')' }} +
+ +
+ Interest Compounding Period: + {{ recurringDepositProduct.interestCompoundingPeriodType.value }} +
+ +
+ Interest Posting Period: + {{ recurringDepositProduct.interestPostingPeriodType.value }} +
+ +
+ Interested Calculated Using: + {{ recurringDepositProduct.interestCalculationType.value }} +
+ +
+ Days in Years: + {{ recurringDepositProduct.interestCalculationDaysInYearType.value }} +
+ +

Settings

+ + + +
+ Lock-in Period: + + {{ recurringDepositProduct.lockinPeriodFrequency }} + {{ recurringDepositProduct.lockinPeriodFrequencyType.value }} +
+ +
+ Minimum Deposit Term: + {{ recurringDepositProduct.minDepositTerm }} +   + {{ recurringDepositProduct.minDepositTermType.value }} +
+ +
+ Maximum Deposit Term: + {{ recurringDepositProduct.maxDepositTerm }} +   + {{ recurringDepositProduct.maxDepositTermType.value }} +
+ +
+ Deposit Term In multiple of: + {{ recurringDepositProduct.inMultipleOfDepositTerm }} + - + {{ recurringDepositProduct.inMultipleOfDepositTermType.value }} +
+ +
+ Recurring Deposit Type: + Mandatory + Voluntary +
+ +
+ Apply penal interest (less): + {{recurringDepositProduct.preClosurePenalInterest}}     %     On +    + {{recurringDepositProduct.preClosurePenalInterestOnType.value}} +
+ +
+ Is withhold tax Applicable: + {{ recurringDepositProduct.withHoldTax }} +
+ +
+ Withhold Tax group: + {{ recurringDepositProduct.taxGroup.name }} +
+ +
+ +

Interest Rate Charts

+ + + +
+ +
+ Name: + {{ recurringDepositProduct.activeChart.name }} +
+ +
+ Valid from Date: + {{ recurringDepositProduct.activeChart.fromDate | dateFormat }} +
+ +
+ End Date: + {{ recurringDepositProduct.activeChart.endDate | dateFormat }} +
+ +
+ Description: + {{ recurringDepositProduct.activeChart.description }} +
+ +
+ Primary Grouping by Amount: + {{ recurringDepositProduct.activeChart.isPrimaryGroupingByAmount ? 'Yes' : 'No' }} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Period +
+ {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }} +
+
+   +
+
Amount Range +
+ {{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }} +
+ +
+   +
+
Interest + {{ chartSlab.annualInterestRate }} + Description + {{ chartSlab.description }} + Actions + + +
+ + +

+ Incentives +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Entity Type + {{ incentive.entityType | find:recurringDepositProductTemplate.chartTemplate.entityTypeOptions:'id':'value' }} + Attribute Name + {{ incentive.attributeName | find:recurringDepositProductTemplate.chartTemplate.attributeNameOptions:'id':'value' }} + Condition Type + {{ incentive.conditionType | find:recurringDepositProductTemplate.chartTemplate.conditionTypeOptions:'id':'value' }} + Attribute Value + {{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.genderOptions:'id':'name' }} + {{ incentive.attributeValue }} + {{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.clientTypeOptions:'id':'name' }} + {{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.clientClassificationOptions:'id':'name' }} + Incentive Type + {{ incentive.incentiveType | find:recurringDepositProductTemplate.chartTemplate.incentiveTypeOptions:'id':'value'}} + Amount + {{ incentive.amount }} +
+ +
+
+
+ + + +
+ +
+ +
+ +

Charges

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name + {{ charge.name }} + Type + {{ charge.chargeCalculationType.value }} + Amount + {{ charge.amount | number }} + Collected On + {{ charge.chargeTimeType.value }} +
+ +
+ +

Accounting

+ + + +
+ Type: + {{ recurringDepositProduct.accountingRule.value }} +
+ +
+ +

Assets

+ +
+ Saving reference: + {{ recurringDepositProduct.accountingMappings.savingsReferenceAccount.name }} +
+ +

Liabilities

+ +
+ Saving control: + {{ recurringDepositProduct.accountingMappings.savingsControlAccount.name }} + Savings transfers in suspense: + {{ recurringDepositProduct.accountingMappings.transfersInSuspenseAccount.name }} +
+ +

Expenses

+ +
+ Interest on savings: + {{ recurringDepositProduct.accountingMappings.interestOnSavingsAccount.name }} + Write-off: + {{ recurringDepositProduct.accountingMappings.writeOffAccount.name }} +
+ +

Income

+ +
+ Income from fees: + {{ recurringDepositProduct.accountingMappings.incomeFromFeeAccount.name }} + Income from penalties: + {{ recurringDepositProduct.accountingMappings.incomeFromPenaltyAccount.name }} +
+ +
+ +

Advanced Accounting Rules

+ + + +
+

Configure Fund Sources for Payment Channels

+ + + + + + + + + + + + + + + + +
Payment Type + {{ paymentFundSource.paymentType.name }} + Fund Source + {{ paymentFundSource.fundSourceAccount.name }} +
+
+ + +
+ + +

Fees to Specific Income Accounts

+ + + + + + + + + + + + + + + + +
Fees + {{ feesIncome.charge.name }} + Income Account + {{ feesIncome.incomeAccount.name }} +
+ +
+ +
+ +

Penalties to Specific Income Accounts

+ + + + + + + + + + + + + + + + +
Penalty + {{ penaltyIncome.charge.name }} + Income Account + {{ penaltyIncome.incomeAccount.name }} +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.scss b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.scss new file mode 100644 index 000000000..081f8a5f9 --- /dev/null +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.scss @@ -0,0 +1,83 @@ +@import "assets/styles/helper"; + +.tab-container { + padding: 1%; + margin: 1%; +} + +.mat-h3 { + margin-top: 10px !important; + font-weight: 300; + color: $status-approved; +} + +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; +} diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.spec.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.spec.ts new file mode 100644 index 000000000..8e934965e --- /dev/null +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RecurringDepositGeneralTabComponent } from './recurring-deposit-general-tab.component'; + +describe('RecurringDepositGeneralTabComponent', () => { + let component: RecurringDepositGeneralTabComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ RecurringDepositGeneralTabComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(RecurringDepositGeneralTabComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.ts new file mode 100644 index 000000000..84269a669 --- /dev/null +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.ts @@ -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-recurring-deposit-general-tab', + templateUrl: './recurring-deposit-general-tab.component.html', + styleUrls: ['./recurring-deposit-general-tab.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 RecurringDepositGeneralTabComponent 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(): void { + } + +} diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html index 8b15a183c..6c1918448 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html @@ -1,499 +1,23 @@ -
- -
+ -
+ - + - + -
+ -

{{ recurringDepositProduct.name }}

- - - -

Details

- - - -
- Short Name: - {{ recurringDepositProduct.shortName }} -
- -
- Description: - {{ recurringDepositProduct.description }} -
- -

Currency Details

- - - -
- Currency: - {{ recurringDepositProduct.currency.name }} -
- -
- Decimal Places: - {{ recurringDepositProduct.currency.decimalPlaces }} -
- -
- Currency in Multiples Of: - {{ recurringDepositProduct.currency.inMultiplesOf | number}} -
- -

Terms

- - - -
- Deposit Amount: - {{ recurringDepositProduct.depositAmount + ' (Min: ' + (recurringDepositProduct.minDepositAmount ? recurringDepositProduct.minDepositAmount : recurringDepositProduct.depositAmount) + ', Max: ' + (recurringDepositProduct.maxDepositAmount ? recurringDepositProduct.maxDepositAmount : recurringDepositProduct.depositAmount) + ')' }} -
- -
- Interest Compounding Period: - {{ recurringDepositProduct.interestCompoundingPeriodType.value }} -
- -
- Interest Posting Period: - {{ recurringDepositProduct.interestPostingPeriodType.value }} -
- -
- Interested Calculated Using: - {{ recurringDepositProduct.interestCalculationType.value }} -
- -
- Days in Years: - {{ recurringDepositProduct.interestCalculationDaysInYearType.value }} -
- -

Settings

- - - -
- Lock-in Period: - - {{ recurringDepositProduct.lockinPeriodFrequency }} - {{ recurringDepositProduct.lockinPeriodFrequencyType.value }} -
- -
- Minimum Deposit Term: - {{ recurringDepositProduct.minDepositTerm }} -   - {{ recurringDepositProduct.minDepositTermType.value }} -
- -
- Maximum Deposit Term: - {{ recurringDepositProduct.maxDepositTerm }} -   - {{ recurringDepositProduct.maxDepositTermType.value }} -
- -
- Deposit Term In multiple of: - {{ recurringDepositProduct.inMultipleOfDepositTerm }} - - - {{ recurringDepositProduct.inMultipleOfDepositTermType.value }} -
- -
- Recurring Deposit Type: - Mandatory - Voluntary -
- -
- Apply penal interest (less): - {{recurringDepositProduct.preClosurePenalInterest}}     %     On -    - {{recurringDepositProduct.preClosurePenalInterestOnType.value}} -
- -
- Is withhold tax Applicable: - {{ recurringDepositProduct.withHoldTax }} -
- -
- Withhold Tax group: - {{ recurringDepositProduct.taxGroup.name }} -
- -
- -

Interest Rate Charts

- - - -
- -
- Name: - {{ recurringDepositProduct.activeChart.name }} -
- -
- Valid from Date: - {{ recurringDepositProduct.activeChart.fromDate | dateFormat }} -
- -
- End Date: - {{ recurringDepositProduct.activeChart.endDate | dateFormat }} -
- -
- Description: - {{ recurringDepositProduct.activeChart.description }} -
- -
- Primary Grouping by Amount: - {{ recurringDepositProduct.activeChart.isPrimaryGroupingByAmount ? 'Yes' : 'No' }} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Period -
- {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }} -
-
-   -
-
Amount Range -
- {{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }} -
- -
-   -
-
Interest - {{ chartSlab.annualInterestRate }} - Description - {{ chartSlab.description }} - Actions - - -
- - -

- Incentives -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Entity Type - {{ incentive.entityType | find:recurringDepositProductTemplate.chartTemplate.entityTypeOptions:'id':'value' }} - Attribute Name - {{ incentive.attributeName | find:recurringDepositProductTemplate.chartTemplate.attributeNameOptions:'id':'value' }} - Condition Type - {{ incentive.conditionType | find:recurringDepositProductTemplate.chartTemplate.conditionTypeOptions:'id':'value' }} - Attribute Value - {{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.genderOptions:'id':'name' }} - {{ incentive.attributeValue }} - {{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.clientTypeOptions:'id':'name' }} - {{ incentive.attributeValue | find:recurringDepositProductTemplate.chartTemplate.clientClassificationOptions:'id':'name' }} - Incentive Type - {{ incentive.incentiveType | find:recurringDepositProductTemplate.chartTemplate.incentiveTypeOptions:'id':'value'}} - Amount - {{ incentive.amount }} -
- -
-
-
- - - -
- -
- -
- -

Charges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name - {{ charge.name }} - Type - {{ charge.chargeCalculationType.value }} - Amount - {{ charge.amount | number }} - Collected On - {{ charge.chargeTimeType.value }} -
- -
- -

Accounting

- - - -
- Type: - {{ recurringDepositProduct.accountingRule.value }} -
- -
- -

Assets

- -
- Saving reference: - {{ recurringDepositProduct.accountingMappings.savingsReferenceAccount.name }} -
- -

Liabilities

- -
- Saving control: - {{ recurringDepositProduct.accountingMappings.savingsControlAccount.name }} - Savings transfers in suspense: - {{ recurringDepositProduct.accountingMappings.transfersInSuspenseAccount.name }} -
- -

Expenses

- -
- Interest on savings: - {{ recurringDepositProduct.accountingMappings.interestOnSavingsAccount.name }} - Write-off: - {{ recurringDepositProduct.accountingMappings.writeOffAccount.name }} -
- -

Income

- -
- Income from fees: - {{ recurringDepositProduct.accountingMappings.incomeFromFeeAccount.name }} - Income from penalties: - {{ recurringDepositProduct.accountingMappings.incomeFromPenaltyAccount.name }} -
- -
- -

Advanced Accounting Rules

- - - -
-

Configure Fund Sources for Payment Channels

- - - - - - - - - - - - - - - - -
Payment Type - {{ paymentFundSource.paymentType.name }} - Fund Source - {{ paymentFundSource.fundSourceAccount.name }} -
-
- - -
- - -

Fees to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Fees - {{ feesIncome.charge.name }} - Income Account - {{ feesIncome.incomeAccount.name }} -
- -
- -
- -

Penalties to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Penalty - {{ penaltyIncome.charge.name }} - Income Account - {{ penaltyIncome.incomeAccount.name }} -
- -
- -
- -
- -
- -
- -
- -
+
diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.scss b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.scss index edcf8f5c1..c345a82ac 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.scss +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.scss @@ -1,70 +1,13 @@ -table { - width: 100%; -} +.product-card { + margin: 0 auto; + max-width: 80rem; + width: 90%; + padding: 0; -.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; - } - } - } + .navigation-tabs { + overflow: auto; } - - .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; + i:hover { + cursor: pointer; } +} diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts index e8ff8a505..49ecc001c 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts @@ -1,35 +1,23 @@ 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)')) - ]) - ] + styleUrls: ['./view-recurring-deposit-product.component.scss'] }) 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']; + recurringDepositDatatables: any = []; constructor(private route: ActivatedRoute) { - this.route.data.subscribe((data: { recurringDepositProduct: any, recurringDepositProductsTemplate: any}) => { - this.recurringDepositProduct = data.recurringDepositProduct; - this.recurringDepositProductTemplate = data.recurringDepositProductsTemplate; + this.route.data.subscribe((data: { recurringDepositDatatables: any }) => { + this.recurringDepositDatatables = []; + data.recurringDepositDatatables.forEach((datatable: any) => { + if (datatable.entitySubType === 'Recurring Deposit') { + this.recurringDepositDatatables.push(datatable); + } + }); }); } diff --git a/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts b/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts index 2ef248a71..d8beff529 100644 --- a/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts +++ b/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts @@ -18,8 +18,8 @@ export class SavingProductDatatableTabComponent implements OnInit { this.entityDatatable = data.savingProductDatatable; this.multiRowDatatableFlag = this.entityDatatable.columnHeaders[0].columnName === 'id' ? true : false; }); - } + ngOnInit(): void { } diff --git a/src/app/system/manage-data-tables/manage-data-tables.component.html b/src/app/system/manage-data-tables/manage-data-tables.component.html index 153a8083f..622c967d4 100644 --- a/src/app/system/manage-data-tables/manage-data-tables.component.html +++ b/src/app/system/manage-data-tables/manage-data-tables.component.html @@ -30,6 +30,10 @@ {{ dataTable.applicationTableName }} + + Sub Type + {{ dataTable.entitySubType }} + diff --git a/src/app/system/manage-data-tables/manage-data-tables.component.ts b/src/app/system/manage-data-tables/manage-data-tables.component.ts index 800ff6481..369ddcfb6 100644 --- a/src/app/system/manage-data-tables/manage-data-tables.component.ts +++ b/src/app/system/manage-data-tables/manage-data-tables.component.ts @@ -25,7 +25,7 @@ export class ManageDataTablesComponent implements OnInit, AfterViewInit { /** Data table data. */ dataTableData: any; /** Columns to be displayed in manage data tables table. */ - displayedColumns: string[] = ['registeredTableName', 'applicationTableName']; + displayedColumns: string[] = ['registeredTableName', 'applicationTableName', 'entitySubType']; /** Data source for manage data tables table. */ dataSource: MatTableDataSource;