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
@@ -1,8 +1,8 @@
/** Angular Imports */ /** Angular Imports */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { UntypedFormControl } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { UntypedFormControl } from '@angular/forms';
/** Custom Services */ /** Custom Services */
import { CentersService } from 'app/centers/centers.service'; 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'; import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
/** Custom Models */ /** 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 { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base'; import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
import { Dates } from 'app/core/utils/dates';
/** /**
* Center Attendance component. * Center Attendance component.
@@ -59,7 +60,8 @@ export class CenterAttendanceComponent implements OnInit {
private router: Router, private router: Router,
private centersService: CentersService, private centersService: CentersService,
private settingsService: SettingsService, private settingsService: SettingsService,
public dialog: MatDialog) { public dialog: MatDialog,
private translateService: TranslateService) {
this.route.data.subscribe(( data: { centersActionData: any }) => { this.route.data.subscribe(( data: { centersActionData: any }) => {
this.centerData = data.centersActionData; this.centerData = data.centersActionData;
this.membersData = data.centersActionData.clients; this.membersData = data.centersActionData.clients;
@@ -97,14 +99,14 @@ export class CenterAttendanceComponent implements OnInit {
const formfields: FormfieldBase[] = [ const formfields: FormfieldBase[] = [
new SelectBase({ new SelectBase({
controlName: 'attendanceType', controlName: 'attendanceType',
label: 'Attendance', label: this.translateService.instant('labels.buttons.Attendance'),
value: member.attendanceType, value: member.attendanceType,
options: { label: 'value', value: 'id', data: this.attendanceTypeOptions }, options: { label: 'value', value: 'id', data: this.attendanceTypeOptions },
required: false required: false
}), }),
]; ];
const data = { const data = {
title: 'Assign Member Attendance', title: this.translateService.instant('labels.buttons.Assign Member') + ' ' + this.translateService.instant('labels.buttons.Attendance'),
layout: { addButtonText: 'Confirm' }, layout: { addButtonText: 'Confirm' },
formfields: formfields formfields: formfields
}; };
@@ -4,7 +4,7 @@
<form #formRef="ngForm" [formGroup]="noteForm" fxLayout="row" fxLayoutAlign="start baseline" fxLayoutGap="20px" <form #formRef="ngForm" [formGroup]="noteForm" fxLayout="row" fxLayoutAlign="start baseline" fxLayoutGap="20px"
(ngSubmit)="submit()"> (ngSubmit)="submit()">
<mat-form-field fxFlex="calc(90%-20px)"> <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> </mat-form-field>
<button mat-raised-button fxFlex color="primary" [disabled]="!noteForm.valid" *mifosxHasPermission="'CREATE_GROUPNOTE'"> <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}} <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 { 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 { MatDialog } from '@angular/material/dialog';
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router';
/** Custom Components */ /** Custom Components */
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component'; import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
/** Custom Services */ /** Custom Services */
import { CentersService } from '../../centers.service'; import { TranslateService } from '@ngx-translate/core';
import { AuthenticationService } from '../../../core/authentication/authentication.service'; import { AuthenticationService } from '../../../core/authentication/authentication.service';
import { CentersService } from '../../centers.service';
@Component({ @Component({
selector: 'mifosx-notes-tab', selector: 'mifosx-notes-tab',
@@ -28,7 +29,8 @@ export class NotesTabComponent implements OnInit {
private formBuilder: UntypedFormBuilder, private formBuilder: UntypedFormBuilder,
private centersService: CentersService, private centersService: CentersService,
private authenticationService: AuthenticationService, private authenticationService: AuthenticationService,
private dialog: MatDialog) { private dialog: MatDialog,
private translateService: TranslateService) {
const savedCredentials = this.authenticationService.getCredentials(); const savedCredentials = this.authenticationService.getCredentials();
this.username = savedCredentials.username; this.username = savedCredentials.username;
this.centerId = this.route.parent.snapshot.params['centerId']; this.centerId = this.route.parent.snapshot.params['centerId'];
@@ -66,13 +68,13 @@ export class NotesTabComponent implements OnInit {
required: true, required: true,
value: noteContent, value: noteContent,
controlType: 'input', controlType: 'input',
label: 'Note' label: this.translateService.instant('labels.inputs.Note')
}], }],
layout: { layout: {
columns: 1, columns: 1,
addButtonText: 'Confirm' addButtonText: 'Confirm'
}, },
title: 'Edit Note' title: this.translateService.instant('labels.heading.Edit Note')
} }
}); });
editNoteDialogRef.afterClosed().subscribe((response: any) => { editNoteDialogRef.afterClosed().subscribe((response: any) => {
@@ -86,7 +88,7 @@ export class NotesTabComponent implements OnInit {
deleteNote(noteId: string, index: number) { deleteNote(noteId: string, index: number) {
const deleteNoteDialogRef = this.dialog.open(DeleteDialogComponent, { 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) => { deleteNoteDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) { if (response.delete) {
@@ -69,7 +69,7 @@ export class ClientAddressStepComponent {
*/ */
editAddress(address: any, index: number) { editAddress(address: any, index: number) {
const data = { const data = {
title: 'Edit Client Address', title: this.translateService.instant('labels.buttons.Edit') + ' ' + this.translateService.instant('labels.catalogs.Client') + ' ' + this.translateService.instant('labels.heading.Address'),
formfields: this.getAddressFormFields(address), formfields: this.getAddressFormFields(address),
layout: { addButtonText: 'Edit' } layout: { addButtonText: 'Edit' }
}; };
@@ -94,7 +94,7 @@ export class ClientAddressStepComponent {
*/ */
deleteAddress(address: any, index: number) { deleteAddress(address: any, index: number) {
const deleteAddressDialogRef = this.dialog.open(DeleteDialogComponent, { const deleteAddressDialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: `address type : ${address.addressType} ${index}` } data: { deleteContext: `${this.translateService.instant('labels.heading.Address')} ${this.translateService.instant('labels.inputs.Type')} : ${address.addressType} ${index}` }
}); });
deleteAddressDialogRef.afterClosed().subscribe((response: any) => { deleteAddressDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) { if (response.delete) {
@@ -1,7 +1,7 @@
/** Angular Imports */ /** Angular Imports */
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute } from '@angular/router';
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base'; import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base'; import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
@@ -10,6 +10,7 @@ import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component'; import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
/** Custom Services */ /** Custom Services */
import { TranslateService } from '@ngx-translate/core';
import { ClientsService } from '../../clients.service'; import { ClientsService } from '../../clients.service';
/** /**
@@ -35,10 +36,12 @@ export class AddressTabComponent {
* @param {ActivatedRoute} route Activated Route * @param {ActivatedRoute} route Activated Route
* @param {ClientsService} clientService Clients Service * @param {ClientsService} clientService Clients Service
* @param {MatDialog} dialog Mat Dialog * @param {MatDialog} dialog Mat Dialog
* @param {TranslateService} translateService Translate Service.
*/ */
constructor(private route: ActivatedRoute, constructor(private route: ActivatedRoute,
private clientService: ClientsService, private clientService: ClientsService,
private dialog: MatDialog) { private dialog: MatDialog,
private translateService: TranslateService) {
this.route.data.subscribe((data: { this.route.data.subscribe((data: {
clientAddressData: any, clientAddressData: any,
clientAddressFieldConfig: any, clientAddressFieldConfig: any,
@@ -56,7 +59,7 @@ export class AddressTabComponent {
*/ */
addAddress() { addAddress() {
const data = { const data = {
title: 'Add Client Address', title: this.translateService.instant('labels.buttons.Add') + ' ' + this.translateService.instant('labels.catalogs.Client') + ' ' + this.translateService.instant('labels.heading.Address'),
formfields: this.getAddressFormFields('add') formfields: this.getAddressFormFields('add')
}; };
const addAddressDialogRef = this.dialog.open(FormDialogComponent, { data }); const addAddressDialogRef = this.dialog.open(FormDialogComponent, { data });
@@ -81,7 +84,7 @@ export class AddressTabComponent {
*/ */
editAddress(address: any, index: number) { editAddress(address: any, index: number) {
const data = { const data = {
title: 'Edit Client Address', title: this.translateService.instant('labels.buttons.Edit') + ' ' + this.translateService.instant('labels.catalogs.Client') + ' ' + this.translateService.instant('labels.heading.Address'),
formfields: this.getAddressFormFields('edit', address), formfields: this.getAddressFormFields('edit', address),
layout: { addButtonText: 'Edit' } layout: { addButtonText: 'Edit' }
}; };
@@ -138,10 +141,15 @@ export class AddressTabComponent {
*/ */
getAddressFormFields(formType?: string, address?: any) { getAddressFormFields(formType?: string, address?: any) {
let formfields: FormfieldBase[] = []; let formfields: FormfieldBase[] = [];
for (let index = 0; index < this.clientAddressTemplate.addressTypeIdOptions.length; index++) {
this.clientAddressTemplate.addressTypeIdOptions[index].name = this.translateService.instant(`labels.catalogs.${this.clientAddressTemplate.addressTypeIdOptions[index].name}`)
}
if (formType === 'add') { if (formType === 'add') {
formfields.push(this.isFieldEnabled('addressType') ? new SelectBase({ formfields.push(this.isFieldEnabled('addressType') ? new SelectBase({
controlName: 'addressType', controlName: 'addressType',
label: 'Address Type', label: this.translateService.instant('labels.inputs.Address Type'),
value: address ? address.addressType : '', value: address ? address.addressType : '',
options: { label: 'name', value: 'id', data: this.clientAddressTemplate.addressTypeIdOptions }, options: { label: 'name', value: 'id', data: this.clientAddressTemplate.addressTypeIdOptions },
order: 1 order: 1
@@ -149,7 +157,7 @@ export class AddressTabComponent {
} }
formfields.push(this.isFieldEnabled('street') ? new InputBase({ formfields.push(this.isFieldEnabled('street') ? new InputBase({
controlName: 'street', controlName: 'street',
label: 'Street', label: this.translateService.instant('labels.inputs.Street'),
value: address ? address.street : '', value: address ? address.street : '',
type: 'text', type: 'text',
required: false, required: false,
@@ -157,63 +165,63 @@ export class AddressTabComponent {
}) : null); }) : null);
formfields.push(this.isFieldEnabled('addressLine1') ? new InputBase({ formfields.push(this.isFieldEnabled('addressLine1') ? new InputBase({
controlName: 'addressLine1', controlName: 'addressLine1',
label: 'Address Line 1', label: this.translateService.instant('labels.inputs.Address Line') + ' 1',
value: address ? address.addressLine1 : '', value: address ? address.addressLine1 : '',
type: 'text', type: 'text',
order: 3 order: 3
}) : null); }) : null);
formfields.push(this.isFieldEnabled('addressLine2') ? new InputBase({ formfields.push(this.isFieldEnabled('addressLine2') ? new InputBase({
controlName: 'addressLine2', controlName: 'addressLine2',
label: 'Address Line 2', label: this.translateService.instant('labels.inputs.Address Line') + ' 2',
value: address ? address.addressLine2 : '', value: address ? address.addressLine2 : '',
type: 'text', type: 'text',
order: 4 order: 4
}) : null); }) : null);
formfields.push(this.isFieldEnabled('addressLine3') ? new InputBase({ formfields.push(this.isFieldEnabled('addressLine3') ? new InputBase({
controlName: 'addressLine3', controlName: 'addressLine3',
label: 'Address Line 3', label: this.translateService.instant('labels.inputs.Address Line') + ' 3',
value: address ? address.addressLine3 : '', value: address ? address.addressLine3 : '',
type: 'text', type: 'text',
order: 5 order: 5
}) : null); }) : null);
formfields.push(this.isFieldEnabled('townVillage') ? new InputBase({ formfields.push(this.isFieldEnabled('townVillage') ? new InputBase({
controlName: 'townVillage', controlName: 'townVillage',
label: 'Town / Village', label: this.translateService.instant('labels.inputs.Town / Village'),
value: address ? address.townVillage : '', value: address ? address.townVillage : '',
type: 'text', type: 'text',
order: 6 order: 6
}) : null); }) : null);
formfields.push(this.isFieldEnabled('city') ? new InputBase({ formfields.push(this.isFieldEnabled('city') ? new InputBase({
controlName: 'city', controlName: 'city',
label: 'City', label: this.translateService.instant('labels.inputs.City'),
value: address ? address.city : '', value: address ? address.city : '',
type: 'text', type: 'text',
order: 7 order: 7
}) : null); }) : null);
formfields.push(this.isFieldEnabled('stateProvinceId') ? new SelectBase({ formfields.push(this.isFieldEnabled('stateProvinceId') ? new SelectBase({
controlName: 'stateProvinceId', controlName: 'stateProvinceId',
label: 'State / Province', label: this.translateService.instant('labels.inputs.State / Province'),
value: address ? address.stateProvinceId : '', value: address ? address.stateProvinceId : '',
options: { label: 'name', value: 'id', data: this.clientAddressTemplate.stateProvinceIdOptions }, options: { label: 'name', value: 'id', data: this.clientAddressTemplate.stateProvinceIdOptions },
order: 8 order: 8
}) : null); }) : null);
formfields.push(this.isFieldEnabled('countyDistrict') ? new InputBase({ formfields.push(this.isFieldEnabled('countyDistrict') ? new InputBase({
controlName: 'countryDistrict', controlName: 'countryDistrict',
label: 'Country District', label: this.translateService.instant('labels.inputs.State / Province'),
value: address ? address.countyDistrict : '', value: address ? address.countyDistrict : '',
type: 'text', type: 'text',
order: 11 order: 11
}) : null); }) : null);
formfields.push(this.isFieldEnabled('countryId') ? new SelectBase({ formfields.push(this.isFieldEnabled('countryId') ? new SelectBase({
controlName: 'countryId', controlName: 'countryId',
label: 'Country', label: this.translateService.instant('labels.inputs.Country'),
value: address ? address.countryId : '', value: address ? address.countryId : '',
options: { label: 'name', value: 'id', data: this.clientAddressTemplate.countryIdOptions }, options: { label: 'name', value: 'id', data: this.clientAddressTemplate.countryIdOptions },
order: 10 order: 10
}) : null); }) : null);
formfields.push(this.isFieldEnabled('postalCode') ? new InputBase({ formfields.push(this.isFieldEnabled('postalCode') ? new InputBase({
controlName: 'postalCode', controlName: 'postalCode',
label: 'Postal Code', label: this.translateService.instant('labels.inputs.Postal Code'),
value: address ? address.postalCode : '', value: address ? address.postalCode : '',
type: 'text', type: 'text',
order: 11 order: 11
@@ -45,7 +45,7 @@
<mat-label>{{"labels.inputs.Relationship" | translate}}</mat-label> <mat-label>{{"labels.inputs.Relationship" | translate}}</mat-label>
<mat-select formControlName="relationshipId" required> <mat-select formControlName="relationshipId" required>
<mat-option *ngFor="let relation of addFamilyMemberTemplate.relationshipIdOptions" [value]="relation.id"> <mat-option *ngFor="let relation of addFamilyMemberTemplate.relationshipIdOptions" [value]="relation.id">
{{ relation.name }} {{ relation.name | translateKey:'catalogs' }}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="addFamilyMemberForm.controls.relationshipId.hasError('required')"> <mat-error *ngIf="addFamilyMemberForm.controls.relationshipId.hasError('required')">
@@ -57,7 +57,7 @@
<mat-label>{{"labels.inputs.Gender" | translate}}</mat-label> <mat-label>{{"labels.inputs.Gender" | translate}}</mat-label>
<mat-select formControlName="genderId" required> <mat-select formControlName="genderId" required>
<mat-option *ngFor="let gender of addFamilyMemberTemplate.genderIdOptions" [value]="gender.id"> <mat-option *ngFor="let gender of addFamilyMemberTemplate.genderIdOptions" [value]="gender.id">
{{ gender.name }} {{ gender.name | translateKey:'catalogs' }}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="addFamilyMemberForm.controls.genderId.hasError('required')"> <mat-error *ngIf="addFamilyMemberForm.controls.genderId.hasError('required')">
@@ -69,7 +69,7 @@
<mat-label>{{"labels.inputs.Profession" | translate}}</mat-label> <mat-label>{{"labels.inputs.Profession" | translate}}</mat-label>
<mat-select formControlName="professionId"> <mat-select formControlName="professionId">
<mat-option *ngFor="let profession of addFamilyMemberTemplate.professionIdOptions" [value]="profession.id"> <mat-option *ngFor="let profession of addFamilyMemberTemplate.professionIdOptions" [value]="profession.id">
{{ profession.name }} {{ profession.name | translateKey:'catalogs' }}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
@@ -79,7 +79,7 @@
<mat-select formControlName="maritalStatusId"> <mat-select formControlName="maritalStatusId">
<mat-option *ngFor="let maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions" <mat-option *ngFor="let maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions"
[value]="maritalStatus.id"> [value]="maritalStatus.id">
{{ maritalStatus.name }} {{ maritalStatus.name | translateKey:'catalogs'}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
@@ -45,7 +45,7 @@
<mat-label>{{"labels.inputs.Relationship" | translate}}</mat-label> <mat-label>{{"labels.inputs.Relationship" | translate}}</mat-label>
<mat-select formControlName="relationshipId" required> <mat-select formControlName="relationshipId" required>
<mat-option *ngFor="let relation of addFamilyMemberTemplate.relationshipIdOptions" [value]="relation.id"> <mat-option *ngFor="let relation of addFamilyMemberTemplate.relationshipIdOptions" [value]="relation.id">
{{ relation.name }} {{ relation.name | translateKey:'catalogs'}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="editFamilyMemberForm.controls.relationshipId.hasError('required')"> <mat-error *ngIf="editFamilyMemberForm.controls.relationshipId.hasError('required')">
@@ -57,7 +57,7 @@
<mat-label>{{"labels.inputs.Gender" | translate}}</mat-label> <mat-label>{{"labels.inputs.Gender" | translate}}</mat-label>
<mat-select formControlName="genderId" required> <mat-select formControlName="genderId" required>
<mat-option *ngFor="let gender of addFamilyMemberTemplate.genderIdOptions" [value]="gender.id"> <mat-option *ngFor="let gender of addFamilyMemberTemplate.genderIdOptions" [value]="gender.id">
{{ gender.name }} {{ gender.name | translateKey:'catalogs'}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="editFamilyMemberForm.controls.genderId.hasError('required')"> <mat-error *ngIf="editFamilyMemberForm.controls.genderId.hasError('required')">
@@ -69,7 +69,7 @@
<mat-label>{{"labels.inputs.Profession" | translate}}</mat-label> <mat-label>{{"labels.inputs.Profession" | translate}}</mat-label>
<mat-select formControlName="professionId"> <mat-select formControlName="professionId">
<mat-option *ngFor="let profession of addFamilyMemberTemplate.professionIdOptions" [value]="profession.id"> <mat-option *ngFor="let profession of addFamilyMemberTemplate.professionIdOptions" [value]="profession.id">
{{ profession.name }} {{ profession.name | translateKey:'catalogs'}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
@@ -79,7 +79,7 @@
<mat-select formControlName="maritalStatusId"> <mat-select formControlName="maritalStatusId">
<mat-option *ngFor="let maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions" <mat-option *ngFor="let maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions"
[value]="maritalStatus.id"> [value]="maritalStatus.id">
{{ maritalStatus.name }} {{ maritalStatus.name | translateKey:'catalogs'}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
@@ -1,8 +1,8 @@
/** Angular Imports */ /** Angular Imports */
import { Component, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MatTable } from '@angular/material/table';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { MatTable } from '@angular/material/table';
import { ActivatedRoute } from '@angular/router';
/** Custom Models */ /** Custom Models */
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
@@ -10,13 +10,13 @@ import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base'; import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
/** Custom Components */ /** Custom Components */
import { UploadDocumentDialogComponent } from '../custom-dialogs/upload-document-dialog/upload-document-dialog.component';
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component'; import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
import { UploadDocumentDialogComponent } from '../custom-dialogs/upload-document-dialog/upload-document-dialog.component';
/** Custom Services */ /** Custom Services */
import { ClientsService } from '../../clients.service';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { ClientsService } from '../../clients.service';
/** /**
* Identities Tab Component * Identities Tab Component
@@ -72,6 +72,9 @@ export class IdentitiesTabComponent {
* Add Client Identifier * Add Client Identifier
*/ */
addIdentifier() { addIdentifier() {
for (let index = 0; index < this.clientIdentifierTemplate.allowedDocumentTypes.length; index++) {
this.clientIdentifierTemplate.allowedDocumentTypes[index].name = this.translateService.instant(`labels.catalogs.${this.clientIdentifierTemplate.allowedDocumentTypes[index].name}`)
}
const formfields: FormfieldBase[] = [ const formfields: FormfieldBase[] = [
new SelectBase({ new SelectBase({
controlName: 'documentTypeId', controlName: 'documentTypeId',
@@ -139,7 +142,7 @@ export class IdentitiesTabComponent {
*/ */
deleteIdentifier(clientId: string, identifierId: string, index: number) { deleteIdentifier(clientId: string, identifierId: string, index: number) {
const deleteIdentifierDialogRef = this.dialog.open(DeleteDialogComponent, { const deleteIdentifierDialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: `identifier id:${identifierId}` } data: { deleteContext: `${this.translateService.instant('labels.heading.identifier id')} : ${identifierId}` }
}); });
deleteIdentifierDialogRef.afterClosed().subscribe((response: any) => { deleteIdentifierDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) { if (response.delete) {
+6
View File
@@ -321,6 +321,7 @@
"Approve": "Schvalovat", "Approve": "Schvalovat",
"Apply Changes": "Aplikuj změny", "Apply Changes": "Aplikuj změny",
"Assign Staff": "Přiřadit personál", "Assign Staff": "Přiřadit personál",
"Assign Member": "Přiřadit člena",
"Attach Meeting": "Připojit schůzku", "Attach Meeting": "Připojit schůzku",
"Attendance": "Účast", "Attendance": "Účast",
"Back": "Zadní", "Back": "Zadní",
@@ -724,6 +725,10 @@
"unmarried": "svobodný", "unmarried": "svobodný",
"office address": "adresa kanceláře", "office address": "adresa kanceláře",
"residential address": "adresa bydliště", "residential address": "adresa bydliště",
"Passport": "Cestovní pas",
"Id": "Id",
"Drivers License": "Řidičský průkaz",
"Any Other Id Type": "Jakýkoli jiný typ ID",
"Transfer to Savings": "Převod do Úspory" "Transfer to Savings": "Převod do Úspory"
}, },
"commons": { "commons": {
@@ -918,6 +923,7 @@
"Guarantors Details": "Podrobnosti o garantech", "Guarantors Details": "Podrobnosti o garantech",
"Hold Amount": "Částka držení", "Hold Amount": "Částka držení",
"Holiday": "Dovolená", "Holiday": "Dovolená",
"identifier id": "identifikátor id",
"Identities": "Totožnosti", "Identities": "Totožnosti",
"Import Employees": "Import zaměstnanců", "Import Employees": "Import zaměstnanců",
"Import Offices": "Dovozní kanceláře", "Import Offices": "Dovozní kanceláře",
+6
View File
@@ -321,6 +321,7 @@
"Approve": "Genehmigen", "Approve": "Genehmigen",
"Apply Changes": "Änderungen übernehmen", "Apply Changes": "Änderungen übernehmen",
"Assign Staff": "Personal zuweisen", "Assign Staff": "Personal zuweisen",
"Assign Member": "Mitglied zuweisen",
"Attach Meeting": "Besprechung anhängen", "Attach Meeting": "Besprechung anhängen",
"Attendance": "Teilnahme", "Attendance": "Teilnahme",
"Back": "Zurück", "Back": "Zurück",
@@ -724,6 +725,10 @@
"unmarried": "unverheiratet", "unmarried": "unverheiratet",
"office address": "Büro adresse", "office address": "Büro adresse",
"residential address": "Wohnadresse", "residential address": "Wohnadresse",
"Passport": "Reisepass",
"Id": "Ausweis",
"Drivers License": "Führerschein",
"Any Other Id Type": "Jeder andere ID-Typ",
"Transfer to Savings": "Übertragen auf Ersparnisse" "Transfer to Savings": "Übertragen auf Ersparnisse"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "Angaben zu den Bürgen", "Guarantors Details": "Angaben zu den Bürgen",
"Hold Amount": "Betrag zurückhalten", "Hold Amount": "Betrag zurückhalten",
"Holiday": "Urlaub", "Holiday": "Urlaub",
"identifier id": "Identifikator-ID",
"Identities": "Identitäten", "Identities": "Identitäten",
"Import Employees": "Mitarbeiter importieren", "Import Employees": "Mitarbeiter importieren",
"Import Offices": "Importbüros", "Import Offices": "Importbüros",
+6
View File
@@ -321,6 +321,7 @@
"Approve": "Approve", "Approve": "Approve",
"Apply Changes": "Apply Changes", "Apply Changes": "Apply Changes",
"Assign Staff": "Assign Staff", "Assign Staff": "Assign Staff",
"Assign Member": "Assign Member",
"Attach Meeting": "Attach Meeting", "Attach Meeting": "Attach Meeting",
"Attendance": "Attendance", "Attendance": "Attendance",
"Back": "Back", "Back": "Back",
@@ -726,6 +727,10 @@
"unmarried": "unmarried", "unmarried": "unmarried",
"office address": "office address", "office address": "office address",
"residential address": "residential address", "residential address": "residential address",
"Passport": "Passport",
"Id": "Id",
"Drivers License": "Drivers License",
"Any Other Id Type": "Any Other Id Type",
"Transfer to Savings": "Transfer to Savings" "Transfer to Savings": "Transfer to Savings"
}, },
"commons": { "commons": {
@@ -921,6 +926,7 @@
"Guarantors Details": "Guarantors Details", "Guarantors Details": "Guarantors Details",
"Hold Amount": "Hold Amount", "Hold Amount": "Hold Amount",
"Holiday": "Holiday", "Holiday": "Holiday",
"identifier id": "identifier id",
"Identities": "Identities", "Identities": "Identities",
"Import Employees": "Import Employees", "Import Employees": "Import Employees",
"Import Offices": "Import Offices", "Import Offices": "Import Offices",
+6
View File
@@ -321,6 +321,7 @@
"Approve": "Aprobar", "Approve": "Aprobar",
"Apply Changes": "Aplicar cambios", "Apply Changes": "Aplicar cambios",
"Assign Staff": "Asignar Asesor", "Assign Staff": "Asignar Asesor",
"Assign Member": "Asignar miembro",
"Attach Meeting": "Adjuntar reunión", "Attach Meeting": "Adjuntar reunión",
"Attendance": "Asistencia", "Attendance": "Asistencia",
"Back": "Atrás", "Back": "Atrás",
@@ -723,6 +724,10 @@
"unmarried": "soltero", "unmarried": "soltero",
"office address": "Dirección de la oficina", "office address": "Dirección de la oficina",
"residential address": "dirección residencial", "residential address": "dirección residencial",
"Passport": "Pasaporte",
"Id": "Identificación",
"Drivers License": "Licencia de conducir",
"Any Other Id Type": "Cualquier otro tipo de identificación",
"Transfer to Savings": "Transferir a Ahorros" "Transfer to Savings": "Transferir a Ahorros"
}, },
"commons": { "commons": {
@@ -918,6 +923,7 @@
"Guarantors Details": "Detalles de los garantes", "Guarantors Details": "Detalles de los garantes",
"Hold Amount": "Monto retenido", "Hold Amount": "Monto retenido",
"Holiday": "Día festivo", "Holiday": "Día festivo",
"identifier id": "identificación del identificador",
"Identities": "Identidades", "Identities": "Identidades",
"Import Employees": "Importar empleados", "Import Employees": "Importar empleados",
"Import Offices": "Oficinas de Importación", "Import Offices": "Oficinas de Importación",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "Appliquer les modifications", "Apply Changes": "Appliquer les modifications",
"Approve": "Approuver", "Approve": "Approuver",
"Assign Staff": "Affecter du personnel", "Assign Staff": "Affecter du personnel",
"Assign Member": "Attribuer un membre",
"Attach Meeting": "Joindre une réunion", "Attach Meeting": "Joindre une réunion",
"Attendance": "Présence", "Attendance": "Présence",
"Back": "Dos", "Back": "Dos",
@@ -724,6 +725,10 @@
"unmarried": "célibataire", "unmarried": "célibataire",
"office address": "Adresse de bureau", "office address": "Adresse de bureau",
"residential address": "adresse résidentielle", "residential address": "adresse résidentielle",
"Passport": "Passeport",
"Id": "Identifiant",
"Drivers License": "Le permis de conduire",
"Any Other Id Type": "Tout autre type d'identifiant",
"Transfer to Savings": "Transfert vers l'épargne" "Transfer to Savings": "Transfert vers l'épargne"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "Détails des garants", "Guarantors Details": "Détails des garants",
"Hold Amount": "Montant retenu", "Hold Amount": "Montant retenu",
"Holiday": "Vacances", "Holiday": "Vacances",
"identifier id": "identifiant",
"Identities": "Identités", "Identities": "Identités",
"Import Employees": "Importer des employés", "Import Employees": "Importer des employés",
"Import Offices": "Bureaux d'importation", "Import Offices": "Bureaux d'importation",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "Applica i cambiamenti", "Apply Changes": "Applica i cambiamenti",
"Approve": "Approvare", "Approve": "Approvare",
"Assign Staff": "Assegnare il personale", "Assign Staff": "Assegnare il personale",
"Assign Member": "Assegna membro",
"Attach Meeting": "Allega riunione", "Attach Meeting": "Allega riunione",
"Attendance": "Partecipazione", "Attendance": "Partecipazione",
"Back": "Indietro", "Back": "Indietro",
@@ -724,6 +725,10 @@
"unmarried": "non sposato", "unmarried": "non sposato",
"office address": "indirizzo dell'ufficio", "office address": "indirizzo dell'ufficio",
"residential address": "indirizzo di residenza", "residential address": "indirizzo di residenza",
"Passport": "Passaporto",
"Id": "Id",
"Drivers License": "Patente di guida",
"Any Other Id Type": "Qualsiasi altro tipo di documento di identità",
"Transfer to Savings": "Trasferimento al risparmio" "Transfer to Savings": "Trasferimento al risparmio"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "Dettagli sui garanti", "Guarantors Details": "Dettagli sui garanti",
"Hold Amount": "Trattenete importo", "Hold Amount": "Trattenete importo",
"Holiday": "Vacanza", "Holiday": "Vacanza",
"identifier id": "identificativo identificativo",
"Identities": "Identità", "Identities": "Identità",
"Import Employees": "Importa dipendenti", "Import Employees": "Importa dipendenti",
"Import Offices": "Uffici di importazione", "Import Offices": "Uffici di importazione",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "변경 승인", "Apply Changes": "변경 승인",
"Approve": "승인하다", "Approve": "승인하다",
"Assign Staff": "직원 배정", "Assign Staff": "직원 배정",
"Assign Member": "회원 지정",
"Attach Meeting": "회의 첨부", "Attach Meeting": "회의 첨부",
"Attendance": "출석", "Attendance": "출석",
"Back": "뒤쪽에", "Back": "뒤쪽에",
@@ -724,6 +725,10 @@
"unmarried": "미혼", "unmarried": "미혼",
"office address": "사무실 주소", "office address": "사무실 주소",
"residential address": "거주지 주소", "residential address": "거주지 주소",
"Passport": "여권",
"Id": "ID",
"Drivers License": "운전 면허증",
"Any Other Id Type": "기타 ID 유형",
"Transfer to Savings": "저축으로 이체" "Transfer to Savings": "저축으로 이체"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "보증인 세부사항", "Guarantors Details": "보증인 세부사항",
"Hold Amount": "보유금액", "Hold Amount": "보유금액",
"Holiday": "휴일", "Holiday": "휴일",
"identifier id": "식별자 ID",
"Identities": "신원", "Identities": "신원",
"Import Employees": "직원 가져오기", "Import Employees": "직원 가져오기",
"Import Offices": "수입 사무소", "Import Offices": "수입 사무소",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "Taikyti pakeitimus", "Apply Changes": "Taikyti pakeitimus",
"Approve": "Patvirtinti", "Approve": "Patvirtinti",
"Assign Staff": "Paskirkite darbuotojus", "Assign Staff": "Paskirkite darbuotojus",
"Assign Member": "Priskirti narį",
"Attach Meeting": "Pridėti susitikimą", "Attach Meeting": "Pridėti susitikimą",
"Attendance": "Lankomumas", "Attendance": "Lankomumas",
"Back": "Atgal", "Back": "Atgal",
@@ -724,6 +725,10 @@
"unmarried": "nevedęs", "unmarried": "nevedęs",
"office address": "biuro adresas", "office address": "biuro adresas",
"residential address": "gyvenamosios vietos adresas", "residential address": "gyvenamosios vietos adresas",
"Passport": "Pasas",
"Id": "Id",
"Drivers License": "Vairuotojo pažymėjimas",
"Any Other Id Type": "Bet koks kitas ID tipas",
"Transfer to Savings": "Perkėlimas į santaupas" "Transfer to Savings": "Perkėlimas į santaupas"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "Išsami informacija apie garantus", "Guarantors Details": "Išsami informacija apie garantus",
"Hold Amount": "Laikymo suma", "Hold Amount": "Laikymo suma",
"Holiday": "Šventė", "Holiday": "Šventė",
"identifier id": "identifikatoriaus id",
"Identities": "Tapatybės", "Identities": "Tapatybės",
"Import Employees": "Importuoti darbuotojus", "Import Employees": "Importuoti darbuotojus",
"Import Offices": "Importo biurai", "Import Offices": "Importo biurai",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "Lietot izmaiņas", "Apply Changes": "Lietot izmaiņas",
"Approve": "Apstiprināt", "Approve": "Apstiprināt",
"Assign Staff": "Norīkojiet personālu", "Assign Staff": "Norīkojiet personālu",
"Assign Member": "Piešķirt biedru",
"Attach Meeting": "Pievienot sapulci", "Attach Meeting": "Pievienot sapulci",
"Attendance": "Apmeklējums", "Attendance": "Apmeklējums",
"Back": "Atpakaļ", "Back": "Atpakaļ",
@@ -724,6 +725,10 @@
"unmarried": "neprecējies", "unmarried": "neprecējies",
"office address": "biroja adrese", "office address": "biroja adrese",
"residential address": "dzīvesvietas adrese", "residential address": "dzīvesvietas adrese",
"Passport": "Pase",
"Id": "Id",
"Drivers License": "Vadītāja apliecība",
"Any Other Id Type": "Jebkurš cits ID veids",
"Transfer to Savings": "Pārskaitījums uz uzkrājumiem" "Transfer to Savings": "Pārskaitījums uz uzkrājumiem"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "Sīkāka informācija par galvotāju", "Guarantors Details": "Sīkāka informācija par galvotāju",
"Hold Amount": "Aizturēšanas summa", "Hold Amount": "Aizturēšanas summa",
"Holiday": "Brīvdienas", "Holiday": "Brīvdienas",
"identifier id": "identifikatora id",
"Identities": "Identitātes", "Identities": "Identitātes",
"Import Employees": "Importēt darbiniekus", "Import Employees": "Importēt darbiniekus",
"Import Offices": "Importa biroji", "Import Offices": "Importa biroji",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "परिवर्तनहरू लागू गर्नुहोस्", "Apply Changes": "परिवर्तनहरू लागू गर्नुहोस्",
"Approve": "मंजूर गर्नु", "Approve": "मंजूर गर्नु",
"Assign Staff": "कर्मचारी नियुक्त गर्नुहोस्", "Assign Staff": "कर्मचारी नियुक्त गर्नुहोस्",
"Assign Member": "सदस्य नियुक्त गर्नुहोस्",
"Attach Meeting": "बैठक संलग्न गर्नुहोस्", "Attach Meeting": "बैठक संलग्न गर्नुहोस्",
"Attendance": "उपस्थित", "Attendance": "उपस्थित",
"Back": "पछाडि", "Back": "पछाडि",
@@ -724,6 +725,10 @@
"unmarried": "अविवाहित", "unmarried": "अविवाहित",
"office address": "कार्यालय ठेगाना", "office address": "कार्यालय ठेगाना",
"residential address": "आवासीय ठेगाना", "residential address": "आवासीय ठेगाना",
"Passport": "राहदानी",
"Id": "आईडी",
"Drivers License": "चालकको सवारी इजाजत पत्र",
"Any Other Id Type": "कुनै पनि अन्य आईडी प्रकार",
"Transfer to Savings": "बचतमा स्थानान्तरण गर्नुहोस्" "Transfer to Savings": "बचतमा स्थानान्तरण गर्नुहोस्"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "ग्यारेन्टर विवरणहरू", "Guarantors Details": "ग्यारेन्टर विवरणहरू",
"Hold Amount": "रकम होल्ड गर्नुहोस्", "Hold Amount": "रकम होल्ड गर्नुहोस्",
"Holiday": "बिदाको आनन्द लिनु", "Holiday": "बिदाको आनन्द लिनु",
"identifier id": "पहिचानकर्ता आईडी",
"Identities": "पहिचानहरू", "Identities": "पहिचानहरू",
"Import Employees": "कर्मचारी आयात गर्नुहोस्", "Import Employees": "कर्मचारी आयात गर्नुहोस्",
"Import Offices": "आयात कार्यालयहरू", "Import Offices": "आयात कार्यालयहरू",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "Aplicar mudanças", "Apply Changes": "Aplicar mudanças",
"Approve": "Aprovar", "Approve": "Aprovar",
"Assign Staff": "Atribuir equipe", "Assign Staff": "Atribuir equipe",
"Assign Member": "Atribuir membro",
"Attach Meeting": "Anexar reunião", "Attach Meeting": "Anexar reunião",
"Attendance": "Comparecimento", "Attendance": "Comparecimento",
"Back": "Voltar", "Back": "Voltar",
@@ -724,6 +725,10 @@
"unmarried": "solteiro", "unmarried": "solteiro",
"office address": "Endereço do escritório", "office address": "Endereço do escritório",
"residential address": "endereço residencial", "residential address": "endereço residencial",
"Passport": "Passaporte",
"Id": "Eu ia",
"Drivers License": "Carteira de motorista",
"Any Other Id Type": "Qualquer outro tipo de ID",
"Transfer to Savings": "Transferência para Poupança" "Transfer to Savings": "Transferência para Poupança"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "Detalhes dos Fiadores", "Guarantors Details": "Detalhes dos Fiadores",
"Hold Amount": "Valor retido", "Hold Amount": "Valor retido",
"Holiday": "Feriado", "Holiday": "Feriado",
"identifier id": "ID do identificador",
"Identities": "Identidades", "Identities": "Identidades",
"Import Employees": "Importar funcionários", "Import Employees": "Importar funcionários",
"Import Offices": "Escritórios de Importação", "Import Offices": "Escritórios de Importação",
+6
View File
@@ -321,6 +321,7 @@
"Apply Changes": "Tekeleza Mabadiliko", "Apply Changes": "Tekeleza Mabadiliko",
"Approve": "Idhini", "Approve": "Idhini",
"Assign Staff": "Wape Wafanyakazi", "Assign Staff": "Wape Wafanyakazi",
"Assign Member": "Mkabidhi Mwanachama",
"Attach Meeting": "Ambatanisha Mkutano", "Attach Meeting": "Ambatanisha Mkutano",
"Attendance": "Mahudhurio", "Attendance": "Mahudhurio",
"Back": "Nyuma", "Back": "Nyuma",
@@ -724,6 +725,10 @@
"unmarried": "bila kuolewa", "unmarried": "bila kuolewa",
"office address": "anwani ya ofisi", "office address": "anwani ya ofisi",
"residential address": "anwani ya makazi", "residential address": "anwani ya makazi",
"Passport": "Pasipoti",
"Id": "Kitambulisho",
"Drivers License": "Leseni ya Udereva",
"Any Other Id Type": "Aina Nyingine Yoyote ya Kitambulisho",
"Transfer to Savings": "Hamisha kwa Akiba" "Transfer to Savings": "Hamisha kwa Akiba"
}, },
"commons": { "commons": {
@@ -919,6 +924,7 @@
"Guarantors Details": "Maelezo ya Wadhamini", "Guarantors Details": "Maelezo ya Wadhamini",
"Hold Amount": "Shikilia Kiasi", "Hold Amount": "Shikilia Kiasi",
"Holiday": "Sikukuu", "Holiday": "Sikukuu",
"identifier id": "kitambulisho",
"Identities": "Vitambulisho", "Identities": "Vitambulisho",
"Import Employees": "Wafanyikazi wa Kuagiza", "Import Employees": "Wafanyikazi wa Kuagiza",
"Import Offices": "Ofisi za Kuagiza", "Import Offices": "Ofisi za Kuagiza",