1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

pre-select org an collection on add

This commit is contained in:
Kyle Spearrin
2018-10-30 08:56:38 -04:00
parent bc5cec82cc
commit 6627d29c7c
4 changed files with 21 additions and 8 deletions

View File

@@ -43,6 +43,13 @@ export class AddEditComponent extends BaseAddEditComponent {
if (params.folderId) {
this.folderId = params.folderId;
}
if (params.collectionId) {
const collection = this.writeableCollections.filter((c) => c.id === params.collectionId);
if (collection != null && collection.length > 0) {
this.collectionIds = [collection[0].id];
this.organizationId = collection[0].organizationId;
}
}
if (params.type) {
const type = parseInt(params.type, null);
this.type = type;