add transaltekey pipe for accountnumberperferences in system modules
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
1fdaf44645
commit
02bf1249b1
@@ -20,7 +20,7 @@
|
||||
|
||||
<ng-container matColumnDef="accountType">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Account Number Preferences' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let accountNumberPreference"> {{ accountNumberPreference.accountType.value }} </td>
|
||||
<td mat-cell *matCellDef="let accountNumberPreference"> {{ accountNumberPreference.accountType.value | translateKey:'catalogs' }} </td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
<mat-label>{{'labels.inputs.Account Type' | translate}}</mat-label>
|
||||
<mat-select required formControlName="accountType">
|
||||
<mat-option *ngFor="let accountType of accountNumberPreferencesTemplateData.accountTypeOptions" [value]="accountType.id">
|
||||
{{ accountType.value }}
|
||||
{{ accountType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="accountNumberPreferenceForm.controls.accountType.hasError('required')">
|
||||
@@ -24,7 +24,7 @@
|
||||
<mat-label>{{'labels.inputs.Prefix Field' | translate}}</mat-label>
|
||||
<mat-select formControlName="prefixType">
|
||||
<mat-option *ngFor="let prefixType of prefixTypeData" [value]="prefixType.id">
|
||||
{{ prefixType.value }}
|
||||
{{ prefixType.value}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
<mat-label>{{'labels.inputs.Account Type' | translate}}</mat-label>
|
||||
<mat-select required formControlName="accountType">
|
||||
<mat-option *ngFor="let accountType of accountNumberPreferencesTemplateData.accountTypeOptions" [value]="accountType.id">
|
||||
{{ accountType.value }}
|
||||
{{ accountType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="accountNumberPreferenceForm.controls.accountType.hasError('required')">
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountNumberPreferenceData.accountType.value }}
|
||||
{{ accountNumberPreferenceData.accountType.value | translateKey:'catalogs' }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="mat-body-strong" *ngIf="accountNumberPreferenceData.prefixType">
|
||||
|
||||
+6
-3
@@ -1,12 +1,13 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
import { SystemService } from '../../system.service';
|
||||
|
||||
/** Custom Components */
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||
|
||||
/**
|
||||
@@ -28,11 +29,13 @@ export class ViewAccountNumberPreferenceComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {MatDialog} dialog Dialog reference.
|
||||
* @param {TranslateService} translateService Translate Service.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute,
|
||||
private systemService: SystemService,
|
||||
private router: Router,
|
||||
private dialog: MatDialog) {
|
||||
private dialog: MatDialog,
|
||||
private translateService: TranslateService) {
|
||||
this.route.data.subscribe((data: { accountNumberPreference: any }) => {
|
||||
this.accountNumberPreferenceData = data.accountNumberPreference;
|
||||
});
|
||||
@@ -46,7 +49,7 @@ export class ViewAccountNumberPreferenceComponent implements OnInit {
|
||||
*/
|
||||
delete() {
|
||||
const deleteAccountNumberPreferenceDialogRef = this.dialog.open(DeleteDialogComponent, {
|
||||
data: { deleteContext: `account number preference ${this.accountNumberPreferenceData.id}` }
|
||||
data: { deleteContext: this.translateService.instant('labels.heading.Account Number Preferences') + ' ' + this.accountNumberPreferenceData.id}
|
||||
});
|
||||
deleteAccountNumberPreferenceDialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response.delete) {
|
||||
|
||||
Reference in New Issue
Block a user