Groups type fix organizational units

pull/4/head
Alvaro Puente Mella 2024-06-21 12:41:26 +02:00
parent 67177c4237
commit 844fd23bb4
3 changed files with 7 additions and 5 deletions

View File

@ -9,13 +9,16 @@
<mat-card-title>Unidad organizativa</mat-card-title>
<mat-card-content>
<mat-list role="list">
<mat-list-item *ngFor="let unidad of unidadesOrganizativas" (click)="onSelectUnidad(unidad)"
<mat-list-item *ngFor="let unidad of unidadesOrganizativas"
[ngClass]="{'selected-item': unidad === selectedUnidad, 'clickable-item': true}">
<span>
<span (click)="onSelectUnidad(unidad)">
<mat-icon>apartment</mat-icon>
{{ unidad.nombre }}
</span>
<span class="actions">
<mat-icon class="edit-icon" (click)="onEditClick(unidad.type, unidad.uuid)">edit</mat-icon>
<mat-icon class="delete-icon" (click)="onDeleteClick(unidad.uuid)">delete</mat-icon>
</span>
</mat-list-item>
</mat-list>
</mat-card-content>

View File

@ -40,10 +40,8 @@ export class GroupsComponent implements OnInit {
loadChildrenAndClients(uuid: string): void {
this.dataService.getChildren(uuid).subscribe(
childrenData => {
console.log('Children data:', childrenData); // Depuración
this.dataService.getClients(uuid).subscribe(
clientsData => {
console.log('Clients data:', clientsData); // Depuración
const newChildren = [...childrenData, ...clientsData];
if (newChildren.length > 0) {
this.children = newChildren;

View File

@ -12,6 +12,7 @@ export interface UnidadOrganizativa {
id: number;
nombre: string;
uuid: string;
type: string;
aulas: Aula[];
}