Groups type fix organizational units
parent
67177c4237
commit
844fd23bb4
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -12,6 +12,7 @@ export interface UnidadOrganizativa {
|
|||
id: number;
|
||||
nombre: string;
|
||||
uuid: string;
|
||||
type: string;
|
||||
aulas: Aula[];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue