From 260580237a79cc69f777e472cf3c0af919e4317a Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Tue, 20 Dec 2022 10:16:45 -0500 Subject: [PATCH] [EC-424] top level vault (#4267) * [EC-424] remove cog menu and header hr * [EC-424] change "Add item" to "New item" * [EC-424] include text for "New item" * [EC-424] add new item dropdown to org vault - add parent collection to dialog params * [EC-14] show Add Item if missing permissions --- .../collection-dialog.component.ts | 3 + .../organizations/vault/vault.component.html | 46 +++-- .../organizations/vault/vault.component.ts | 23 ++- .../src/app/shared/loose-components.module.ts | 3 - .../src/app/vault/bulk-actions.component.html | 50 ------ .../src/app/vault/bulk-actions.component.ts | 162 ------------------ apps/web/src/app/vault/vault.component.html | 12 +- apps/web/src/locales/en/messages.json | 11 ++ 8 files changed, 75 insertions(+), 235 deletions(-) delete mode 100644 apps/web/src/app/vault/bulk-actions.component.html delete mode 100644 apps/web/src/app/vault/bulk-actions.component.ts diff --git a/apps/web/src/app/organizations/shared/components/collection-dialog/collection-dialog.component.ts b/apps/web/src/app/organizations/shared/components/collection-dialog/collection-dialog.component.ts index 149ca269f9f..d48b5931cd0 100644 --- a/apps/web/src/app/organizations/shared/components/collection-dialog/collection-dialog.component.ts +++ b/apps/web/src/app/organizations/shared/components/collection-dialog/collection-dialog.component.ts @@ -36,6 +36,7 @@ export interface CollectionDialogParams { collectionId?: string; organizationId: string; initialTab?: CollectionDialogTabType; + parentCollectionId?: string; } export enum CollectionDialogResult { @@ -133,6 +134,8 @@ export class CollectionDialogComponent implements OnInit, OnDestroy { }); } else { this.nestOptions = collections; + const parent = collections.find((c) => c.id === this.params.parentCollectionId); + this.formGroup.patchValue({ parent: parent?.name ?? null }); } this.loading = false; diff --git a/apps/web/src/app/organizations/vault/vault.component.html b/apps/web/src/app/organizations/vault/vault.component.html index bc63b5b9187..9445a254f2c 100644 --- a/apps/web/src/app/organizations/vault/vault.component.html +++ b/apps/web/src/app/organizations/vault/vault.component.html @@ -16,7 +16,7 @@
-
-