Fixed Deposit products with i18n

This commit is contained in:
Jose Alberto Hernandez
2024-04-20 16:47:03 -06:00
committed by Jose Alberto Hernandez
parent 6ef471d7c0
commit d846a8068f
25 changed files with 570 additions and 565 deletions
@@ -1,151 +1,158 @@
<div fxLayout="row wrap" fxLayout.lt-md="column">
<h3 class="mat-h3" fxFlexFill>Details</h3>
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Details' | translate}}</h3>
<mat-divider fxFlexFill></mat-divider>
<div fxFlexFill>
<span fxFlex="40%">Product</span>
<span fxFlex="40%">{{'labels.inputs.Product' | translate}}</span>
<span fxFlex="60%">{{ savingsAccount.productId | find:savingsAccountTemplate.productOptions:'id':'name' }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Submitted On</span>
<span fxFlex="40%">{{'labels.inputs.Submitted On' | translate}}</span>
<span fxFlex="60%">{{ savingsAccount.submittedOnDate | dateFormat }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">External Id</span>
<span fxFlex="40%">{{'labels.inputs.External Id' | translate}}</span>
<span fxFlex="60%" *ngIf="savingsAccount.externalId">
<mifosx-external-identifier externalId="{{savingsAccount.externalId}}"></mifosx-external-identifier>
</span>
<span fxFlex="60%" *ngIf="!savingsAccount.externalId">
Unassigned
{{'labels.inputs.Unassigned' | translate}}
</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Field Officer</span>
<span fxFlex="60%">{{ savingsAccount.fieldOfficerId | find:savingsAccountProductTemplate.fieldOfficerOptions:'id':'displayName' }}</span>
<span fxFlex="40%">{{'labels.inputs.Field Officer' | translate}}</span>
<span fxFlex="60%">{{ savingsAccount.fieldOfficerId |
find:savingsAccountProductTemplate.fieldOfficerOptions:'id':'displayName' }}</span>
</div>
<h3 class="mat-h3" fxFlexFill>Terms</h3>
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Terms' | translate}}</h3>
<mat-divider fxFlexFill></mat-divider>
<div fxFlexFill>
<span fxFlex="40%">Currency</span>
<span fxFlex="60%">{{ savingsAccountTermsForm.get('currencyCode').value }}</span>
<span fxFlex="40%">{{'labels.inputs.Currency' | translate}}</span>
<span fxFlex="60%">{{ savingsAccountTermsForm.get('currencyCode').value }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Decimal Places</span>
<span fxFlex="40%">{{'labels.inputs.Decimal Places' | translate}}</span>
<span fxFlex="60%">{{ savingsAccountTermsForm.get('decimal').value }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Nominal Annual Interest Rate:</span>
<span fxFlex="60%">{{ savingsAccount.nominalAnnualInterestRate }}</span>
<span fxFlex="40%">{{'labels.inputs.Nominal Annual Interest' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.nominalAnnualInterestRate | formatNumber }} %</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Interest Compounding Period:</span>
<span fxFlex="60%">{{ savingsAccount.interestCompoundingPeriodType | find:savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value' }}</span>
<span fxFlex="40%">{{'labels.inputs.Interest Compounding Period' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.interestCompoundingPeriodType |
find:savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value' }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Interest Posting Period:</span>
<span fxFlex="60%">{{ savingsAccount.interestPostingPeriodType | find:savingsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value' }}</span>
<span fxFlex="40%">{{'labels.inputs.Interest Posting Period' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.interestPostingPeriodType |
find:savingsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value' }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Interest Calculated using:</span>
<span fxFlex="60%">{{ savingsAccount.interestCalculationType | find:savingsAccountProductTemplate.interestCalculationTypeOptions:'id':'value' }}</span>
<span fxFlex="40%">{{'labels.inputs.Interest Calculated using' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.interestCalculationType |
find:savingsAccountProductTemplate.interestCalculationTypeOptions:'id':'value' }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Days in Year:</span>
<span fxFlex="60%">{{ savingsAccount.interestCalculationDaysInYearType | find:savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' }}</span>
<span fxFlex="40%">{{'labels.inputs.Days in Year' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.interestCalculationDaysInYearType |
find:savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' }}</span>
</div>
<div fxFlexFill *ngIf="savingsAccount.minRequiredOpeningBalance">
<span fxFlex="40%">Minimum Opening Balance:</span>
<span fxFlex="60%">{{ savingsAccount.minRequiredOpeningBalance }}</span>
<span fxFlex="40%">{{'labels.inputs.Minimum Opening Balance' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.minRequiredOpeningBalance | formatNumber }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Apply Withdrawal Fee for Transfers:</span>
<span fxFlex="40%">{{'labels.inputs.Apply Withdrawal Fee for Transfers' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.withdrawalFeeForTransfers | yesNo }}</span>
</div>
<div fxFlexFill *ngIf="savingsAccount.lockinPeriodFrequency">
<span fxFlex="40%">Lock-in Period:</span>
<span fxFlex="60%">{{ savingsAccount.lockinPeriodFrequency + ' ' + (savingsAccount.lockinPeriodFrequencyType | find:savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }}</span>
<span fxFlex="40%">{{'labels.inputs.Lock-in Period' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.lockinPeriodFrequency + ' ' + (savingsAccount.lockinPeriodFrequencyType |
find:savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Is Overdraft Allowed:</span>
<span fxFlex="40%">{{'labels.inputs.Is Overdraft Allowed' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.allowOverdraft | yesNo }}</span>
</div>
<div fxFlexFill *ngIf="savingsAccount.minOverdraftForInterestCalculation">
<span fxFlex="40%">Minimum Overdraft Required for Interest Calculation:</span>
<span fxFlex="60%">{{ savingsAccount.minOverdraftForInterestCalculation }}</span>
<span fxFlex="40%">{{'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.minOverdraftForInterestCalculation | formatNumber }}</span>
</div>
<div fxFlexFill *ngIf="savingsAccount.nominalAnnualInterestRateOverdraft">
<span fxFlex="40%">Nominal Annual Interest for Overdraft:</span>
<span fxFlex="60%">{{ savingsAccount.nominalAnnualInterestRateOverdraft }}</span>
<span fxFlex="40%">{{'labels.inputs.Nominal Annual Interest for Overdraft' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.nominalAnnualInterestRateOverdraft | formatNumber }} %</span>
</div>
<div fxFlexFill *ngIf="savingsAccount.overdraftLimit">
<span fxFlex="40%">Maximum Overdraft Amount Limit:</span>
<span fxFlex="60%">{{ savingsAccount.overdraftLimit }}</span>
<span fxFlex="40%">{{'labels.inputs.Maximum Overdraft Amount Limit' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.overdraftLimit | formatNumber }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Enforce Minimum Balance:</span>
<span fxFlex="40%">{{'labels.inputs.Enforce Minimum Balance' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.enforceMinRequiredBalance | yesNo }}</span>
</div>
<div fxFlexFill *ngIf="savingsAccount.minRequiredBalance">
<span fxFlex="40%">Minimum Balance:</span>
<span fxFlex="40%">{{'labels.inputs.Minimum Balance' | translate}}:</span>
<span fxFlex="60%">{{ savingsAccount.minRequiredBalance }}</span>
</div>
<div fxFlexFill *ngIf="savingsAccount.charges.length" fxLayout="row wrap" fxLayout.lt-md="column">
<h3 class="mat-h3" fxFlexFill>Charges</h3>
<h3 class="mat-h3" fxFlexFill>{{'labels.inputs.Charges' | translate}}</h3>
<mat-divider fxFlexFill></mat-divider>
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="savingsAccount.charges">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> Name </th>
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Name' | translate}} </th>
<td mat-cell *matCellDef="let charge">
{{ charge.name + ', ' + charge.currency.displaySymbol }}
</td>
</ng-container>
<ng-container matColumnDef="chargeCalculationType">
<th mat-header-cell *matHeaderCellDef> Type </th>
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Type' | translate}} </th>
<td mat-cell *matCellDef="let charge">
{{ charge.chargeCalculationType.value }}
</td>
</ng-container>
<ng-container matColumnDef="amount">
<th mat-header-cell *matHeaderCellDef> Amount </th>
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Amount' | translate}} </th>
<td mat-cell *matCellDef="let charge">
{{ charge.amount }}
{{ charge.amount | formatNumber }}
</td>
</ng-container>
<ng-container matColumnDef="date">
<th mat-header-cell *matHeaderCellDef> Date </th>
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Date' | translate}} </th>
<td mat-cell *matCellDef="let charge">
<span *ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'">
<span
*ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'">
{{(charge.dueDate | dateFormat) || 'Unassigned'}}
</span>
<span *ngIf="charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'">
@@ -160,14 +167,14 @@
</ng-container>
<ng-container matColumnDef="repaymentsEvery">
<th mat-header-cell *matHeaderCellDef> Repayments Every </th>
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Repayments Every' | translate}} </th>
<td mat-cell *matCellDef="let charge">
{{ charge.feeInterval || 'Not Provided' }}
</td>
</ng-container>
<ng-container matColumnDef="chargeTimeType">
<th mat-header-cell *matHeaderCellDef> Collected On </th>
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Collected On' | translate}} </th>
<td mat-cell *matCellDef="let charge">
{{ charge.chargeTimeType.value }}
</td>
@@ -185,12 +192,12 @@
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
Previous
{{"labels.buttons.Previous" | translate }}
</button>
<button mat-raised-button [routerLink]="['../']">
Cancel
<button mat-raised-button [routerLink]="['../..']">
{{"labels.buttons.Cancel" | translate }}
</button>
<button mat-raised-button color="primary" (click)="submit.emit()">
Submit
{{"labels.buttons.Submit" | translate }}
</button>
</div>
</div>