wire up search and view events query params
This commit is contained in:
parent
98d3b42728
commit
6dd21fe9e9
|
@ -48,6 +48,9 @@ export class CollectionsComponent implements OnInit {
|
|||
this.route.parent.parent.params.subscribe(async (params) => {
|
||||
this.organizationId = params.organizationId;
|
||||
await this.load();
|
||||
this.route.queryParams.subscribe(async (qParams) => {
|
||||
this.searchText = qParams.search;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,9 @@ export class GroupsComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
await this.load();
|
||||
this.route.queryParams.subscribe(async (qParams) => {
|
||||
this.searchText = qParams.search;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,16 @@ export class PeopleComponent implements OnInit {
|
|||
this.accessEvents = organization.useEvents;
|
||||
this.accessGroups = organization.useGroups;
|
||||
await this.load();
|
||||
|
||||
this.route.queryParams.subscribe(async (qParams) => {
|
||||
this.searchText = qParams.search;
|
||||
if (qParams.viewEvents != null) {
|
||||
const user = this.users.filter((u) => u.id === qParams.viewEvents);
|
||||
if (user.length > 0) {
|
||||
this.events(user[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -67,9 +67,7 @@ export class VaultComponent implements OnInit {
|
|||
if (qParams == null) {
|
||||
this.groupingsComponent.selectedAll = true;
|
||||
await this.ciphersComponent.load();
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (qParams.type) {
|
||||
const t = parseInt(qParams.type, null);
|
||||
this.groupingsComponent.selectedType = t;
|
||||
|
@ -81,6 +79,15 @@ export class VaultComponent implements OnInit {
|
|||
this.groupingsComponent.selectedAll = true;
|
||||
await this.ciphersComponent.load();
|
||||
}
|
||||
}
|
||||
|
||||
this.ciphersComponent.searchText = this.groupingsComponent.searchText = qParams.search;
|
||||
if (qParams.viewEvents != null) {
|
||||
const cipher = this.ciphersComponent.ciphers.filter((c) => c.id === qParams.viewEvents);
|
||||
if (cipher.length > 0) {
|
||||
this.viewEvents(cipher[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -205,7 +205,8 @@ export class EventService {
|
|||
private formatOrgUserId(ev: EventResponse) {
|
||||
const shortId = this.getShortId(ev.organizationUserId);
|
||||
const a = this.makeAnchor(shortId);
|
||||
a.setAttribute('href', '#/organizations/' + ev.organizationId + '/manage/people?search=' + shortId);
|
||||
a.setAttribute('href', '#/organizations/' + ev.organizationId + '/manage/people?search=' + shortId +
|
||||
'&viewEvents=' + ev.organizationUserId);
|
||||
return a.outerHTML;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue