mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[PM-2049] Update entity events dialog (#5417)
* [AC-1145] Update entity-events.component.ts to a CL dialog - Add EntityEventsDialogParams - Add static helper method to open the dialog with the dialog service - Update existing usages of the entity-events.component.ts * [AC-1145] Update entity-events.component.ts to use CL components and form actions - Use bit-table and TableDataSource - Update to reactive form for date filter - Make dialog component standalone - Use bitAction in-place of component promises - Remove redundant try/catch that is now handled by bitAction and bitSubmit - Add new try/catch on first load to catch any errors during initial dialog open * [PM-2049] Make dataSource and filterFormGroup protected * [PM-2049] Remove bit-form-field container Remove the bit-form-field tags that wrapped the date inputs to avoid additional styling that is not applicable to inline form elements. Add back the missing `-` that was removed by mistake. * [PM-2049] Remove entity events dialog component selector
This commit is contained in:
@@ -21,7 +21,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||
import { EntityEventsComponent } from "@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component";
|
||||
import { openEntityEventsDialog } from "@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component";
|
||||
import { BulkStatusComponent } from "@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component";
|
||||
import { BasePeopleComponent } from "@bitwarden/web-vault/app/common/base.people.component";
|
||||
|
||||
@@ -41,8 +41,6 @@ export class PeopleComponent
|
||||
@ViewChild("addEdit", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef;
|
||||
@ViewChild("groupsTemplate", { read: ViewContainerRef, static: true })
|
||||
groupsModalRef: ViewContainerRef;
|
||||
@ViewChild("eventsTemplate", { read: ViewContainerRef, static: true })
|
||||
eventsModalRef: ViewContainerRef;
|
||||
@ViewChild("bulkStatusTemplate", { read: ViewContainerRef, static: true })
|
||||
bulkStatusModalRef: ViewContainerRef;
|
||||
@ViewChild("bulkConfirmTemplate", { read: ViewContainerRef, static: true })
|
||||
@@ -167,12 +165,14 @@ export class PeopleComponent
|
||||
}
|
||||
|
||||
async events(user: ProviderUserUserDetailsResponse) {
|
||||
await this.modalService.openViewRef(EntityEventsComponent, this.eventsModalRef, (comp) => {
|
||||
comp.name = this.userNamePipe.transform(user);
|
||||
comp.providerId = this.providerId;
|
||||
comp.entityId = user.id;
|
||||
comp.showUser = false;
|
||||
comp.entity = "user";
|
||||
await openEntityEventsDialog(this.dialogService, {
|
||||
data: {
|
||||
name: this.userNamePipe.transform(user),
|
||||
providerId: this.providerId,
|
||||
entityId: user.id,
|
||||
showUser: false,
|
||||
entity: "user",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user