add missed translation to client module
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
656537a0bc
commit
559e0139c3
+7
-5
@@ -1,8 +1,8 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
|
||||
/** Custom Services */
|
||||
import { CentersService } from 'app/centers/centers.service';
|
||||
@@ -12,9 +12,10 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
||||
|
||||
/** Custom Models */
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
||||
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
/**
|
||||
* Center Attendance component.
|
||||
@@ -59,7 +60,8 @@ export class CenterAttendanceComponent implements OnInit {
|
||||
private router: Router,
|
||||
private centersService: CentersService,
|
||||
private settingsService: SettingsService,
|
||||
public dialog: MatDialog) {
|
||||
public dialog: MatDialog,
|
||||
private translateService: TranslateService) {
|
||||
this.route.data.subscribe(( data: { centersActionData: any }) => {
|
||||
this.centerData = data.centersActionData;
|
||||
this.membersData = data.centersActionData.clients;
|
||||
@@ -97,14 +99,14 @@ export class CenterAttendanceComponent implements OnInit {
|
||||
const formfields: FormfieldBase[] = [
|
||||
new SelectBase({
|
||||
controlName: 'attendanceType',
|
||||
label: 'Attendance',
|
||||
label: this.translateService.instant('labels.buttons.Attendance'),
|
||||
value: member.attendanceType,
|
||||
options: { label: 'value', value: 'id', data: this.attendanceTypeOptions },
|
||||
required: false
|
||||
}),
|
||||
];
|
||||
const data = {
|
||||
title: 'Assign Member Attendance',
|
||||
title: this.translateService.instant('labels.buttons.Assign Member') + ' ' + this.translateService.instant('labels.buttons.Attendance'),
|
||||
layout: { addButtonText: 'Confirm' },
|
||||
formfields: formfields
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user