1
0
mirror of https://github.com/bitwarden/web synced 2025-12-10 05:13:40 +00:00

generic event log component for user/ciphers

This commit is contained in:
Kyle Spearrin
2018-07-11 15:22:55 -04:00
parent 6d225beb46
commit 98d3b42728
8 changed files with 89 additions and 16 deletions

View File

@@ -26,8 +26,8 @@ import { OrganizationUserType } from 'jslib/enums/organizationUserType';
import { Utils } from 'jslib/misc/utils';
import { ModalComponent } from '../../modal.component';
import { EntityEventsComponent } from './entity-events.component';
import { UserAddEditComponent } from './user-add-edit.component';
import { UserEventsComponent } from './user-events.component';
import { UserGroupsComponent } from './user-groups.component';
@Component({
@@ -174,12 +174,14 @@ export class PeopleComponent implements OnInit {
const factory = this.componentFactoryResolver.resolveComponentFactory(ModalComponent);
this.modal = this.eventsModalRef.createComponent(factory).instance;
const childComponent = this.modal.show<UserEventsComponent>(
UserEventsComponent, this.eventsModalRef);
const childComponent = this.modal.show<EntityEventsComponent>(
EntityEventsComponent, this.eventsModalRef);
childComponent.name = user != null ? user.name || user.email : null;
childComponent.name = user.name || user.email;
childComponent.organizationId = this.organizationId;
childComponent.organizationUserId = user != null ? user.id : null;
childComponent.entityId = user.id;
childComponent.showUser = false;
childComponent.entity = 'user';
this.modal.onClosed.subscribe(() => {
this.modal = null;