diff --git a/src/app/layouts/organization-layout.component.html b/src/app/layouts/organization-layout.component.html index 2ef8b04aac..a4f2017377 100644 --- a/src/app/layouts/organization-layout.component.html +++ b/src/app/layouts/organization-layout.component.html @@ -21,6 +21,12 @@ {{'manage' | i18n}} +
{{'noOrganizationsList' | i18n}}
- + {{'newOrganization' | i18n}} diff --git a/src/app/vault/organizations.component.ts b/src/app/vault/organizations.component.ts index acf7a6cf4b..8c8cb81034 100644 --- a/src/app/vault/organizations.component.ts +++ b/src/app/vault/organizations.component.ts @@ -1,7 +1,6 @@ import { Component, - EventEmitter, - Output, + OnInit, } from '@angular/core'; import { UserService } from 'jslib/abstractions/user.service'; @@ -12,12 +11,16 @@ import { Organization } from 'jslib/models/domain/organization'; selector: 'app-vault-organizations', templateUrl: 'organizations.component.html', }) -export class OrganizationsComponent { +export class OrganizationsComponent implements OnInit { organizations: Organization[]; loaded: boolean = false; constructor(private userService: UserService) { } + async ngOnInit() { + await this.load(); + } + async load() { this.organizations = await this.userService.getAllOrganizations(); this.loaded = true; diff --git a/src/app/vault/vault.component.ts b/src/app/vault/vault.component.ts index 2e8c954276..105a052053 100644 --- a/src/app/vault/vault.component.ts +++ b/src/app/vault/vault.component.ts @@ -24,7 +24,6 @@ import { CiphersComponent } from './ciphers.component'; import { CollectionsComponent } from './collections.component'; import { FolderAddEditComponent } from './folder-add-edit.component'; import { GroupingsComponent } from './groupings.component'; -import { OrganizationsComponent } from './organizations.component'; import { ShareComponent } from './share.component'; import { I18nService } from 'jslib/abstractions/i18n.service'; @@ -39,7 +38,6 @@ import { BulkShareComponent } from './bulk-share.component'; export class VaultComponent implements OnInit { @ViewChild(GroupingsComponent) groupingsComponent: GroupingsComponent; @ViewChild(CiphersComponent) ciphersComponent: CiphersComponent; - @ViewChild(OrganizationsComponent) organizationsComponent: OrganizationsComponent; @ViewChild('attachments', { read: ViewContainerRef }) attachmentsModalRef: ViewContainerRef; @ViewChild('folderAddEdit', { read: ViewContainerRef }) folderAddEditModalRef: ViewContainerRef; @ViewChild('cipherAddEdit', { read: ViewContainerRef }) cipherAddEditModalRef: ViewContainerRef; @@ -66,7 +64,6 @@ export class VaultComponent implements OnInit { await this.syncService.fullSync(false); await Promise.all([ this.groupingsComponent.load(), - this.organizationsComponent.load(), ]); if (params == null) {