1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +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:
Shane Melton
2023-06-14 13:09:56 -07:00
committed by GitHub
parent a7f9984ddd
commit ed04907300
9 changed files with 217 additions and 215 deletions

View File

@@ -56,7 +56,7 @@ import { CollectionView } from "@bitwarden/common/vault/models/view/collection.v
import { Icons } from "@bitwarden/components";
import { GroupService, GroupView } from "../../admin-console/organizations/core";
import { EntityEventsComponent } from "../../admin-console/organizations/manage/entity-events.component";
import { openEntityEventsDialog } from "../../admin-console/organizations/manage/entity-events.component";
import { VaultFilterService } from "../../vault/individual-vault/vault-filter/services/abstractions/vault-filter.service";
import { VaultFilter } from "../../vault/individual-vault/vault-filter/shared/models/vault-filter.model";
import {
@@ -109,8 +109,6 @@ export class VaultComponent implements OnInit, OnDestroy {
cipherAddEditModalRef: ViewContainerRef;
@ViewChild("collectionsModal", { read: ViewContainerRef, static: true })
collectionsModalRef: ViewContainerRef;
@ViewChild("eventsTemplate", { read: ViewContainerRef, static: true })
eventsModalRef: ViewContainerRef;
trashCleanupWarning: string = null;
activeFilter: VaultFilter = new VaultFilter();
@@ -885,12 +883,14 @@ export class VaultComponent implements OnInit, OnDestroy {
}
async viewEvents(cipher: CipherView) {
await this.modalService.openViewRef(EntityEventsComponent, this.eventsModalRef, (comp) => {
comp.name = cipher.name;
comp.organizationId = this.organization.id;
comp.entityId = cipher.id;
comp.showUser = true;
comp.entity = "cipher";
await openEntityEventsDialog(this.dialogService, {
data: {
name: cipher.name,
organizationId: this.organization.id,
entityId: cipher.id,
showUser: true,
entity: "cipher",
},
});
}