Groups type fix organizational units
parent
67177c4237
commit
844fd23bb4
|
@ -9,13 +9,16 @@
|
||||||
<mat-card-title>Unidad organizativa</mat-card-title>
|
<mat-card-title>Unidad organizativa</mat-card-title>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-list role="list">
|
<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}">
|
[ngClass]="{'selected-item': unidad === selectedUnidad, 'clickable-item': true}">
|
||||||
<span>
|
<span (click)="onSelectUnidad(unidad)">
|
||||||
<mat-icon>apartment</mat-icon>
|
<mat-icon>apartment</mat-icon>
|
||||||
{{ unidad.nombre }}
|
{{ unidad.nombre }}
|
||||||
</span>
|
</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-item>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
|
@ -40,10 +40,8 @@ export class GroupsComponent implements OnInit {
|
||||||
loadChildrenAndClients(uuid: string): void {
|
loadChildrenAndClients(uuid: string): void {
|
||||||
this.dataService.getChildren(uuid).subscribe(
|
this.dataService.getChildren(uuid).subscribe(
|
||||||
childrenData => {
|
childrenData => {
|
||||||
console.log('Children data:', childrenData); // Depuración
|
|
||||||
this.dataService.getClients(uuid).subscribe(
|
this.dataService.getClients(uuid).subscribe(
|
||||||
clientsData => {
|
clientsData => {
|
||||||
console.log('Clients data:', clientsData); // Depuración
|
|
||||||
const newChildren = [...childrenData, ...clientsData];
|
const newChildren = [...childrenData, ...clientsData];
|
||||||
if (newChildren.length > 0) {
|
if (newChildren.length > 0) {
|
||||||
this.children = newChildren;
|
this.children = newChildren;
|
||||||
|
|
|
@ -12,6 +12,7 @@ export interface UnidadOrganizativa {
|
||||||
id: number;
|
id: number;
|
||||||
nombre: string;
|
nombre: string;
|
||||||
uuid: string;
|
uuid: string;
|
||||||
|
type: string;
|
||||||
aulas: Aula[];
|
aulas: Aula[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue