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:
parent
698151baf3
commit
67419df015
@ -38,7 +38,7 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
||||
}
|
||||
}
|
||||
|
||||
private sUsername = null;
|
||||
private sUser: any = null;
|
||||
|
||||
private _bottomSheet = inject(MatBottomSheet);
|
||||
|
||||
@ -49,9 +49,9 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
||||
this.refreshService.removeAll()
|
||||
this.refreshService.add(() => {
|
||||
this.userTable.fetchData();
|
||||
if (this.sUsername != null) {
|
||||
this.groupTable.fetchDataByUsername(this.sUsername);
|
||||
this.moduleTable.fetchDataByUsername(this.sUsername)
|
||||
if (this.sUser?.username != null) {
|
||||
this.groupTable.fetchDataByUsername(this.sUser.username);
|
||||
this.moduleTable.fetchDataByUsername(this.sUser.username)
|
||||
}
|
||||
});
|
||||
|
||||
@ -65,14 +65,13 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
||||
@ViewChild("moduleTable") moduleTable!: ModuleTableComponent;
|
||||
|
||||
usersOnSelectedRows = (rows: GuiSelectedRow[]) => {
|
||||
if (rows.length > 0) {
|
||||
this.sUsername = rows[0].source.username;
|
||||
|
||||
if (this.sUsername != null) {
|
||||
this.groupTable.fetchDataByUsername(this.sUsername);
|
||||
this.moduleTable.fetchDataByUsername(this.sUsername)
|
||||
this.openUpdateSheet(rows[0].source);
|
||||
}
|
||||
if (rows.length == 1) {
|
||||
this.sUser = 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user