feat(user.component): update.component aktualisiert, um bei Doppelklick statt bei Einfachklick anzuzeigen.
- aktualisiert, um alle Daten der ausgewählten Zeile statt nur den Benutzernamen zu behalten.
This commit is contained in:
@@ -38,7 +38,7 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private sUsername = null;
|
private sUser: any = null;
|
||||||
|
|
||||||
private _bottomSheet = inject(MatBottomSheet);
|
private _bottomSheet = inject(MatBottomSheet);
|
||||||
|
|
||||||
@@ -49,9 +49,9 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
|||||||
this.refreshService.removeAll()
|
this.refreshService.removeAll()
|
||||||
this.refreshService.add(() => {
|
this.refreshService.add(() => {
|
||||||
this.userTable.fetchData();
|
this.userTable.fetchData();
|
||||||
if (this.sUsername != null) {
|
if (this.sUser?.username != null) {
|
||||||
this.groupTable.fetchDataByUsername(this.sUsername);
|
this.groupTable.fetchDataByUsername(this.sUser.username);
|
||||||
this.moduleTable.fetchDataByUsername(this.sUsername)
|
this.moduleTable.fetchDataByUsername(this.sUser.username)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -65,14 +65,13 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
|||||||
@ViewChild("moduleTable") moduleTable!: ModuleTableComponent;
|
@ViewChild("moduleTable") moduleTable!: ModuleTableComponent;
|
||||||
|
|
||||||
usersOnSelectedRows = (rows: GuiSelectedRow[]) => {
|
usersOnSelectedRows = (rows: GuiSelectedRow[]) => {
|
||||||
if (rows.length > 0) {
|
if (rows.length == 1) {
|
||||||
this.sUsername = rows[0].source.username;
|
this.sUser = rows[0].source;
|
||||||
|
|
||||||
if (this.sUsername != null) {
|
|
||||||
this.groupTable.fetchDataByUsername(this.sUsername);
|
|
||||||
this.moduleTable.fetchDataByUsername(this.sUsername)
|
|
||||||
this.openUpdateSheet(rows[0].source);
|
|
||||||
}
|
}
|
||||||
|
else if (rows.length == 0 && this.sUser?.username != null) {
|
||||||
|
this.groupTable.fetchDataByUsername(this.sUser.username);
|
||||||
|
this.moduleTable.fetchDataByUsername(this.sUser.username)
|
||||||
|
this.openUpdateSheet(this.sUser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user