diff --git a/src/app/core/utils/datatables.ts b/src/app/core/utils/datatables.ts index fe4fc0fc7..1d1ba6ce4 100644 --- a/src/app/core/utils/datatables.ts +++ b/src/app/core/utils/datatables.ts @@ -13,7 +13,7 @@ import { Dates } from './dates'; export class Datatables { systemFields: string[] = ['id', 'created_at', 'updated_at', 'client_id', 'savings_account_id', - 'loan_id', 'group_id', 'center_id', 'office_id', 'product_loan_id', 'savings_product_id']; + 'loan_id', 'group_id', 'center_id', 'office_id', 'product_loan_id', 'savings_product_id', 'share_product_id']; constructor(private dateUtils: Dates, private settingsService: SettingsService) { } diff --git a/src/app/products/products-routing.module.ts b/src/app/products/products-routing.module.ts index b542abfb5..b045cec47 100644 --- a/src/app/products/products-routing.module.ts +++ b/src/app/products/products-routing.module.ts @@ -124,6 +124,10 @@ import { FixedDepositGeneralTabComponent } from './fixed-deposit-products/view-f 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'; +import { ShareProductGeneralTabComponent } from './share-products/view-share-product/share-product-general-tab/share-product-general-tab.component'; +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'; /** Products Routes */ const routes: Routes = [ @@ -228,7 +232,6 @@ const routes: Routes = [ { path: '', component: ViewSavingProductComponent, - children: [ { path: '', @@ -288,18 +291,41 @@ const routes: Routes = [ } }, { - path: ':id', - data: { title: extract('View Share Product'), routeParamBreadcrumb: 'id' }, + path: ':productId', + data: { title: extract('View Share Product'), breadcrumb: 'productId', routeParamBreadcrumb: 'productId' }, resolve: { - shareProduct: ShareProductResolver + shareProductDatatables: ShareProductDatatablesResolver }, children: [ { path: '', component: ViewShareProductComponent, - resolve: { - shareProduct: ShareProductResolver - }, + children: [ + { + path: '', + redirectTo: 'general', + pathMatch: 'full' + }, + { + path: 'general', + data: { title: extract('General'), breadcrumb: 'General', routeParamBreadcrumb: false }, + component: ShareProductGeneralTabComponent, + resolve: { + shareProduct: ShareProductResolver + }, + }, + { + path: 'datatables', + children: [{ + path: ':datatableName', + component: ShareProductDatatableTabComponent, + data: { title: extract('Data Table View'), routeParamBreadcrumb: 'datatableName' }, + resolve: { + shareProductDatatable: ShareProductDatatableResolver + } + }] + } + ] }, { path: 'edit', diff --git a/src/app/products/products.module.ts b/src/app/products/products.module.ts index 3ecdb3550..ed66d801c 100644 --- a/src/app/products/products.module.ts +++ b/src/app/products/products.module.ts @@ -114,6 +114,8 @@ import { FixedDepositGeneralTabComponent } from './fixed-deposit-products/view-f 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'; +import { ShareProductGeneralTabComponent } from './share-products/view-share-product/share-product-general-tab/share-product-general-tab.component'; +import { ShareProductDatatableTabComponent } from './share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component'; /** * Products Module @@ -235,7 +237,9 @@ import { RecurringDepositGeneralTabComponent } from './recurring-deposit-product FixedDepositGeneralTabComponent, FixedDepositDatatableTabComponent, RecurringDepositDatatableTabComponent, - RecurringDepositGeneralTabComponent + RecurringDepositGeneralTabComponent, + ShareProductGeneralTabComponent, + ShareProductDatatableTabComponent ], entryComponents: [ DepositProductIncentiveFormDialogComponent, diff --git a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html index 2657e85a4..7402605c1 100644 --- a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html +++ b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html @@ -215,21 +215,21 @@
Saving reference: - {{ savingProduct.accountingMappings.savingsReferenceAccount.name }} + ({{ savingProduct.accountingMappings.savingsReferenceAccount.glCode }}) {{ savingProduct.accountingMappings.savingsReferenceAccount.name }} Overdraft portfolio: - {{ savingProduct.accountingMappings.overdraftPortfolioControl.name }} + ({{ savingProduct.accountingMappings.overdraftPortfolioControl.glCode }}) {{ savingProduct.accountingMappings.overdraftPortfolioControl.name }}

Liabilities

Saving control: - {{ savingProduct.accountingMappings.savingsControlAccount.name }} + ({{ savingProduct.accountingMappings.savingsControlAccount.glCode }}) {{ savingProduct.accountingMappings.savingsControlAccount.name }} Savings transfers in suspense: - {{ savingProduct.accountingMappings.transfersInSuspenseAccount.name }} + ({{ savingProduct.accountingMappings.transfersInSuspenseAccount.glCode }}) {{ savingProduct.accountingMappings.transfersInSuspenseAccount.name }}
Escheat liability: - {{ savingProduct.accountingMappings.escheatLiabilityAccount.name }} + ({{ savingProduct.accountingMappings.escheatLiabilityAccount.glCode }}) {{ savingProduct.accountingMappings.escheatLiabilityAccount.name }}
@@ -237,20 +237,20 @@
Interest on savings: - {{ savingProduct.accountingMappings.interestOnSavingsAccount.name }} + ({{ savingProduct.accountingMappings.interestOnSavingsAccount.glCode }}) {{ savingProduct.accountingMappings.interestOnSavingsAccount.name }} Write-off: - {{ savingProduct.accountingMappings.writeOffAccount.name }} + ({{ savingProduct.accountingMappings.writeOffAccount.glCode }}) {{ savingProduct.accountingMappings.writeOffAccount.name }}

Income

Income from fees: - {{ savingProduct.accountingMappings.incomeFromFeeAccount.name }} + ({{ savingProduct.accountingMappings.incomeFromFeeAccount.glCode }}) {{ savingProduct.accountingMappings.incomeFromFeeAccount.name }} Income from penalties: - {{ savingProduct.accountingMappings.incomeFromPenaltyAccount.name }} + ({{ savingProduct.accountingMappings.incomeFromPenaltyAccount.glCode }}) {{ savingProduct.accountingMappings.incomeFromPenaltyAccount.name }} Overdraft Interest Income: - {{ savingProduct.accountingMappings.incomeFromInterest.name }} + ({{ savingProduct.accountingMappings.incomeFromInterest.glCode }}) {{ savingProduct.accountingMappings.incomeFromInterest.name }}
@@ -275,7 +275,7 @@ Fund Source - {{ paymentFundSource.fundSourceAccount.name }} + ({{ paymentFundSource.fundSourceAccount.glCode }}) {{ paymentFundSource.fundSourceAccount.name }} @@ -302,7 +302,7 @@ Income Account - {{ feesIncome.incomeAccount.name }} + ({{ feesIncome.incomeAccount.glCode }}) {{ feesIncome.incomeAccount.name }} @@ -329,7 +329,7 @@ Income Account - {{ penaltyIncome.incomeAccount.name }} + ({{ penaltyIncome.incomeAccount.glCode }}) {{ penaltyIncome.incomeAccount.name }} diff --git a/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts b/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts index 59ce7ffac..771cfb568 100644 --- a/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts +++ b/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts @@ -24,8 +24,8 @@ export class ShareProductAndTemplateResolver implements Resolve { * @returns {Observable} */ resolve(route: ActivatedRouteSnapshot): Observable { - const shareProductId = route.paramMap.get('id'); - return this.productsService.getShareProduct(shareProductId, true); + const productId = route.parent.paramMap.get('productId'); + return this.productsService.getShareProduct(productId, true); } } diff --git a/src/app/products/share-products/share-product-datatable.resolver.spec.ts b/src/app/products/share-products/share-product-datatable.resolver.spec.ts new file mode 100644 index 000000000..92f82e22c --- /dev/null +++ b/src/app/products/share-products/share-product-datatable.resolver.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { ShareProductDatatableResolver } from './share-product-datatable.resolver'; + +describe('ShareProductDatatableResolver', () => { + let resolver: ShareProductDatatableResolver; + + beforeEach(() => { + TestBed.configureTestingModule({}); + resolver = TestBed.inject(ShareProductDatatableResolver); + }); + + it('should be created', () => { + expect(resolver).toBeTruthy(); + }); +}); diff --git a/src/app/products/share-products/share-product-datatable.resolver.ts b/src/app/products/share-products/share-product-datatable.resolver.ts new file mode 100644 index 000000000..5a553cb88 --- /dev/null +++ b/src/app/products/share-products/share-product-datatable.resolver.ts @@ -0,0 +1,30 @@ +import { Injectable } from '@angular/core'; +import { + Router, Resolve, + RouterStateSnapshot, + ActivatedRouteSnapshot +} from '@angular/router'; +import { SystemService } from 'app/system/system.service'; +import { Observable, of } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class ShareProductDatatableResolver implements Resolve { + + /** + * @param {SystemService} systemService Products service. + */ + constructor(private systemService: SystemService) { } + + /** + * Returns the loan product data. + * @returns {Observable} + */ + resolve(route: ActivatedRouteSnapshot): Observable { + const productId = route.parent.parent.paramMap.get('productId'); + const datatableName = route.paramMap.get('datatableName'); + return this.systemService.getEntityDatatable(productId, datatableName); + } + +} diff --git a/src/app/products/share-products/share-product-datatables.resolver.spec.ts b/src/app/products/share-products/share-product-datatables.resolver.spec.ts new file mode 100644 index 000000000..ec3dfd408 --- /dev/null +++ b/src/app/products/share-products/share-product-datatables.resolver.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { ShareProductDatatablesResolver } from './share-product-datatables.resolver'; + +describe('ShareProductDatatablesResolver', () => { + let resolver: ShareProductDatatablesResolver; + + beforeEach(() => { + TestBed.configureTestingModule({}); + resolver = TestBed.inject(ShareProductDatatablesResolver); + }); + + it('should be created', () => { + expect(resolver).toBeTruthy(); + }); +}); diff --git a/src/app/products/share-products/share-product-datatables.resolver.ts b/src/app/products/share-products/share-product-datatables.resolver.ts new file mode 100644 index 000000000..7bc452029 --- /dev/null +++ b/src/app/products/share-products/share-product-datatables.resolver.ts @@ -0,0 +1,27 @@ +import { Injectable } from '@angular/core'; +import { + Router, Resolve, + RouterStateSnapshot, + ActivatedRouteSnapshot +} from '@angular/router'; +import { SystemService } from 'app/system/system.service'; +import { Observable, of } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class ShareProductDatatablesResolver implements Resolve { + + /** + * @param {SystemService} systemService Products service. + */ + constructor(private systemService: SystemService) { } + + /** + * Returns the loan product data. + * @returns {Observable} + */ + resolve(route: ActivatedRouteSnapshot): Observable { + return this.systemService.getEntityDatatables('m_share_product'); + } +} diff --git a/src/app/products/share-products/share-product-resolver.ts b/src/app/products/share-products/share-product-resolver.ts index 3628c7f31..76c863360 100644 --- a/src/app/products/share-products/share-product-resolver.ts +++ b/src/app/products/share-products/share-product-resolver.ts @@ -24,8 +24,8 @@ export class ShareProductResolver implements Resolve { * @returns {Observable} */ resolve(route: ActivatedRouteSnapshot): Observable { - const id = route.paramMap.get('id'); - return this.productsService.getShareProduct(id); + const productId = route.parent.paramMap.get('productId'); + return this.productsService.getShareProduct(productId); } } diff --git a/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.html b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.html new file mode 100644 index 000000000..963b5539b --- /dev/null +++ b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.html @@ -0,0 +1,9 @@ +
+ + +
diff --git a/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.scss b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.spec.ts b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.spec.ts new file mode 100644 index 000000000..969bd668a --- /dev/null +++ b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ShareProductDatatableTabComponent } from './share-product-datatable-tab.component'; + +describe('ShareProductDatatableTabComponent', () => { + let component: ShareProductDatatableTabComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ShareProductDatatableTabComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ShareProductDatatableTabComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.ts b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.ts new file mode 100644 index 000000000..2918c0e8d --- /dev/null +++ b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'mifosx-share-product-datatable-tab', + templateUrl: './share-product-datatable-tab.component.html', + styleUrls: ['./share-product-datatable-tab.component.scss'] +}) +export class ShareProductDatatableTabComponent 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: { shareProductDatatable: any }) => { + this.entityDatatable = data.shareProductDatatable; + this.multiRowDatatableFlag = this.entityDatatable.columnHeaders[0].columnName === 'id' ? true : false; + }); + } + + ngOnInit(): void { + } + +} diff --git a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.html b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.html new file mode 100644 index 000000000..a8069de4e --- /dev/null +++ b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.html @@ -0,0 +1,224 @@ +
+ + +
+ +
+ + + + + +
+ +

{{ shareProduct.name }}

+ + + +

Details

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

Currency

+ + + +
+ Currency: + {{ shareProduct.currency.name }} +
+ +
+ Decimal Places: + {{ shareProduct.currency.decimalPlaces }} +
+ +
+ Currency in multiples of: + {{ shareProduct.currency.inMultiplesOf }} +
+ +

Terms

+ + + +
+ Total Number of Shares: + {{ shareProduct.totalShares }} +
+ +
+ Shares to be Issued: + {{ shareProduct.totalSharesIssued }} +
+ +
+ Nominal/Unit Price: + {{ shareProduct.unitPrice }} +
+ +
+ Capital Value: + {{ shareProduct.shareCapital }} +
+ +

Settings

+ + + +
+ Shares per Client: + {{ shareProduct.nominalShares + ' (Min: ' + (shareProduct.minimumShares ? shareProduct.minimumShares : shareProduct.nominalShares) + ', Max: ' + (shareProduct.maximumShares ? shareProduct.maximumShares : shareProduct.nominalShares) + ')' }} +
+ +
+ Minimum Active Period: + {{ shareProduct.minimumActivePeriod + ' ' + shareProduct.minimumActivePeriodForDividendsTypeEnum.value }} +
+ +
+ Lock-in Period: + {{ shareProduct.lockinPeriod + ' ' + shareProduct.lockPeriodTypeEnum.value }} +
+ +
+ Allow dividends for inactive clients: + {{ shareProduct.allowDividendCalculationForInactiveClients ? 'Yes' : 'No' }} +
+ +
+ +

Market Price Periods

+ + + + + + + + + + + + + + + + + + +
From Date + {{ marketPrice.fromDate | dateFormat }} + Nominal/Unit Price + {{ marketPrice.shareValue }} +
+ +
+ +
+ +

Charges

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name + {{ charge.name + ', ' + charge.currency.displaySymbol }} + Type + {{ charge.chargeCalculationType.value }} + Amount + {{ charge.amount | numberFormat }} + Collected On + {{ charge.chargeTimeType.value }} +
+ +
+ +

Accounting

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

Assets

+ +
+ Share reference: + ({{ shareProduct.accountingMappings.shareReferenceId.glCode }}) {{ shareProduct.accountingMappings.shareReferenceId.name }} +
+ +

Liabilities

+ +
+ Share suspense control: + ({{ shareProduct.accountingMappings.shareSuspenseId.glCode }}) {{ shareProduct.accountingMappings.shareSuspenseId.name }} +
+ +

Share Equity

+ +
+ Equity: + ({{ shareProduct.accountingMappings.shareEquityId.glCode }}) {{ shareProduct.accountingMappings.shareEquityId.name }} +
+ +

Income

+ +
+ Income from fees: + ({{ shareProduct.accountingMappings.incomeFromFeeAccountId.glCode }}) {{ shareProduct.accountingMappings.incomeFromFeeAccountId.name }} +
+ +
+ +
+ +
+ +
+ +
diff --git a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.scss b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.scss new file mode 100644 index 000000000..8f6633e58 --- /dev/null +++ b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.scss @@ -0,0 +1,12 @@ +@import "assets/styles/helper"; + +.tab-container { + padding: 1%; + margin: 1%; +} + +.mat-h3 { + margin-top: 10px !important; + font-weight: 300; + color: $status-approved; +} diff --git a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.spec.ts b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.spec.ts new file mode 100644 index 000000000..96b21378e --- /dev/null +++ b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ShareProductGeneralTabComponent } from './share-product-general-tab.component'; + +describe('ShareProductGeneralTabComponent', () => { + let component: ShareProductGeneralTabComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ShareProductGeneralTabComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ShareProductGeneralTabComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.ts b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.ts new file mode 100644 index 000000000..c767bf840 --- /dev/null +++ b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'mifosx-share-product-general-tab', + templateUrl: './share-product-general-tab.component.html', + styleUrls: ['./share-product-general-tab.component.scss'] +}) +export class ShareProductGeneralTabComponent implements OnInit { + + shareProduct: any; + + marketPriceDisplayedColumns: string[] = ['fromDate', 'shareValue']; + chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType']; + + constructor(private route: ActivatedRoute) { + this.route.data.subscribe((data: { shareProduct: any }) => { + this.shareProduct = data.shareProduct; + }); + } + + ngOnInit(): void { + } + +} diff --git a/src/app/products/share-products/view-share-product/view-share-product.component.html b/src/app/products/share-products/view-share-product/view-share-product.component.html index 93affa535..8e3712966 100644 --- a/src/app/products/share-products/view-share-product/view-share-product.component.html +++ b/src/app/products/share-products/view-share-product/view-share-product.component.html @@ -1,224 +1,23 @@ -
- - -
+ -
+ - + - + -
+ -

{{ shareProduct.name }}

- - - -

Details

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

Currency

- - - -
- Currency: - {{ shareProduct.currency.name }} -
- -
- Decimal Places: - {{ shareProduct.currency.decimalPlaces }} -
- -
- Currency in multiples of: - {{ shareProduct.currency.inMultiplesOf }} -
- -

Terms

- - - -
- Total Number of Shares: - {{ shareProduct.totalShares }} -
- -
- Shares to be Issued: - {{ shareProduct.totalSharesIssued }} -
- -
- Nominal/Unit Price: - {{ shareProduct.unitPrice }} -
- -
- Capital Value: - {{ shareProduct.shareCapital }} -
- -

Settings

- - - -
- Shares per Client: - {{ shareProduct.nominalShares + ' (Min: ' + (shareProduct.minimumShares ? shareProduct.minimumShares : shareProduct.nominalShares) + ', Max: ' + (shareProduct.maximumShares ? shareProduct.maximumShares : shareProduct.nominalShares) + ')' }} -
- -
- Minimum Active Period: - {{ shareProduct.minimumActivePeriod + ' ' + shareProduct.minimumActivePeriodForDividendsTypeEnum.value }} -
- -
- Lock-in Period: - {{ shareProduct.lockinPeriod + ' ' + shareProduct.lockPeriodTypeEnum.value }} -
- -
- Allow dividends for inactive clients: - {{ shareProduct.allowDividendCalculationForInactiveClients ? 'Yes' : 'No' }} -
- -
- -

Market Price Periods

- - - - - - - - - - - - - - - - - - -
From Date - {{ marketPrice.fromDate | dateFormat }} - Nominal/Unit Price - {{ marketPrice.shareValue }} -
- -
- -
- -

Charges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name - {{ charge.name + ', ' + charge.currency.displaySymbol }} - Type - {{ charge.chargeCalculationType.value }} - Amount - {{ charge.amount }} - Collected On - {{ charge.chargeTimeType.value }} -
- -
- -

Accounting

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

Assets

- -
- Share reference: - {{ shareProduct.accountingMappings.shareReferenceId.name }} -
- -

Liabilities

- -
- Share suspense control: - {{ shareProduct.accountingMappings.shareSuspenseId.name }} -
- -

Share Equity

- -
- Equity: - {{ shareProduct.accountingMappings.shareEquityId.name }} -
- -

Income

- -
- Income from fees: - {{ shareProduct.accountingMappings.incomeFromFeeAccountId.name }} -
- -
- -
- -
- -
- -
+
diff --git a/src/app/products/share-products/view-share-product/view-share-product.component.scss b/src/app/products/share-products/view-share-product/view-share-product.component.scss index a9f4fce2a..c345a82ac 100644 --- a/src/app/products/share-products/view-share-product/view-share-product.component.scss +++ b/src/app/products/share-products/view-share-product/view-share-product.component.scss @@ -1,24 +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; + .navigation-tabs { + overflow: auto; + } + i:hover { + cursor: pointer; + } } diff --git a/src/app/products/share-products/view-share-product/view-share-product.component.ts b/src/app/products/share-products/view-share-product/view-share-product.component.ts index 8d4e49585..70e212f4c 100644 --- a/src/app/products/share-products/view-share-product/view-share-product.component.ts +++ b/src/app/products/share-products/view-share-product/view-share-product.component.ts @@ -8,14 +8,14 @@ import { ActivatedRoute } from '@angular/router'; }) export class ViewShareProductComponent implements OnInit { - shareProduct: any; - - marketPriceDisplayedColumns: string[] = ['fromDate', 'shareValue']; - chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType']; + shareProductDatatables: any = []; constructor(private route: ActivatedRoute) { - this.route.data.subscribe((data: { shareProduct: any }) => { - this.shareProduct = data.shareProduct; + this.route.data.subscribe((data: { shareProductDatatables: any }) => { + this.shareProductDatatables = []; + data.shareProductDatatables.forEach((datatable: any) => { + this.shareProductDatatables.push(datatable); + }); }); }