fix(i18n): add missing translations and apply translate pipes across web-app (#2934)
fix: address code review issues fix: translate accessibility attributes and fix translation errors
This commit is contained in:
+3
-3
@@ -16,10 +16,10 @@
|
||||
@if (!isFromClient) {
|
||||
<div class="flex-fill">
|
||||
<mat-form-field class="flex-30">
|
||||
<input matInput placeholder="ClientName" [formControl]="clientNameControl" />
|
||||
<input matInput placeholder="{{ 'labels.text.ClientName' | translate }}" [formControl]="clientNameControl" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-30">
|
||||
<input matInput placeholder="From Client Id" [formControl]="fromClientId" />
|
||||
<input matInput placeholder="{{ 'labels.text.FromClientId' | translate }}" [formControl]="fromClientId" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="account-Id-field">
|
||||
<input matInput placeholder="From Account Id" [formControl]="fromAccountId" />
|
||||
<input matInput placeholder="{{ 'labels.text.FromAccountId' | translate }}" [formControl]="fromAccountId" />
|
||||
</mat-form-field>
|
||||
|
||||
<button
|
||||
|
||||
+30
-12
@@ -57,7 +57,7 @@
|
||||
[(ngModel)]="phoneAccount"
|
||||
maxlength="10"
|
||||
required
|
||||
placeholder="Enter phone number"
|
||||
placeholder="{{ 'labels.text.EnterPhoneNumber' | translate }}"
|
||||
title="Phone number"
|
||||
/>
|
||||
<mat-hint align="end">{{ phoneAccount.length || 0 }}/10</mat-hint>
|
||||
@@ -99,7 +99,7 @@
|
||||
[matDatepicker]="transferDatePicker"
|
||||
required
|
||||
formControlName="transferDate"
|
||||
placeholder="Select date"
|
||||
placeholder="{{ 'labels.text.SelectDate' | translate }}"
|
||||
title="Transaction Date"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
|
||||
@@ -133,7 +133,7 @@
|
||||
matInput
|
||||
formControlName="toClientId"
|
||||
[matAutocomplete]="clientsAutocomplete"
|
||||
placeholder="Select or type client name"
|
||||
placeholder="{{ 'labels.text.SelectOrTypeClientName' | translate }}"
|
||||
title="Client name"
|
||||
/>
|
||||
@if (makeAccountTransferForm.controls.toClientId.hasError('required')) {
|
||||
@@ -191,7 +191,7 @@
|
||||
matInput
|
||||
required
|
||||
formControlName="transferAmount"
|
||||
placeholder="Enter amount"
|
||||
placeholder="{{ 'labels.text.EnterAmount' | translate }}"
|
||||
title="Transfer amount"
|
||||
min="0.01"
|
||||
step="0.01"
|
||||
@@ -216,7 +216,7 @@
|
||||
formControlName="transferDescription"
|
||||
cdkTextareaAutosize
|
||||
cdkAutosizeMinRows="2"
|
||||
placeholder="Enter transfer description"
|
||||
placeholder="{{ 'labels.text.EnterTransferDescription' | translate }}"
|
||||
title="Transfer description"
|
||||
></textarea>
|
||||
@if (makeAccountTransferForm.controls.transferDescription.hasError('required')) {
|
||||
@@ -243,7 +243,7 @@
|
||||
[matDatepicker]="transferDatePicker"
|
||||
required
|
||||
formControlName="transferDate"
|
||||
placeholder="Select date"
|
||||
placeholder="{{ 'labels.text.SelectDate' | translate }}"
|
||||
title="Transaction Date"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
|
||||
@@ -257,11 +257,23 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-label>{{ 'labels.inputs.Bank' | translate }}</mat-label>
|
||||
<input matInput formControlName="toBank" [readonly]="true" placeholder="Bank" title="Bank" />
|
||||
<input
|
||||
matInput
|
||||
formControlName="toBank"
|
||||
[readonly]="true"
|
||||
placeholder="{{ 'labels.inputs.Bank' | translate }}"
|
||||
title="Bank"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-label>{{ 'labels.inputs.Client' | translate }}</mat-label>
|
||||
<input matInput formControlName="toClientId" [readonly]="true" placeholder="Client" title="Client" />
|
||||
<input
|
||||
matInput
|
||||
formControlName="toClientId"
|
||||
[readonly]="true"
|
||||
placeholder="{{ 'labels.inputs.Client' | translate }}"
|
||||
title="Client"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-label>{{ 'labels.inputs.Account Type' | translate }}</mat-label>
|
||||
@@ -269,13 +281,19 @@
|
||||
matInput
|
||||
formControlName="toAccountType"
|
||||
[readonly]="true"
|
||||
placeholder="Account Type"
|
||||
placeholder="{{ 'labels.inputs.Account Type' | translate }}"
|
||||
title="Account Type"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-label>{{ 'labels.inputs.Account' | translate }}</mat-label>
|
||||
<input matInput formControlName="toAccountId" [readonly]="true" placeholder="Account" title="Account" />
|
||||
<input
|
||||
matInput
|
||||
formControlName="toAccountId"
|
||||
[readonly]="true"
|
||||
placeholder="{{ 'labels.inputs.Account' | translate }}"
|
||||
title="Account"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
|
||||
@@ -284,7 +302,7 @@
|
||||
matInput
|
||||
required
|
||||
formControlName="transferAmount"
|
||||
placeholder="Enter amount"
|
||||
placeholder="{{ 'labels.text.EnterAmount' | translate }}"
|
||||
title="Transfer amount"
|
||||
min="0.01"
|
||||
step="0.01"
|
||||
@@ -314,7 +332,7 @@
|
||||
formControlName="transferDescription"
|
||||
cdkTextareaAutosize
|
||||
cdkAutosizeMinRows="2"
|
||||
placeholder="Enter transfer description"
|
||||
placeholder="{{ 'labels.text.EnterTransferDescription' | translate }}"
|
||||
title="Transfer description"
|
||||
></textarea>
|
||||
@if (makeAccountTransferForm.controls.transferDescription.hasError('required')) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<mat-select [formControl]="entryTypeFilter" (selectionChange)="applyFilter($event.value, 'manualEntriesOnly')">
|
||||
@for (filter of entryTypeFilterData; track filter) {
|
||||
<mat-option [value]="filter.value">
|
||||
{{ filter.option }}
|
||||
{{ filter.option | translate }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
|
||||
@@ -93,15 +93,15 @@ export class SearchJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
/** Entry type filter data. */
|
||||
entryTypeFilterData = [
|
||||
{
|
||||
option: 'All',
|
||||
option: 'labels.inputs.All',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
option: 'Manual Entries',
|
||||
option: 'labels.inputs.Manual Entries',
|
||||
value: true
|
||||
},
|
||||
{
|
||||
option: 'System Entries',
|
||||
option: 'labels.inputs.System Entries',
|
||||
value: false // Bug: unable to implement from server side
|
||||
}
|
||||
];
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="layout-column layout-gt-sm-row align-gt-sm-start-center">
|
||||
<div class="search-box m-r-30">
|
||||
<mat-form-field class="search-box">
|
||||
<input matInput placeholder="Search by Name" [formControl]="name" />
|
||||
<input matInput placeholder="{{ 'labels.text.SearchByName' | translate }}" [formControl]="name" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="search-box">
|
||||
<input matInput placeholder="Search by ExternalID" [formControl]="externalId" />
|
||||
<input matInput placeholder="{{ 'labels.text.SearchByExternalID' | translate }}" [formControl]="externalId" />
|
||||
</mat-form-field>
|
||||
<mat-checkbox #showClosedCenters labelPosition="after" (change)="changeShowClosedCenters()" class="m-r-10">
|
||||
{{ 'labels.inputs.Show Closed Centers' | translate }}
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@
|
||||
matInput
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dueDatePicker"
|
||||
placeholder="Optional"
|
||||
placeholder="{{ 'labels.text.Optional' | translate }}"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dueDatePicker></mat-datepicker>
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<form #formRef="ngForm" [formGroup]="noteForm">
|
||||
<mat-form-field>
|
||||
<textarea formControlName="note" matInput placeholder="Write a note ...."></textarea>
|
||||
<textarea formControlName="note" matInput placeholder="{{ 'labels.text.Write a note' | translate }}"></textarea>
|
||||
</mat-form-field>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-dialog-close>{{ 'labels.buttons.Cancel' | translate }}</button>
|
||||
|
||||
+18
-18
@@ -7,9 +7,9 @@
|
||||
formControlName="firstName"
|
||||
required
|
||||
matInput
|
||||
aria-label="First Name"
|
||||
placeholder="First Name"
|
||||
title="First Name"
|
||||
[attr.aria-label]="'labels.inputs.First Name' | translate"
|
||||
placeholder="{{ 'labels.inputs.First Name' | translate }}"
|
||||
[attr.title]="'labels.inputs.First Name' | translate"
|
||||
/>
|
||||
@if (addFamilyMemberForm.controls.firstName.hasError('required')) {
|
||||
<mat-error>
|
||||
@@ -24,9 +24,9 @@
|
||||
<input
|
||||
formControlName="middleName"
|
||||
matInput
|
||||
aria-label="Middle Name"
|
||||
placeholder="Middle Name"
|
||||
title="Middle Name"
|
||||
[attr.aria-label]="'labels.inputs.Middle Name' | translate"
|
||||
placeholder="{{ 'labels.inputs.Middle Name' | translate }}"
|
||||
[attr.title]="'labels.inputs.Middle Name' | translate"
|
||||
/>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
formControlName="lastName"
|
||||
required
|
||||
matInput
|
||||
aria-label="Last Name"
|
||||
placeholder="Last Name"
|
||||
title="Last Name"
|
||||
[attr.aria-label]="'labels.inputs.Last Name' | translate"
|
||||
placeholder="{{ 'labels.inputs.Last Name' | translate }}"
|
||||
[attr.title]="'labels.inputs.Last Name' | translate"
|
||||
/>
|
||||
@if (addFamilyMemberForm.controls.lastName.hasError('required')) {
|
||||
<mat-error>
|
||||
@@ -53,9 +53,9 @@
|
||||
<input
|
||||
formControlName="qualification"
|
||||
matInput
|
||||
aria-label="Qualification"
|
||||
placeholder="Qualification"
|
||||
title="Qualification"
|
||||
[attr.aria-label]="'labels.inputs.Qualification' | translate"
|
||||
placeholder="{{ 'labels.inputs.Qualification' | translate }}"
|
||||
[attr.title]="'labels.inputs.Qualification' | translate"
|
||||
/>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -67,9 +67,9 @@
|
||||
matInput
|
||||
[min]="minAge"
|
||||
disabled
|
||||
aria-label="Age"
|
||||
placeholder="Age"
|
||||
title="Age"
|
||||
[attr.aria-label]="'labels.inputs.Age' | translate"
|
||||
placeholder="{{ 'labels.inputs.Age' | translate }}"
|
||||
[attr.title]="'labels.inputs.Age' | translate"
|
||||
/>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -140,9 +140,9 @@
|
||||
matInput
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dueDatePicker"
|
||||
placeholder="Optional"
|
||||
aria-label="Date Of Birth"
|
||||
title="Date Of Birth"
|
||||
placeholder="{{ 'labels.text.Optional' | translate }}"
|
||||
[attr.aria-label]="'labels.inputs.Date Of Birth' | translate"
|
||||
[attr.title]="'labels.inputs.Date Of Birth' | translate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dueDatePicker></mat-datepicker>
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@
|
||||
matInput
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dueDatePicker"
|
||||
placeholder="Optional"
|
||||
placeholder="{{ 'labels.text.Optional' | translate }}"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dueDatePicker></mat-datepicker>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<mat-form-field class="search-box">
|
||||
<input
|
||||
matInput
|
||||
placeholder="Search by client name, external Id, mobile"
|
||||
placeholder="{{ 'labels.text.SearchByClient' | translate }}"
|
||||
class="search-box"
|
||||
(keydown.enter)="search($event.target.value)"
|
||||
/>
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
<input
|
||||
matInput
|
||||
formControlName="accountNo"
|
||||
placeholder="Account No"
|
||||
title="Account No"
|
||||
[placeholder]="'labels.inputs.Account No' | translate"
|
||||
[title]="'labels.inputs.Account No' | translate"
|
||||
/>
|
||||
@@ -49,8 +47,6 @@
|
||||
<input
|
||||
matInput
|
||||
formControlName="externalId"
|
||||
placeholder="External Id"
|
||||
title="External Id"
|
||||
[placeholder]="'labels.inputs.External Id' | translate"
|
||||
[title]="'labels.inputs.External Id' | translate"
|
||||
/>
|
||||
@@ -68,8 +64,6 @@
|
||||
matInput
|
||||
required
|
||||
formControlName="fullname"
|
||||
placeholder="Full Name"
|
||||
title="Full Name"
|
||||
[placeholder]="'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate"
|
||||
[title]="'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate"
|
||||
/>
|
||||
@@ -89,8 +83,6 @@
|
||||
matInput
|
||||
required
|
||||
formControlName="firstname"
|
||||
placeholder="First Name"
|
||||
title="First Name"
|
||||
[placeholder]="'labels.inputs.First Name' | translate"
|
||||
[title]="'labels.inputs.First Name' | translate"
|
||||
/>
|
||||
@@ -109,8 +101,6 @@
|
||||
<input
|
||||
matInput
|
||||
formControlName="middlename"
|
||||
placeholder="Middle Name"
|
||||
title="Middle Name"
|
||||
[placeholder]="'labels.inputs.Middle Name' | translate"
|
||||
[title]="'labels.inputs.Middle Name' | translate"
|
||||
/>
|
||||
@@ -124,8 +114,6 @@
|
||||
matInput
|
||||
required
|
||||
formControlName="lastname"
|
||||
placeholder="Last Name"
|
||||
title="Last Name"
|
||||
[placeholder]="'labels.inputs.Last Name' | translate"
|
||||
[title]="'labels.inputs.Last Name' | translate"
|
||||
/>
|
||||
@@ -152,8 +140,6 @@
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dateOfBirthDatePicker"
|
||||
formControlName="dateOfBirth"
|
||||
placeholder="Date of Birth"
|
||||
title="Date of Birth"
|
||||
[placeholder]="
|
||||
'labels.inputs.' + getDateLabel(legalFormId, ['Date of Birth', 'Incorporation Date']) | translate
|
||||
"
|
||||
@@ -224,8 +210,6 @@
|
||||
<mat-form-field class="flex-48" (click)="incorpValidityTillDateDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</mat-label>
|
||||
<input
|
||||
placeholder="Incorporation Validity Till Date"
|
||||
title="Incorporation Validity Till Date"
|
||||
[placeholder]="'labels.inputs.Incorporation Validity Till Date' | translate"
|
||||
[title]="'labels.inputs.Incorporation Validity Till Date' | translate"
|
||||
matInput
|
||||
@@ -242,8 +226,6 @@
|
||||
<input
|
||||
matInput
|
||||
formControlName="incorpNumber"
|
||||
placeholder="Incorporation No"
|
||||
title="Incorporation No"
|
||||
[placeholder]="'labels.inputs.Incorporation No' | translate"
|
||||
[title]="'labels.inputs.Incorporation No' | translate"
|
||||
/>
|
||||
@@ -255,8 +237,6 @@
|
||||
formControlName="remarks"
|
||||
cdkTextareaAutosize
|
||||
cdkAutosizeMinRows="2"
|
||||
placeholder="Remarks"
|
||||
title="Remarks"
|
||||
[placeholder]="'labels.inputs.Remarks' | translate"
|
||||
[title]="'labels.inputs.Remarks' | translate"
|
||||
></textarea>
|
||||
@@ -272,8 +252,6 @@
|
||||
matInput
|
||||
type="text"
|
||||
formControlName="mobileNo"
|
||||
placeholder="Mobile No"
|
||||
title="Mobile No"
|
||||
[placeholder]="'labels.inputs.Mobile No' | translate"
|
||||
[title]="'labels.inputs.Mobile No' | translate"
|
||||
/>
|
||||
@@ -284,8 +262,6 @@
|
||||
<input
|
||||
matInput
|
||||
formControlName="emailAddress"
|
||||
placeholder="Email Address"
|
||||
title="Email Address"
|
||||
[placeholder]="'labels.inputs.Email Address' | translate"
|
||||
[title]="'labels.inputs.Email Address' | translate"
|
||||
/>
|
||||
@@ -325,8 +301,6 @@
|
||||
<mat-form-field class="flex-48" (click)="submittedOnDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Submitted On' | translate }}</mat-label>
|
||||
<input
|
||||
placeholder="Submitted On"
|
||||
title="Submitted On"
|
||||
[placeholder]="'labels.inputs.Submitted On' | translate"
|
||||
[title]="'labels.inputs.Submitted On' | translate"
|
||||
matInput
|
||||
@@ -349,8 +323,6 @@
|
||||
<mat-form-field class="flex-48" (click)="activatedOnDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Activated On' | translate }}</mat-label>
|
||||
<input
|
||||
placeholder="Activated On"
|
||||
title="Activated On"
|
||||
[placeholder]="'labels.inputs.Activated On' | translate"
|
||||
[title]="'labels.inputs.Activated On' | translate"
|
||||
matInput
|
||||
|
||||
@@ -169,6 +169,25 @@ export class BreadcrumbComponent implements AfterViewInit {
|
||||
} else if (routeData.breadcrumb === 'Tax Groups') {
|
||||
breadcrumbLabel = routeData.taxGroup.name;
|
||||
}
|
||||
|
||||
// Check if the breadcrumbLabel is an action name that should be translated using labels.menus
|
||||
// This handles action names from route parameters for Savings, Loans, Shares, Fixed Deposits, and Recurring Deposits accounts
|
||||
if (
|
||||
breadcrumbLabel &&
|
||||
(routeData.breadcrumb === 'Savings Account Actions' ||
|
||||
routeData.breadcrumb === 'Loan Account Actions' ||
|
||||
routeData.breadcrumb === 'Shares Account Actions' ||
|
||||
routeData.breadcrumb === 'Actions' ||
|
||||
routeData.breadcrumb === 'action' ||
|
||||
routeData.title === 'Fixed Deposits Account Actions' ||
|
||||
routeData.title === 'Recurring Deposits Account Actions')
|
||||
) {
|
||||
const menuKey = 'labels.menus.' + breadcrumbLabel;
|
||||
const menuTranslation = this.translateService.instant(menuKey);
|
||||
if (menuTranslation !== menuKey) {
|
||||
breadcrumbLabel = menuTranslation;
|
||||
}
|
||||
}
|
||||
} else if (route.snapshot.data.hasOwnProperty(routeDataBreadcrumb)) {
|
||||
breadcrumbLabel = route.snapshot.data[routeDataBreadcrumb];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="layout-column layout-gt-sm-row align-gt-sm-start-center">
|
||||
<div class="search-box m-r-30">
|
||||
<mat-form-field class="search-box">
|
||||
<input matInput placeholder="Search by Name" [formControl]="name" />
|
||||
<input matInput placeholder="{{ 'labels.text.SearchByName' | translate }}" [formControl]="name" />
|
||||
</mat-form-field>
|
||||
<mat-checkbox #showClosedGroups labelPosition="after" (change)="changeShowClosedGroups()" class="m-r-10">{{
|
||||
'labels.inputs.Show Closed Groups' | translate
|
||||
|
||||
+6
-2
@@ -187,7 +187,9 @@
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Amortization' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
loansAccount.amortizationType | find: loansAccountProductTemplate.amortizationTypeOptions : 'id' : 'value'
|
||||
loansAccount.amortizationType
|
||||
| find: loansAccountProductTemplate.amortizationTypeOptions : 'id' : 'value'
|
||||
| translateKey: 'catalogs'
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
@@ -196,6 +198,7 @@
|
||||
<span class="flex-60">{{
|
||||
loansAccount.interestCalculationPeriodType
|
||||
| find: loansAccountProductTemplate.interestCalculationPeriodTypeOptions : 'id' : 'value'
|
||||
| translateKey: 'catalogs'
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
@@ -227,6 +230,7 @@
|
||||
<span class="flex-60">{{
|
||||
loansAccount.transactionProcessingStrategyCode
|
||||
| find: loansAccountProductTemplate.transactionProcessingStrategyOptions : 'code' : 'name'
|
||||
| translateKey: 'catalogs'
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
@@ -284,7 +288,7 @@
|
||||
@if (loansAccountProductTemplate?.daysInMonthType) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Days in month' | translate }}: </span>
|
||||
<span class="flex-60">{{ loansAccountProductTemplate?.daysInMonthType.value }}</span>
|
||||
<span class="flex-60">{{ loansAccountProductTemplate?.daysInMonthType.value | translateKey: 'catalogs' }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -23,6 +23,7 @@ import { FindPipe } from '../../../pipes/find.pipe';
|
||||
import { DateFormatPipe } from '../../../pipes/date-format.pipe';
|
||||
import { FormatNumberPipe } from '../../../pipes/format-number.pipe';
|
||||
import { YesnoPipe } from '../../../pipes/yesno.pipe';
|
||||
import { TranslatePipe } from '../../../pipes/translate.pipe';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
/**
|
||||
@@ -53,7 +54,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
FindPipe,
|
||||
DateFormatPipe,
|
||||
FormatNumberPipe,
|
||||
YesnoPipe
|
||||
YesnoPipe,
|
||||
TranslatePipe
|
||||
]
|
||||
})
|
||||
export class LoansAccountPreviewStepComponent implements OnChanges {
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
<div class="flex-fill layout-row">
|
||||
<span class="flex-50">{{ 'labels.inputs.Repayments' | translate }}</span>
|
||||
<span class="flex-50"
|
||||
>{{ loanDetails.numberOfRepayments }} every {{ loanDetails.repaymentEvery }} {{
|
||||
loanDetails.repaymentFrequencyType.value | translateKey: 'catalogs'
|
||||
}}
|
||||
>{{ loanDetails.numberOfRepayments }} {{ 'labels.commons.every' | translate }}
|
||||
{{ loanDetails.repaymentEvery }} {{ loanDetails.repaymentFrequencyType.value | translateKey: 'catalogs' }}
|
||||
@if (
|
||||
loanDetails.repaymentFrequencyType?.id === 2 &&
|
||||
loanDetails.repaymentFrequencyNthDayType?.id !== 0 &&
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<table mat-table [dataSource]="dataSource">
|
||||
<ng-container matColumnDef="Empty">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let ele">{{ ele.property }}</td>
|
||||
<td mat-cell *matCellDef="let ele">{{ 'labels.inputs.' + ele.property | translate }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Original">
|
||||
<th mat-header-cell class="r-amount" *matHeaderCellDef>{{ 'labels.inputs.Original' | translate }}</th>
|
||||
|
||||
@@ -78,7 +78,7 @@ export const BulkImports = [
|
||||
formFields: 2
|
||||
},
|
||||
{
|
||||
name: 'Reccuring Deposit Accounts',
|
||||
name: 'Recurring Deposit Accounts',
|
||||
entityType: 'recurringdeposits',
|
||||
urlSuffix: '/recurringdepositaccounts',
|
||||
permission: 'READ_CLIENT',
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<div class="gap-2percent m-b-20">
|
||||
<mat-card class="layout-column gap-2percent flex-50">
|
||||
<h3>
|
||||
<strong>{{ bulkImport.name }} {{ 'labels.heading.Template' | translate }}</strong>
|
||||
<strong
|
||||
>{{ 'labels.heading.' + bulkImport.name | translate }} {{ 'labels.heading.Template' | translate }}</strong
|
||||
>
|
||||
</h3>
|
||||
|
||||
<form [formGroup]="bulkImportForm">
|
||||
@@ -65,7 +67,7 @@
|
||||
|
||||
<mat-card class="layout-column gap-2percent flex-50">
|
||||
<h3>
|
||||
<strong>{{ bulkImport.name }}</strong>
|
||||
<strong>{{ 'labels.heading.' + bulkImport.name | translate }}</strong>
|
||||
</h3>
|
||||
|
||||
<h4>{{ 'labels.heading.Select Excel File' | translate }}</h4>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<mat-select required formControlName="entity">
|
||||
@for (entity of entityTypes; track entity) {
|
||||
<mat-option [value]="entity.value">
|
||||
{{ entity.name }}
|
||||
{{ entity.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
|
||||
+8
-6
@@ -32,6 +32,7 @@ import { MatFormField, MatLabel, MatError, MatHint } from '@angular/material/for
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { FindPipe } from '../../../pipes/find.pipe';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* Create Loan Provisioning Criteria Component.
|
||||
@@ -64,6 +65,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
private router = inject(Router);
|
||||
dialog = inject(MatDialog);
|
||||
private route = inject(ActivatedRoute);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Loan Provisioning Criteria form. */
|
||||
provisioningCriteriaForm: UntypedFormGroup;
|
||||
@@ -145,7 +147,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
*/
|
||||
editDefinition(definition: any) {
|
||||
const data = {
|
||||
title: 'Edit Criteria Definition',
|
||||
title: this.translateService.instant('labels.heading.Edit Criteria Definition'),
|
||||
formfields: this.getDefinitionFormFields(definition),
|
||||
layout: { addButtonText: 'Confirm' }
|
||||
};
|
||||
@@ -173,7 +175,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'minAge',
|
||||
label: 'Min Age',
|
||||
label: this.translateService.instant('labels.inputs.Min Age'),
|
||||
value: definition ? definition.minAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -183,7 +185,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'maxAge',
|
||||
label: 'Max Age',
|
||||
label: this.translateService.instant('labels.inputs.Max Age'),
|
||||
value: definition ? definition.maxAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -193,7 +195,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'provisioningPercentage',
|
||||
label: 'Percentage (%)',
|
||||
label: this.translateService.instant('labels.inputs.Percentage') + ' (%)',
|
||||
value: definition ? definition.provisioningPercentage : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -203,7 +205,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'liabilityAccount',
|
||||
label: 'Liability Account',
|
||||
label: this.translateService.instant('labels.inputs.Liability Account'),
|
||||
value: definition ? definition.liabilityAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.liabilityAccounts },
|
||||
required: true,
|
||||
@@ -213,7 +215,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'expenseAccount',
|
||||
label: 'Expense Account',
|
||||
label: this.translateService.instant('labels.inputs.Expense Account'),
|
||||
value: definition ? definition.expenseAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.expenseAccounts },
|
||||
required: true,
|
||||
|
||||
+8
-6
@@ -32,6 +32,7 @@ import { MatFormField, MatLabel, MatError, MatHint } from '@angular/material/for
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { FindPipe } from '../../../pipes/find.pipe';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* Edit Loan Provisioning Criteria Component.
|
||||
@@ -64,6 +65,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
private settingsService = inject(SettingsService);
|
||||
dialog = inject(MatDialog);
|
||||
private route = inject(ActivatedRoute);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Loan Provisioning Criteria form. */
|
||||
provisioningCriteriaForm: UntypedFormGroup;
|
||||
@@ -155,7 +157,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
*/
|
||||
editDefinition(definition: any) {
|
||||
const data = {
|
||||
title: 'Edit Criteria Definition',
|
||||
title: this.translateService.instant('labels.heading.Edit Criteria Definition'),
|
||||
formfields: this.getDefinitionFormFields(definition),
|
||||
layout: { addButtonText: 'Confirm' }
|
||||
};
|
||||
@@ -181,7 +183,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'minAge',
|
||||
label: 'Min Age',
|
||||
label: this.translateService.instant('labels.inputs.Min Age'),
|
||||
value: definition ? definition.minAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -191,7 +193,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'maxAge',
|
||||
label: 'Max Age',
|
||||
label: this.translateService.instant('labels.inputs.Max Age'),
|
||||
value: definition ? definition.maxAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -201,7 +203,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'provisioningPercentage',
|
||||
label: 'Percentage (%)',
|
||||
label: this.translateService.instant('labels.inputs.Percentage') + ' (%)',
|
||||
value: definition ? definition.provisioningPercentage : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -211,7 +213,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'liabilityAccount',
|
||||
label: 'Liability Account',
|
||||
label: this.translateService.instant('labels.inputs.Liability Account'),
|
||||
value: definition ? definition.liabilityAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.liabilityAccounts },
|
||||
required: true,
|
||||
@@ -221,7 +223,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'expenseAccount',
|
||||
label: 'Expense Account',
|
||||
label: this.translateService.instant('labels.inputs.Expense Account'),
|
||||
value: definition ? definition.expenseAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.expenseAccounts },
|
||||
required: true,
|
||||
|
||||
@@ -550,7 +550,7 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'bulkloan',
|
||||
component: BulkLoanReassignmnetComponent,
|
||||
data: { title: 'Bulk Loan Reassignment', breadcrumb: 'Bulk Loan Reasssignment' },
|
||||
data: { title: 'Bulk Loan Reassignment', breadcrumb: 'Bulk Loan Reassignment' },
|
||||
resolve: {
|
||||
offices: OfficesResolver
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
<mat-radio-group class="layout-column gap-10px radio-group-spacing" formControlName="validationPolicyId">
|
||||
@for (passwordPreference of passwordPreferencesData; track passwordPreference) {
|
||||
<mat-radio-button [value]="passwordPreference.id">
|
||||
<span class="description-wrap">{{ passwordPreference.description }}</span>
|
||||
<span class="description-wrap">{{
|
||||
passwordPreference.description | translateKey: 'passwordPreferences'
|
||||
}}</span>
|
||||
</mat-radio-button>
|
||||
}
|
||||
</mat-radio-group>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@for (day of recurrence.controls; track day; let i = $index) {
|
||||
<div>
|
||||
<mat-checkbox labelPosition="after" [formControlName]="i">
|
||||
{{ weekDays[i].name }}
|
||||
{{ weekDays[i].name | translateKey: 'catalogs' }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
<mat-select formControlName="repaymentRescheduleType">
|
||||
@for (repaymentRescheduleType of repaymentRescheduleTypeData; track repaymentRescheduleType) {
|
||||
<mat-option [value]="repaymentRescheduleType.id">
|
||||
{{ repaymentRescheduleType.value }}
|
||||
{{ repaymentRescheduleType.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Pipe, PipeTransform, inject } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Pipe({ name: 'yesNo' })
|
||||
@Pipe({ name: 'yesNo', pure: false })
|
||||
export class YesnoPipe implements PipeTransform {
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<div class="layout-row layout-lt-md-column gap-2percent">
|
||||
<mat-form-field [ngStyle]="{ flex: '0 0 ' + (flex || '83%') }">
|
||||
<input matInput [readonly]="true" [value]="fileName || ''" placeholder="No file selected" />
|
||||
<input
|
||||
matInput
|
||||
[readonly]="true"
|
||||
[value]="fileName || ''"
|
||||
placeholder="{{ 'labels.text.NoFileSelected' | translate }}"
|
||||
/>
|
||||
</mat-form-field>
|
||||
|
||||
<span class="flex-10 align-center">
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
}
|
||||
</div>
|
||||
} @else {
|
||||
<div class="empty-state">No notes available</div>
|
||||
<div class="empty-state">{{ 'labels.text.NoNotesAvailable' | translate }}</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
<div class="layout-row align-start-center">
|
||||
<div class="search-box flex-40">
|
||||
<mat-form-field class="flex-90">
|
||||
<input matInput placeholder="Filter by loan Id or error" (keyup)="applyFilter($event.target.value)" />
|
||||
<input
|
||||
matInput
|
||||
placeholder="{{ 'labels.text.FilterByLoanIdOrError' | translate }}"
|
||||
(keyup)="applyFilter($event.target.value)"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@if (allowRunInlineJob) {
|
||||
|
||||
@@ -176,7 +176,20 @@ export class ViewRoleComponent implements OnInit {
|
||||
* Formats the Role Name
|
||||
* @param string String
|
||||
*/
|
||||
formatName(string: any) {
|
||||
formatName(string: string) {
|
||||
if (!string) {
|
||||
return string;
|
||||
}
|
||||
// Try to translate first
|
||||
const translationKey = `labels.catalogs.${string}`;
|
||||
const translated = this.translateService.instant(translationKey);
|
||||
|
||||
// If translation exists (and is different from key), use it
|
||||
if (translated && translated !== translationKey) {
|
||||
return translated;
|
||||
}
|
||||
|
||||
// Otherwise, format the original string
|
||||
if (string.indexOf('portfolio_') > -1) {
|
||||
string = string.replace('portfolio_', '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user