mirror of
https://github.com/bitwarden/browser
synced 2026-01-06 10:33:57 +00:00
setup org module and link org listing
This commit is contained in:
@@ -4,13 +4,14 @@
|
||||
<ng-container *ngIf="loaded">
|
||||
<ul class="fa-ul card-ul carets" *ngIf="organizations && organizations.length">
|
||||
<li *ngFor="let o of organizations">
|
||||
<a href="#" class="text-body" appStopClick appBlurClick (click)="selectOrganization(o)">
|
||||
<i class="fa-li fa fa-caret-right"></i> {{o.name}}</a>
|
||||
<a [routerLink]="['/organizations', o.id]" class="text-body">
|
||||
<i class="fa-li fa fa-caret-right"></i> {{o.name}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p *ngIf="!organizations || !organizations.length">{{'noOrganizationsList' | i18n}}</p>
|
||||
</ng-container>
|
||||
<a href="#" appStopClick routerLink="/settings/create-organization" class="btn btn-block btn-outline-primary">
|
||||
<a routerLink="/settings/create-organization" class="btn btn-block btn-outline-primary">
|
||||
<i class="fa fa-plus fa-fw"></i>
|
||||
{{'newOrganization' | i18n}}
|
||||
</a>
|
||||
|
||||
@@ -13,19 +13,13 @@ import { Organization } from 'jslib/models/domain/organization';
|
||||
templateUrl: 'organizations.component.html',
|
||||
})
|
||||
export class OrganizationsComponent {
|
||||
@Output() onOrganizationClicked = new EventEmitter<Organization>();
|
||||
organizations: Organization[];
|
||||
loaded: boolean = false;
|
||||
|
||||
constructor(private userService: UserService) {
|
||||
}
|
||||
constructor(private userService: UserService) { }
|
||||
|
||||
async load() {
|
||||
this.organizations = await this.userService.getAllOrganizations();
|
||||
this.loaded = true;
|
||||
}
|
||||
|
||||
selectOrganization(o: Organization) {
|
||||
this.onOrganizationClicked.emit(o);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
Organizations
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<app-vault-organizations (onOrganizationClicked)="selectOrganization($event)">
|
||||
</app-vault-organizations>
|
||||
<app-vault-organizations></app-vault-organizations>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
import { CipherType } from 'jslib/enums/cipherType';
|
||||
|
||||
import { CipherView } from 'jslib/models/view/cipherView';
|
||||
import { FolderView } from 'jslib/models/view/folderView';
|
||||
|
||||
import { ModalComponent } from '../modal.component';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user