add missed translation to client module

This commit is contained in:
Omar-Nabil
2024-08-05 11:18:01 -06:00
committed by Jose Alberto Hernandez
parent 656537a0bc
commit 559e0139c3
20 changed files with 132 additions and 45 deletions
@@ -4,7 +4,7 @@
<form #formRef="ngForm" [formGroup]="noteForm" fxLayout="row" fxLayoutAlign="start baseline" fxLayoutGap="20px"
(ngSubmit)="submit()">
<mat-form-field fxFlex="calc(90%-20px)">
<textarea formControlName="note" matInput placeholder="Write a note ...."></textarea>
<textarea formControlName="note" matInput placeholder="{{'labels.text.Write a note' | translate}} ...."></textarea>
</mat-form-field>
<button mat-raised-button fxFlex color="primary" [disabled]="!noteForm.valid" *mifosxHasPermission="'CREATE_GROUPNOTE'">
<fa-icon icon="plus" class="m-r-10"></fa-icon> {{"labels.buttons.Add" | translate}}
@@ -1,15 +1,16 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
/** Custom Components */
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
/** Custom Services */
import { CentersService } from '../../centers.service';
import { TranslateService } from '@ngx-translate/core';
import { AuthenticationService } from '../../../core/authentication/authentication.service';
import { CentersService } from '../../centers.service';
@Component({
selector: 'mifosx-notes-tab',
@@ -28,7 +29,8 @@ export class NotesTabComponent implements OnInit {
private formBuilder: UntypedFormBuilder,
private centersService: CentersService,
private authenticationService: AuthenticationService,
private dialog: MatDialog) {
private dialog: MatDialog,
private translateService: TranslateService) {
const savedCredentials = this.authenticationService.getCredentials();
this.username = savedCredentials.username;
this.centerId = this.route.parent.snapshot.params['centerId'];
@@ -66,13 +68,13 @@ export class NotesTabComponent implements OnInit {
required: true,
value: noteContent,
controlType: 'input',
label: 'Note'
label: this.translateService.instant('labels.inputs.Note')
}],
layout: {
columns: 1,
addButtonText: 'Confirm'
},
title: 'Edit Note'
title: this.translateService.instant('labels.heading.Edit Note')
}
});
editNoteDialogRef.afterClosed().subscribe((response: any) => {
@@ -86,7 +88,7 @@ export class NotesTabComponent implements OnInit {
deleteNote(noteId: string, index: number) {
const deleteNoteDialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: `Note id:${noteId}` }
data: { deleteContext: `${this.translateService.instant('labels.inputs.Note')} ${this.translateService.instant('labels.inputs.Id')}:${noteId}` }
});
deleteNoteDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) {