feat: RefreshService zur Benutzertabelle in der Groups-Komponente hinzugefügt und integriert
This commit is contained in:
parent
4f4b9711c7
commit
21ab7b5f32
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user