- Actions
+ {{'labels.inputs.Actions' | translate }}
@@ -408,7 +408,7 @@
{{'labels.inputs.Frequency Type' | translate}}
- {{ repaymentFrequencyType.value }}
+ {{ repaymentFrequencyType.value | translateCatalog }}
@@ -423,7 +423,7 @@
{{'labels.inputs.Fixed Length' | translate}}
- {{ loanProductTermsForm.value.repaymentFrequencyType | find:repaymentFrequencyTypeData:'id':'value' }}
+ {{ loanProductTermsForm.value.repaymentFrequencyType | find:repaymentFrequencyTypeData:'id':'value' | translateCatalog }}
{{'labels.inputs.Minimum days between disbursal and first repayment date' | translate}}
diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts
index 596e458c4..7e8335ace 100644
--- a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts
+++ b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts
@@ -1,7 +1,6 @@
import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray, UntypedFormControl } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
-import { TooltipPosition } from '@angular/material/tooltip';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
@@ -9,8 +8,8 @@ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.co
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
-import { LoanProducts } from '../../loan-products';
import { ProcessingStrategyService } from '../../services/processing-strategy.service';
+import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'mifosx-loan-product-terms-step',
@@ -38,7 +37,8 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges {
constructor(private formBuilder: UntypedFormBuilder,
private processingStrategyService: ProcessingStrategyService,
- private dialog: MatDialog) {
+ private dialog: MatDialog,
+ private translateService: TranslateService) {
this.createLoanProductTermsForm();
this.setConditionalControls();
}
@@ -255,9 +255,15 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges {
getData(formType: string, values?: any) {
switch (formType) {
- case 'Principal': return { title: 'Principal by loan cycle', formfields: this.getFormfields(values) };
- case 'NumberOfRepayments': return { title: 'Number of repayments by loan cycle', formfields: this.getFormfields(values) };
- case 'NominalInterestRate': return { title: 'Nominal interest rate by loan cycle', formfields: this.getFormfields(values) };
+ case 'Principal': return {
+ title: this.translateService.instant('labels.heading.Principal by loan cycle'), formfields: this.getFormfields(values)
+ };
+ case 'NumberOfRepayments': return {
+ title: this.translateService.instant('labels.heading.Number of Repayments by loan cycle'), formfields: this.getFormfields(values)
+ };
+ case 'NominalInterestRate': return {
+ title: this.translateService.instant('labels.heading.Nominal Interest Rate by loan cycle'), formfields: this.getFormfields(values)
+ };
}
}
@@ -265,7 +271,7 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges {
const formfields: FormfieldBase[] = [
new SelectBase({
controlName: 'valueConditionType',
- label: 'Condition',
+ label: this.translateService.instant('labels.inputs.Condition'),
value: values ? values.valueConditionType : this.valueConditionTypeData[0].id,
options: { label: 'value', value: 'id', data: this.valueConditionTypeData },
required: true,
@@ -273,7 +279,7 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges {
}),
new InputBase({
controlName: 'borrowerCycleNumber',
- label: 'Loan Cycle',
+ label: this.translateService.instant('labels.inputs.Loan Cycle'),
value: values ? values.borrowerCycleNumber : undefined,
type: 'number',
required: true,
@@ -281,14 +287,14 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges {
}),
new InputBase({
controlName: 'minValue',
- label: 'Minimum',
+ label: this.translateService.instant('labels.inputs.Minimum'),
value: values ? values.minValue : undefined,
type: 'number',
order: 3
}),
new InputBase({
controlName: 'defaultValue',
- label: 'Default',
+ label: this.translateService.instant('labels.inputs.Default'),
value: values ? values.defaultValue : undefined,
type: 'number',
required: true,
@@ -296,7 +302,7 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges {
}),
new InputBase({
controlName: 'maxValue',
- label: 'Maximum',
+ label: this.translateService.instant('labels.inputs.Maximum'),
value: values ? values.maxValue : undefined,
type: 'number',
order: 5
diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html
index 16051491f..9ee12b210 100644
--- a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html
+++ b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html
@@ -28,21 +28,21 @@
{{'labels.inputs.Type' | translate}}
- {{ charge.chargeCalculationType.value }}
+ {{ charge.chargeCalculationType.value | translateCatalog }}
{{'labels.inputs.Amount' | translate}}
- {{ charge.amount }}
+ {{ charge.amount | formatNumber }}
{{'labels.inputs.Collected On' | translate}}
- {{ charge.chargeTimeType.value }}
+ {{ charge.chargeTimeType.value | translateCatalog }}
diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html
index 0e458f724..75a62be50 100644
--- a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html
+++ b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html
@@ -48,22 +48,22 @@
{{'labels.inputs.Interest Compounding Period' | translate}}:
- {{ savingProduct.interestCompoundingPeriodType | find:savingProductsTemplate.interestCompoundingPeriodTypeOptions:'id':'value' }}
+ {{ savingProduct.interestCompoundingPeriodType | find:savingProductsTemplate.interestCompoundingPeriodTypeOptions:'id':'value' | translateCatalog }}
{{'labels.inputs.Interest Posting Period' | translate}}:
- {{ savingProduct.interestPostingPeriodType | find:savingProductsTemplate.interestPostingPeriodTypeOptions:'id':'value' }}
+ {{ savingProduct.interestPostingPeriodType | find:savingProductsTemplate.interestPostingPeriodTypeOptions:'id':'value' | translateCatalog }}
{{'labels.inputs.Interest Calculated using' | translate}}:
- {{ savingProduct.interestCalculationType | find:savingProductsTemplate.interestCalculationTypeOptions:'id':'value' }}
+ {{ savingProduct.interestCalculationType | find:savingProductsTemplate.interestCalculationTypeOptions:'id':'value' | translateCatalog }}
{{'labels.inputs.Days in Year' | translate}}:
- {{ savingProduct.interestCalculationDaysInYearType | find:savingProductsTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' }}
+ {{ savingProduct.interestCalculationDaysInYearType | find:savingProductsTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' | translateCatalog }}
{{'labels.inputs.Settings' | translate}}
@@ -72,12 +72,12 @@
{{'labels.inputs.Minimum Opening Balance' | translate}}:
- {{ savingProduct.minRequiredOpeningBalance }}
+ {{ savingProduct.minRequiredOpeningBalance | formatNumber }}
{{'labels.inputs.Lock-in Period' | translate}}:
- {{ savingProduct.lockinPeriodFrequency + ' ' + (savingProduct.lockinPeriodFrequencyType | find:savingProductsTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }}
+ {{ savingProduct.lockinPeriodFrequency + ' ' + (savingProduct.lockinPeriodFrequencyType | find:savingProductsTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') | translateCatalog }}
@@ -87,7 +87,7 @@
{{'labels.inputs.Balance Required for Interest Calculation' | translate}}:
- {{ savingProduct.minBalanceForInterestCalculation }}
+ {{ savingProduct.minBalanceForInterestCalculation | formatNumber }}
@@ -97,7 +97,7 @@
{{'labels.inputs.Minimum Balance' | translate}}:
- {{ savingProduct.minRequiredBalance }}
+ {{ savingProduct.minRequiredBalance | formatNumber }}
@@ -117,17 +117,17 @@
{{'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate}}:
- {{ savingProduct.minOverdraftForInterestCalculation }}
+ {{ savingProduct.minOverdraftForInterestCalculation | formatNumber }}
{{'labels.inputs.Nominal Annual Interest for Overdraft' | translate}}:
- {{ savingProduct.nominalAnnualInterestRateOverdraft }}
+ {{ savingProduct.nominalAnnualInterestRateOverdraft | formatNumber }} %
{{'labels.inputs.Maximum Overdraft Amount Limit' | translate}}:
- {{ savingProduct.overdraftLimit }}
+ {{ savingProduct.overdraftLimit | formatNumber }}
@@ -162,21 +162,21 @@
{{'labels.inputs.Type' | translate}}
- {{ charge.chargeCalculationType.value }}
+ {{ charge.chargeCalculationType.value | translateCatalog }}
{{'labels.inputs.Amount' | translate}}
- {{ charge.amount }}
+ {{ charge.amount | formatNumber }}
{{'labels.inputs.Collected On' | translate}}
- {{ charge.chargeTimeType.value }}
+ {{ charge.chargeTimeType.value | translateCatalog }}
@@ -187,11 +187,11 @@
-
{{'labels.inputs.Accounting' | translate}}
+
{{'labels.heading.Accounting' | translate}}
-
diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts
index e661df60b..cc0c8952b 100644
--- a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts
+++ b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts
@@ -33,9 +33,8 @@ export class SavingProductPreviewStepComponent implements OnInit, OnChanges {
}
setCurrentValues(): void {
-
+ this.accountingRule = this.accounting.getAccountingRuleFrom(this.savingProduct.accountingRule);
if (this.isCashOrAccrualAccounting()) {
- this.accountingRule = this.accounting.getAccountingRuleFrom(this.savingProduct.accountingRule);
const assetAccountData = this.savingProductsTemplate.accountingMappingOptions.assetAccountOptions || [];
const incomeAccountData = this.savingProductsTemplate.accountingMappingOptions.incomeAccountOptions || [];
diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html
index 9dd6e61c5..9a3451b8a 100644
--- a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html
+++ b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html
@@ -17,7 +17,7 @@
- {{ lockinPeriodFrequencyType.value }}
+ {{ lockinPeriodFrequencyType.value | translateCatalog }}
diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html
index 560add4b1..7337920f3 100644
--- a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html
+++ b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html
@@ -16,7 +16,7 @@
{{'labels.inputs.Interest Compounding Period' | translate}}
- {{ interestCompoundingPeriodType.value }}
+ {{ interestCompoundingPeriodType.value | translateCatalog }}
@@ -28,7 +28,7 @@
{{'labels.inputs.Interest Posting Period' | translate}}
- {{ interestPostingPeriodType.value }}
+ {{ interestPostingPeriodType.value | translateCatalog }}
@@ -40,7 +40,7 @@
{{'labels.inputs.Interest Calculated using' | translate}}
- {{ interestCalculationType.value }}
+ {{ interestCalculationType.value | translateCatalog }}
@@ -52,7 +52,7 @@
{{'labels.inputs.Days in Year' | translate}}
- {{ interestCalculationDaysInYearType.value }}
+ {{ interestCalculationDaysInYearType.value | translateCatalog }}
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 694c50ac4..c91ea5d63 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
@@ -57,22 +57,22 @@
{{'labels.inputs.Interest Compounding Period' | translate}}:
- {{ savingProduct.interestCompoundingPeriodType.value }}
+ {{ savingProduct.interestCompoundingPeriodType.value | translateCatalog }}
{{'labels.inputs.Interest Posting Period' | translate}}:
- {{ savingProduct.interestPostingPeriodType.value }}
+ {{ savingProduct.interestPostingPeriodType.value | translateCatalog }}
{{'labels.inputs.Interest Calculated using' | translate}}:
- {{ savingProduct.interestCalculationType.value }}
+ {{ savingProduct.interestCalculationType.value | translateCatalog }}
{{'labels.inputs.Days in Year' | translate}}:
- {{ savingProduct.interestCalculationDaysInYearType.value }}
+ {{ savingProduct.interestCalculationDaysInYearType.value | translateCatalog }}
{{'labels.heading.Settings' | translate}}
@@ -81,7 +81,7 @@
{{'labels.inputs.Minimum Opening Balance' | translate}}:
- {{ savingProduct.minRequiredOpeningBalance }}
+ {{ savingProduct.minRequiredOpeningBalance | formatNumber }}
@@ -97,7 +97,7 @@
{{'labels.inputs.Balance Required for Interest Calculation' | translate}}:
- {{ savingProduct.minBalanceForInterestCalculation }}
+ {{ savingProduct.minBalanceForInterestCalculation | formatNumber }}
@@ -107,7 +107,7 @@
{{'labels.inputs.Minimum Balance' | translate}}:
- {{ savingProduct.minRequiredBalance }}
+ {{ savingProduct.minRequiredBalance | formatNumber }}
@@ -132,12 +132,12 @@
{{'labels.inputs.Nominal Annual Interest for Overdraft' | translate}}:
- {{ savingProduct.nominalAnnualInterestRateOverdraft }}
+ {{ savingProduct.nominalAnnualInterestRateOverdraft }} %
{{'labels.inputs.Maximum Overdraft Amount Limit' | translate}}:
- {{ savingProduct.overdraftLimit }}
+ {{ savingProduct.overdraftLimit | formatNumber }}
@@ -172,21 +172,21 @@
{{'labels.inputs.Type' | translate}}
- {{ charge.chargeCalculationType.value }}
+ {{ charge.chargeCalculationType.value | translateCatalog }}
{{'labels.inputs.Amount' | translate}}
- {{ charge.amount }}
+ {{ charge.amount | formatNumber }}
{{'labels.inputs.Collected On' | translate}}
- {{ charge.chargeTimeType.value }}
+ {{ charge.chargeTimeType.value | translateCatalog }}
diff --git a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html
index 3ce95bbbd..7c94d2845 100644
--- a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html
+++ b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html
@@ -47,7 +47,7 @@
{{'labels.inputs.Collected On' | translate }}
- {{ charge.chargeTimeType.value }}
+ {{ charge.chargeTimeType.value | translateCatalog }}
@@ -65,7 +65,7 @@
|| charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee')">
N/A
-
diff --git a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts
index 52c96e261..7444b6c46 100644
--- a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts
+++ b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts
@@ -12,6 +12,7 @@ import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base';
import { Dates } from 'app/core/utils/dates';
import { MatTableDataSource } from '@angular/material/table';
+import { TranslateService } from '@ngx-translate/core';
/**
* Savings Account Charges Step
@@ -55,8 +56,9 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
/**
* @param {MatDialog} dialog Mat Dialog
*/
- constructor(public dialog: MatDialog,
- private dateUtils: Dates) {}
+ constructor(private dialog: MatDialog,
+ private dateUtils: Dates,
+ private translateService: TranslateService) {}
ngOnInit() {
if (this.savingsAccountTemplate) {
@@ -95,14 +97,14 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
const formfields: FormfieldBase[] = [
new InputBase({
controlName: 'amount',
- label: 'Amount',
+ label: this.translateService.instant('labels.inputs.Amount'),
value: charge.amount,
type: 'number',
required: false
}),
];
const data = {
- title: 'Edit Charge Amount',
+ title: this.translateService.instant('labels.heading.Edit Charge Amount'),
layout: { addButtonText: 'Confirm' },
formfields: formfields
};
@@ -125,14 +127,14 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
const formfields: FormfieldBase[] = [
new DatepickerBase({
controlName: 'date',
- label: 'Date',
+ label: this.translateService.instant('labels.inputs.Date'),
value: charge.dueDate || charge.feeOnMonthDay || '',
type: 'datetime-local',
required: false
}),
];
const data = {
- title: 'Edit Charge Date',
+ title: this.translateService.instant('labels.heading.Edit Charge Date'),
layout: { addButtonText: 'Confirm' },
formfields: formfields
};
@@ -145,12 +147,15 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
switch (charge.chargeTimeType.value) {
case 'Specified due date':
case 'Weekly Fee':
- newCharge = { ...charge, dueDate: date };
+ newCharge = { ...charge, dueDate: date };
break;
case 'Annual Fee':
- newCharge = { ...charge, feeOnMonthDay: date };
+ case 'Monthly Fee':
+ const dateMonthDay = this.dateUtils.formatDate(response.data.value.date, 'dd MMMM');
+ newCharge = { ...charge, feeOnMonthDay: dateMonthDay };
break;
}
+ console.log(newCharge);
this.chargesDataSource.splice(this.chargesDataSource.indexOf(charge), 1, newCharge);
this.chargesDataSource = this.chargesDataSource.concat([]);
}
diff --git a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html
index ca9b06b08..c06e297d2 100644
--- a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html
+++ b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html
@@ -51,26 +51,26 @@
{{'labels.inputs.Interest Compounding Period' | translate}}:
- {{ savingsAccount.interestCompoundingPeriodType |
- find:savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value' }}
+ {{ getCatalogTranslation(savingsAccount.interestCompoundingPeriodType |
+ find:savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value') }}
{{'labels.inputs.Interest Posting Period' | translate}}:
- {{ savingsAccount.interestPostingPeriodType |
- find:savingsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value' }}
+ {{ getCatalogTranslation(savingsAccount.interestPostingPeriodType |
+ find:savingsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value') }}
{{'labels.inputs.Interest Calculated using' | translate}}:
- {{ savingsAccount.interestCalculationType |
- find:savingsAccountProductTemplate.interestCalculationTypeOptions:'id':'value' }}
+ {{ getCatalogTranslation(savingsAccount.interestCalculationType |
+ find:savingsAccountProductTemplate.interestCalculationTypeOptions:'id':'value') }}
{{'labels.inputs.Days in Year' | translate}}:
- {{ savingsAccount.interestCalculationDaysInYearType |
- find:savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' }}
+ {{ getCatalogTranslation(savingsAccount.interestCalculationDaysInYearType |
+ find:savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value') }}
@@ -85,8 +85,8 @@
{{'labels.inputs.Lock-in Period' | translate}}:
- {{ savingsAccount.lockinPeriodFrequency + ' ' + (savingsAccount.lockinPeriodFrequencyType |
- find:savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }}
+ {{ getCatalogTranslation(savingsAccount.lockinPeriodFrequency + ' ' + (savingsAccount.lockinPeriodFrequencyType |
+ find:savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value')) }}
@@ -137,7 +137,7 @@
{{'labels.inputs.Type' | translate}}
- {{ charge.chargeCalculationType.value }}
+ {{ charge.chargeCalculationType.value | translateCatalog }}
diff --git a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts
index 450a6f782..92eae3459 100644
--- a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts
+++ b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts
@@ -1,5 +1,6 @@
/** Angular Imports */
import { Component, Input, Output, EventEmitter } from '@angular/core';
+import { TranslateService } from '@ngx-translate/core';
/**
* Savings account preview step
@@ -26,6 +27,9 @@ export class SavingsAccountPreviewStepComponent {
/** Form submission event */
@Output() submit = new EventEmitter();
- constructor() { }
+ constructor(private translateService: TranslateService) { }
+ getCatalogTranslation(text: string): string {
+ return this.translateService.instant('labels.catalogs.' + text);
+ }
}
diff --git a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html
index a4a799c23..71d52184f 100644
--- a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html
+++ b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html
@@ -24,7 +24,7 @@
{{'labels.inputs.Interest Compounding Period' | translate}}
- {{ interestCompoundingPeriodType.value }}
+ {{ interestCompoundingPeriodType.value | translateCatalog }}
@@ -36,7 +36,7 @@
{{'labels.inputs.Interest Posting Period' | translate}}
- {{ interestPostingPeriodType.value }}
+ {{ interestPostingPeriodType.value | translateCatalog }}
@@ -48,7 +48,7 @@
{{'labels.inputs.Interest Calculated using' | translate}}
- {{ interestCalculationType.value }}
+ {{ interestCalculationType.value | translateCatalog }}
@@ -60,7 +60,7 @@
{{'labels.inputs.Days in Year' | translate}}
- {{ interestCalculationDaysInYearType.value }}
+ {{ interestCalculationDaysInYearType.value | translateCatalog }}
@@ -88,7 +88,7 @@
{{'labels.inputs.Type' | translate}}
- {{ lockinPeriodFrequencyType.value }}
+ {{ lockinPeriodFrequencyType.value | translateCatalog }}
diff --git a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html
index f3104b22c..ba05d0fa0 100644
--- a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html
+++ b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html
@@ -2,11 +2,11 @@
-
All Charges
+ {{ 'labels.inputs.Charges' | translate }}
- {{showInactiveCharges?'View Active Charges':'View Inactive Charges'}}
+ {{showInactiveCharges ? viewAllChargeButtons('View Active Charges') : viewAllChargeButtons('View Inactive Charges')}}
@@ -15,57 +15,57 @@
- Name
+ {{'labels.inputs.Name' | translate}}
{{ charge.name }}
- Fee/Penalty
- {{ charge.penalty === true ? 'Penalty' : 'Fee' }}
+ {{'labels.inputs.Charge Type' | translate}}
+ {{ charge.penalty ? 'Penalty' : 'Fee' | translateCatalog }}
- Payment Due At
- {{ charge.chargeTimeType.value }}
+ {{'labels.inputs.Payment Due At' | translate}}
+ {{ charge.chargeTimeType.value | translateCatalog }}
- Due As Of
+ {{'labels.inputs.Due As Of' | translate}}
{{ charge.dueDate | dateFormat }}
- Repeats On (M/d)
+ {{'labels.inputs.Repeats On (M/d)' | translate}}
{{ charge.feeOnMonthDay ? charge.feeOnMonthDay.join('/') : '' }}
- Calculation Type
- {{charge.chargeCalculationType.value}}
+ {{'labels.inputs.Calculation Type' | translate}}
+ {{ charge.chargeCalculationType.value | translateCatalog }}
- Due
+ {{'labels.inputs.Due' | translate}}
{{charge.amount | currency:charge.currency.code:'symbol-narrow':'1.2-2'}}
- Paid
+ {{'labels.inputs.Paid' | translate}}
{{charge.amountPaid | currency:charge.currency.code:'symbol-narrow':'1.2-2'}}
- Waived
+ {{'labels.inputs.Waived' | translate}}
{{charge.amountWaived | currency:charge.currency.code:'symbol-narrow':'1.2-2'}}
- Outstanding
+ {{'labels.inputs.Outstanding' | translate}}
{{charge.amountOutstanding | currency:charge.currency.code:'symbol-narrow':'1.2-2'}}
- Actions
+ {{'labels.inputs.Actions' | translate}}
{
this.savingsAccountData = data.savingsAccountData;
this.chargesData = this.savingsAccountData.charges;
@@ -257,4 +259,8 @@ export class ChargesTabComponent implements OnInit {
.then(() => this.router.navigate([url]));
}
+ viewAllChargeButtons(text: string): string {
+ return this.translateService.instant('labels.buttons.' + text);
+ }
+
}
diff --git a/src/app/savings/savings-account-view/general-tab/general-tab.component.html b/src/app/savings/savings-account-view/general-tab/general-tab.component.html
index bb718fb77..77dc087e7 100644
--- a/src/app/savings/savings-account-view/general-tab/general-tab.component.html
+++ b/src/app/savings/savings-account-view/general-tab/general-tab.component.html
@@ -9,6 +9,13 @@
+
+ {{'labels.inputs.External Id' | translate}}
+
+
+
+ {{'labels.inputs.Not Provided' | translate}}
+
{{'labels.inputs.Activated On' | translate}}
{{savingsAccountData.timeline.activatedOnDate ? (savingsAccountData.timeline.activatedOnDate |
@@ -18,19 +25,16 @@
{{'labels.inputs.Field Officer' | translate}}
{{savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned'}}
-
- {{'labels.inputs.External Id' | translate}}
-
-
-
- {{'labels.inputs.Not Provided' | translate}}
{{'labels.inputs.Currency' | translate}}
{{savingsAccountData.currency.name}} [{{savingsAccountData.currency.code}}]
{{'labels.inputs.Nominal Interest Rate' | translate}}
- {{savingsAccountData.nominalAnnualInterestRate | formatNumber}} %
+
+ {{savingsAccountData.nominalAnnualInterestRate | formatNumber}} %
+ 0 %
+
@@ -115,19 +119,19 @@
{{'labels.inputs.Interest Compounding Period' | translate}}
- {{savingsAccountData.interestCompoundingPeriodType.value}}
+ {{savingsAccountData.interestCompoundingPeriodType.value | translateCatalog}}
{{'labels.inputs.Interest Posting Period' | translate}}
- {{savingsAccountData.interestPostingPeriodType.value}}
+ {{savingsAccountData.interestPostingPeriodType.value | translateCatalog}}
{{'labels.inputs.Interest Calculated Using' | translate}}
- {{savingsAccountData.interestCalculationType.value}}
+ {{savingsAccountData.interestCalculationType.value | translateCatalog}}
{{'labels.inputs.Days in Year' | translate}}
- {{savingsAccountData.interestCalculationDaysInYearType.value}}
+ {{savingsAccountData.interestCalculationDaysInYearType.value | translateCatalog}}
{{'labels.inputs.Withdrawal Fee' | translate}}
@@ -200,6 +204,13 @@
+
+ {{'labels.inputs.External Id' | translate}}
+
+
+
+ {{'labels.inputs.Not Provided' | translate}}
+
{{'labels.inputs.Activated On' | translate}}
{{savingsAccountData.timeline.activatedOnDate ? (savingsAccountData.timeline.activatedOnDate |
@@ -209,13 +220,6 @@
{{'labels.inputs.Currency' | translate}}
{{savingsAccountData.currency.name}} [{{savingsAccountData.currency.code}}]
-
- {{'labels.inputs.External Id' | translate}}
-
-
-
- {{'labels.inputs.Not Provided' | translate}}
-
diff --git a/src/app/savings/savings-account-view/savings-account-view.component.html b/src/app/savings/savings-account-view/savings-account-view.component.html
index d933ea6f4..b4f997636 100644
--- a/src/app/savings/savings-account-view/savings-account-view.component.html
+++ b/src/app/savings/savings-account-view/savings-account-view.component.html
@@ -102,7 +102,7 @@
- {{'labels.inputs.Savings Documents' | translate}}
+ {{'labels.inputs.Documents' | translate}}
diff --git a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html
index 9da92b05d..872f41c92 100644
--- a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html
+++ b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html
@@ -34,9 +34,16 @@
{{ transaction.date | dateFormat }}
+
+ {{"labels.inputs.External Id" | translate}}
+
+
+
+
+
{{"labels.inputs.Transaction Type" | translate}}
- {{ transaction.transactionType.value }}
+ {{ transaction.transactionType.value | translateCatalog }}
diff --git a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts
index c047921b3..81311776b 100644
--- a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts
+++ b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts
@@ -30,7 +30,7 @@ export class TransactionsTabComponent implements OnInit {
hideAccrualsParam: UntypedFormControl;
hideReversedParam: UntypedFormControl;
/** Columns to be displayed in transactions table. */
- displayedColumns: string[] = ['row', 'id', 'date', 'transactionType', 'debit', 'credit', 'balance', 'actions'];
+ displayedColumns: string[] = ['row', 'id', 'date', 'externalId', 'transactionType', 'debit', 'credit', 'balance', 'actions'];
/** Data source for transactions table. */
dataSource: MatTableDataSource;
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
diff --git a/src/app/savings/savings-account-view/view-charge/view-charge.component.html b/src/app/savings/savings-account-view/view-charge/view-charge.component.html
index c42b23f3d..51871e06b 100644
--- a/src/app/savings/savings-account-view/view-charge/view-charge.component.html
+++ b/src/app/savings/savings-account-view/view-charge/view-charge.component.html
@@ -39,7 +39,7 @@
- Name
+ {{ 'labels.inputs.Name' | translate }}
@@ -47,15 +47,15 @@
- Charge Type
+ {{ 'labels.inputs.Charge Type' | translate }}
- {{ chargeData.penalty ? 'Penalty' : 'Fees' }}
+ {{ chargeData.penalty ? 'Penalty' : 'Fee' | translateCatalog }}
- Currency
+ {{ 'labels.inputs.Currency' | translate }}
@@ -63,15 +63,15 @@
- Payment due at
+ {{ 'labels.inputs.Payment due at' | translate }}
- {{ chargeData.chargeTimeType.value }}
+ {{ chargeData.chargeTimeType.value | translateCatalog }}
- Payment due as of
+ {{ 'labels.inputs.Payment due as of' | translate }}
@@ -79,15 +79,15 @@
- Calculation Type
+ {{ 'labels.inputs.Calculation Type' | translate }}
- {{ chargeData.chargeCalculationType.value }}
+ {{ chargeData.chargeCalculationType.value | translateCatalog }}
- Due
+ {{ 'labels.inputs.Due' | translate }}
@@ -95,7 +95,7 @@
- Paid
+ {{ 'labels.inputs.Paid' | translate }}
@@ -103,7 +103,7 @@
- Waived
+ {{ 'labels.inputs.Waived' | translate }}
@@ -111,7 +111,7 @@
- Outstanding
+ {{ 'labels.inputs.Outstanding' | translate }}
diff --git a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html
index 01f821ee2..190bbb35d 100644
--- a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html
+++ b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html
@@ -1,6 +1,6 @@
-
+
{{'labels.inputs.Type' | translate}}:
{{'labels.accounting.' + getAccountingRuleName(accountingRule.value) | translate}}
diff --git a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts
index 2c031d73f..30ed10a31 100644
--- a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts
+++ b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts
@@ -32,7 +32,7 @@ export class ViewSavingsAccountingDetailsComponent implements OnInit {
}
getAccountingRuleName(value: string): string {
- return this.accounting.getAccountRuleName(value);
+ return this.accounting.getAccountRuleName(value.toUpperCase());
}
}
diff --git a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts
index 45bc21233..8d9254f01 100644
--- a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts
+++ b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts
@@ -65,7 +65,7 @@ export class EntityDocumentsTabComponent implements OnInit {
uploadDocument() {
const uploadDocumentDialogRef = this.dialog.open(UploadDocumentDialogComponent, {
- data: { documentIdentifier: false, entityType: 'Loan' }
+ data: { documentIdentifier: false, entityType: '' }
});
uploadDocumentDialogRef.afterClosed().subscribe((dialogResponse: any) => {
if (dialogResponse) {
diff --git a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html
index fab896c85..77418f325 100644
--- a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html
+++ b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html
@@ -5,8 +5,8 @@