From 21ab7b5f32c6602f3067dbe034f1c06aa098d51d Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Thu, 25 Jul 2024 00:44:37 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20RefreshService=20zur=20Benutzertabelle?= =?UTF-8?q?=20in=20der=20Groups-Komponente=20hinzugef=C3=BCgt=20und=20inte?= =?UTF-8?q?griert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/components/group/group.component.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/group/group.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/group/group.component.ts index 6bae132..6307176 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/group/group.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/group/group.component.ts @@ -14,13 +14,15 @@ import { GuiSelectedRow } from '@generic-ui/ngx-grid'; }) export class GroupComponent implements AfterViewInit { initWithoutData = () => { } - + private sGroupId = null; constructor(private refreshService: RefreshService) { } ngAfterViewInit(): void { this.refreshService.removeAll() this.refreshService.add(() => { this.groupTable.fetchData(); + if(this.sGroupId) + this.userTable.fetchDataByGroupId(this.sGroupId); }); } @@ -28,7 +30,10 @@ export class GroupComponent implements AfterViewInit { @ViewChild("userTable") userTable!: UserTableComponent; groupsOnSelectedRows = (rows: GuiSelectedRow[]) => { - const groupId = rows[0].source.id; - this.userTable.fetchDataByGroupId(groupId); + if(rows.length > 0){ + this.sGroupId = rows[0].source.id; + if(this.sGroupId) + this.userTable.fetchDataByGroupId(this.sGroupId); + } } }