Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop
testing/ogGui-multibranch/pipeline/head This commit looks good Details

pull/16/head
Manuel Aranda Rosales 2025-02-13 15:43:55 +01:00
commit c6a81a8152
2 changed files with 12 additions and 5 deletions

View File

@ -15,7 +15,8 @@
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
</mat-tab>
<mat-tab [disabled]="data.data.type !== 'classroom'" label="{{ 'classroomNetworkPropertiesTab' | translate }}">
<mat-tab [disabled]="data.data.type !== 'classroom' && data.data.type !== 'clients-group'"
label="{{ 'classroomNetworkPropertiesTab' | translate }}">
<table mat-table [dataSource]="networkData" class="mat-elevation-z8">
<ng-container matColumnDef="property">
<th mat-header-cell *matHeaderCellDef>{{ 'propertyHeader' | translate }}</th>
@ -30,4 +31,4 @@
</table>
</mat-tab>
</mat-tab-group>
</div>
</div>

View File

@ -1,6 +1,6 @@
import { HttpClient } from '@angular/common/http';
import {Component, Inject} from '@angular/core';
import {MAT_DIALOG_DATA} from "@angular/material/dialog";
import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from "@angular/material/dialog";
@Component({
selector: 'app-show-organizational-unit',
@ -14,6 +14,12 @@ export class ShowOrganizationalUnitComponent {
ou: any;
generalData: any[] = [];
networkData: any[] = [];
typeTranslations: { [key: string]: string } = {
'organizational-unit': 'Centro',
'classrooms-group': 'Grupo de aulas',
'classroom': 'Aula',
'clients-group': 'Grupo de clientes'
};
constructor(
@Inject(MAT_DIALOG_DATA) public data: any,
@ -60,7 +66,7 @@ export class ShowOrganizationalUnitComponent {
{ property: 'Uuid', value: this.ou.uuid },
{ property: 'Descripción', value: this.ou.description },
{ property: 'Comentarios', value: this.ou.comments },
{ property: 'Tipo', value: this.ou.type },
{ property: 'Tipo', value: this.typeTranslations[this.ou.type] },
{ property: 'Unidad organizativa superior', value: this.ou.parent ? this.ou.parent.name : '-' },
{ property: 'Creado el', value: this.ou.createdAt },
];