diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/group/group.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/group/group.component.ts index eedf4fd..a7e4db8 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/group/group.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/group/group.component.ts @@ -33,15 +33,15 @@ export class GroupComponent extends BasePageComponent implements AfterViewInit { } } - private sGroupId = null; + private sGroup: Group | null = null; ngAfterViewInit(): void { this.buttonVisibilityService.setVisibleOnly(this.refreshService, this.creationService, this.updateService) this.refreshService.removeAll() this.refreshService.add(() => { this.groupTable.fetchData(); - if (this.sGroupId) - this.userTable.fetchDataByGroupId(this.sGroupId); + if (this.sGroup) + this.userTable.fetchDataByGroupId(this.sGroup.id!); }); this.creationService.component = GroupFormComponent @@ -53,9 +53,12 @@ export class GroupComponent extends BasePageComponent implements AfterViewInit { groupsOnSelectedRows = (rows: GuiSelectedRow[]) => { if (rows.length > 0) { - this.sGroupId = rows[0].source.id; - if (this.sGroupId) - this.userTable.fetchDataByGroupId(this.sGroupId); + this.sGroup = rows[0].source; + if (this.sGroup) + this.userTable.fetchDataByGroupId(this.sGroup.id!); + } + else if (rows.length == 0 && this.sGroup?.name != null) { + this.openUpdateSheet(this.sGroup); } } @@ -95,4 +98,12 @@ export class GroupComponent extends BasePageComponent implements AfterViewInit { get complete_group_cols() { return env.columnNames.group.complete } + + openUpdateSheet(user: Group): void { +/* this.dialog.open(UserUpdateFormComponent, { + width: "50rem", + data: user + }); */ + alert(JSON.stringify(user)) + } } \ No newline at end of file diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user/user.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user/user.component.ts index 8d45c8c..ed950e8 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user/user.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/user/user.component.ts @@ -40,8 +40,6 @@ export class UserComponent extends BasePageComponent implements AfterViewInit { private sUser: any = null; - private _bottomSheet = inject(MatBottomSheet); - private readonly dialog: MatDialog = inject(MatDialog); ngAfterViewInit(): void {