refs #1416 Add translations for organizational unit types in edit form
testing/ogGui-multibranch/pipeline/head This commit looks good Details

pull/12/head
Lucas Lara García 2025-01-30 12:16:08 +01:00
parent e3e00f3765
commit b2bf6b8c96
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@
<mat-form-field class="form-field">
<mat-label>{{ 'typeLabel' | translate }}</mat-label>
<mat-select formControlName="type" required>
<mat-option *ngFor="let type of filteredTypes" [value]="type">{{ type }}</mat-option>
<mat-option *ngFor="let type of filteredTypes" [value]="type">{{ typeTranslations[type] }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="form-field">

View File

@ -19,6 +19,12 @@ export class EditOrganizationalUnitComponent implements OnInit {
networkSettingsFormGroup: FormGroup;
classroomInfoFormGroup: FormGroup;
types: string[] = ['organizational-unit', 'classrooms-group', 'classroom', 'clients-group'];
typeTranslations: { [key: string]: string } = {
'organizational-unit': 'Centro',
'classrooms-group': 'Grupo de aulas',
'classroom': 'Aula',
'clients-group': 'Grupo de clientes'
};
parentUnits: any[] = [];
hardwareProfiles: any[] = [];
isEditMode: boolean;