From a26a1727d7ce74bdea44960acc009fdcc25ce58d Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Fri, 12 Jun 2026 10:28:34 +0200 Subject: [PATCH] =?UTF-8?q?Modificado=20comportamiento=20al=20hacer=20clic?= =?UTF-8?q?k=20en=20un=20aula,=20la=20petici=C3=B3n=20de=20mostrar=20orden?= =?UTF-8?q?adores=20y=20la=20de=20actualizar=20el=20estado=20de=20cada=20u?= =?UTF-8?q?no,=20se=20hacen=20secuencialmente=20y=20no=20en=20paralelo,=20?= =?UTF-8?q?asi=20evitamos=20el=20loader=20general=20mientras=20se=20resuel?= =?UTF-8?q?ven=20los=20estados=20de=20los=20equipos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/components/groups/groups.component.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/groups.component.ts b/ogWebconsole/src/app/components/groups/groups.component.ts index c77826e..f26cc6b 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.ts +++ b/ogWebconsole/src/app/components/groups/groups.component.ts @@ -418,11 +418,9 @@ export class GroupsComponent implements OnInit, OnDestroy { event.stopPropagation(); this.selectedNode = node; const selectedClientsBeforeEdit = this.selection.selected.map(client => client.uuid); - this.fetchClientsForNode(node, selectedClientsBeforeEdit); - - if (node.type === NodeType.Classroom || node.type === NodeType.ClientsGroup) { - this.getStatusForAllClientsInNode(node); - } + + const checkStatusAfterLoad = node.type === NodeType.Classroom || node.type === NodeType.ClientsGroup; + this.fetchClientsForNode(node, selectedClientsBeforeEdit, checkStatusAfterLoad); } onMenuClick(event: Event, node: any): void { @@ -433,7 +431,7 @@ export class GroupsComponent implements OnInit, OnDestroy { } - public fetchClientsForNode(node: any, selectedClientsBeforeEdit: string[] = []): void { + public fetchClientsForNode(node: any, selectedClientsBeforeEdit: string[] = [], checkStatusAfterLoad: boolean = false): void { const params = new HttpParams({ fromObject: this.filters }); // Agregar parámetros de ordenamiento al backend @@ -476,6 +474,10 @@ export class GroupsComponent implements OnInit, OnDestroy { members.forEach((c: Client) => c.uuid && this.syncingClientIds.add(c.uuid)); } + if (checkStatusAfterLoad) { + this.getStatusForAllClientsInNode(node); + } + // Calcular estadísticas después de cargar los clientes this.calculateLocalStats(); },