diff --git a/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html b/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html index ee4f64ce3..198c8bbcb 100644 --- a/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html +++ b/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html @@ -55,12 +55,12 @@ From Date - {{ floatingRate.fromDate | dateFormat : 'dd MMMM yyyy' }} + {{ floatingRate.fromDate | dateFormat }} Interest Rate - {{ floatingRate.interestRate }} + {{ floatingRate.interestRate | number }} diff --git a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts index e8889492d..bfd9397be 100644 --- a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts +++ b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -42,16 +42,22 @@ export class CreateLoanProductComponent implements OnInit { private productsService: ProductsService, private settingsService: SettingsService, private router: Router) { - this.route.data.subscribe((data: { loanProductsTemplate: any }) => { + this.route.data.subscribe((data: { loanProductsTemplate: any, configurations: any }) => { this.loanProductsTemplate = data.loanProductsTemplate; const assetAccountData = this.loanProductsTemplate.accountingMappingOptions.assetAccountOptions || []; const liabilityAccountData = this.loanProductsTemplate.accountingMappingOptions.liabilityAccountOptions || []; this.loanProductsTemplate.accountingMappingOptions.assetAndLiabilityAccountOptions = assetAccountData.concat(liabilityAccountData); + data.configurations.globalConfiguration.forEach((config: any) => { + if (config.name === 'days-before-repayment-is-due') { + this.loanProductsTemplate['dueDaysForRepaymentEvent'] = config.value; + } else if (config.name === 'days-after-repayment-is-overdue') { + this.loanProductsTemplate['overDueDaysForRepaymentEvent'] = config.value; + } + }); }); } - ngOnInit() { - } + ngOnInit() { } get loanProductDetailsForm() { return this.loanProductDetailsStep.loanProductDetailsForm; diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html index f4ba759d0..13b0fce5a 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html @@ -421,12 +421,12 @@ Due days for repayment event - + OverDue days for repayment event - + diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts index a054b8eeb..e94043d64 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts @@ -87,8 +87,8 @@ export class LoanProductSettingsStepComponent implements OnInit { 'maxTrancheCount': this.loanProductsTemplate.maxTrancheCount, 'outstandingLoanBalance': this.loanProductsTemplate.outstandingLoanBalance, 'dueDaysForRepaymentEvent': this.loanProductsTemplate.dueDaysForRepaymentEvent, - 'overDueDaysForRepaymentEvent': this.loanProductsTemplate.overDueDaysForRepaymentEvent, - }); + 'overDueDaysForRepaymentEvent': this.loanProductsTemplate.overDueDaysForRepaymentEvent + }); if (this.loanProductsTemplate.delinquencyBucket) { this.loanProductSettingsForm.patchValue({ diff --git a/src/app/products/products-routing.module.ts b/src/app/products/products-routing.module.ts index b045cec47..f00a8f76f 100644 --- a/src/app/products/products-routing.module.ts +++ b/src/app/products/products-routing.module.ts @@ -128,6 +128,7 @@ import { ShareProductGeneralTabComponent } from './share-products/view-share-pro import { ShareProductDatatableTabComponent } from './share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component'; import { ShareProductDatatablesResolver } from './share-products/share-product-datatables.resolver'; import { ShareProductDatatableResolver } from './share-products/share-product-datatable.resolver'; +import { GlobalConfigurationsResolver } from 'app/system/configurations/global-configurations-tab/global-configurations.resolver'; /** Products Routes */ const routes: Routes = [ @@ -156,7 +157,8 @@ const routes: Routes = [ component: CreateLoanProductComponent, data: { title: extract('Create Loan Product'), breadcrumb: 'Create' }, resolve: { - loanProductsTemplate: LoanProductsTemplateResolver + loanProductsTemplate: LoanProductsTemplateResolver, + configurations: GlobalConfigurationsResolver } }, { diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html index 1cd5f0d02..a0e02afd2 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html +++ b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html @@ -74,10 +74,12 @@ {{ transactionData.note }} + +
- Payment Type + {{ 'Payment Type' | translate }}
@@ -85,7 +87,7 @@
- Account No. + {{ 'Account No.' | translate }}
@@ -93,7 +95,7 @@
- Cheque Number + {{ 'Cheque Number' | translate }}
@@ -101,7 +103,7 @@
- Routing Code + {{ 'Routing Code' | translate }}
@@ -109,7 +111,7 @@
- Receipt No. + {{ 'Receipt No.' | translate }}
@@ -117,7 +119,7 @@
- Bank No. + {{ 'Bank No.' | translate }}
diff --git a/src/app/search/search-page/search-page.component.ts b/src/app/search/search-page/search-page.component.ts index 0a121b8dd..ecfdca9d1 100644 --- a/src/app/search/search-page/search-page.component.ts +++ b/src/app/search/search-page/search-page.component.ts @@ -60,7 +60,7 @@ export class SearchPageComponent { this.router.navigate(['clients', entity.parentId, 'shares-accounts', entity.entityId]); break; case 'SAVING': - this.router.navigate(['clients', entity.parentId, 'savings-accounts', entity.entityId, 'general']); + this.router.navigate(['clients', entity.parentId, 'savings-accounts', entity.entityId, 'transactions']); break; case 'LOAN': this.router.navigate(['clients', entity.parentId, 'loans-accounts', entity.entityId, 'general']); diff --git a/src/app/shared/external-identifier/external-identifier.component.ts b/src/app/shared/external-identifier/external-identifier.component.ts index af2f0d69a..ce1595171 100644 --- a/src/app/shared/external-identifier/external-identifier.component.ts +++ b/src/app/shared/external-identifier/external-identifier.component.ts @@ -1,5 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; import { Clipboard } from '@angular/cdk/clipboard'; +import { AlertService } from 'app/core/alert/alert.service'; @Component({ selector: 'mifosx-external-identifier', @@ -15,7 +16,8 @@ export class ExternalIdentifierComponent implements OnInit { displayL = false; displayR = true; - constructor(private clipboard: Clipboard) { } + constructor(private clipboard: Clipboard, + private alertService: AlertService) { } ngOnInit(): void { this.displayL = (this.display === 'left'); @@ -31,6 +33,7 @@ export class ExternalIdentifierComponent implements OnInit { copyValue(): void { this.clipboard.copy(this.externalId); + this.alertService.alert({ type: 'Clipboard', message: 'Copied: ' + this.externalId }); } mouseEnter() { diff --git a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts index 3287b8149..7dd25f174 100644 --- a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts +++ b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts @@ -54,7 +54,9 @@ export class GlobalConfigurationsTabComponent implements OnInit, AfterViewInit { private router: Router, private configurationWizardService: ConfigurationWizardService, private popoverService: PopoverService) { - this.configurationData = this.systemService.getConfigurations(); + this.route.data.subscribe((data: { configurations: any }) => { + this.configurationData = data.configurations; + }); } /** diff --git a/src/app/system/system-routing.module.ts b/src/app/system/system-routing.module.ts index 1ca1197db..cef234943 100644 --- a/src/app/system/system-routing.module.ts +++ b/src/app/system/system-routing.module.ts @@ -475,7 +475,9 @@ const routes: Routes = [ { path: '', component: ConfigurationsComponent, - resolve: {} + resolve: { + configurations: GlobalConfigurationsResolver + } }, { path: ':id/edit',