2022-04-28 12:35:02 +02:00
|
|
|
<div class="org-context-card" cdkTrapFocus>
|
2021-12-10 16:14:24 +01:00
|
|
|
<div class="spinner-w">
|
|
|
|
<mat-spinner diameter="20" *ngIf="orgLoading$ | async" color="accent">
|
|
|
|
</mat-spinner>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="filter-wrapper">
|
|
|
|
<input cnslInput class="filter-input" [formControl]="filterControl" autocomplete="off"
|
|
|
|
(click)="$event.stopPropagation()" placeholder="{{'ORG.PAGES.FILTERPLACEHOLDER' | translate}}" #input>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="org-wrapper">
|
2022-04-28 12:35:02 +02:00
|
|
|
<button class="org-button-with-pin" mat-button
|
|
|
|
[ngClass]="{'active': pinnedorg.id === org?.id, 'border-bottom':pinned.selected.length && i === pinned.selected.length -1}"
|
|
|
|
[disabled]="!pinnedorg.id" *ngFor="let pinnedorg of pinned.selected; index as i"
|
|
|
|
(click)="setActiveOrg(pinnedorg)">
|
|
|
|
<div class="org-flex-row">
|
|
|
|
<span class="org-span">{{pinnedorg?.name ? pinnedorg.name : 'NO NAME'}}</span>
|
|
|
|
<template [ngTemplateOutlet]="toggleButton" [ngTemplateOutletContext]="{key: pinnedorg}"></template>
|
|
|
|
</div>
|
2021-12-10 16:14:24 +01:00
|
|
|
</button>
|
2022-04-28 12:35:02 +02:00
|
|
|
<ng-container *ngFor="let temporg of orgs$ | async">
|
|
|
|
<button *ngIf="!pinned.isSelected(temporg)" class="org-button-with-pin" mat-button
|
|
|
|
[ngClass]="{'active': temporg.id === org?.id}" [disabled]="!temporg.id" (click)="setActiveOrg(temporg)">
|
|
|
|
<div class="org-flex-row"><span class="org-span">{{temporg?.name ? temporg.name : 'NO NAME'}}</span>
|
|
|
|
<template [ngTemplateOutlet]="toggleButton" [ngTemplateOutletContext]="{key: temporg}"></template>
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
</ng-container>
|
2021-12-10 16:14:24 +01:00
|
|
|
</div>
|
|
|
|
|
2022-04-28 12:35:02 +02:00
|
|
|
<button mat-button class="show-all" [routerLink]="[ '/org/overview' ]" (click)="closedCard.emit()">{{'MENU.SHOWORGS' |
|
2021-12-10 16:14:24 +01:00
|
|
|
translate}}</button>
|
|
|
|
|
|
|
|
<ng-template cnslHasRole [hasRole]="['org.create','iam.write']">
|
2022-04-28 12:35:02 +02:00
|
|
|
<button mat-button [routerLink]="[ '/org/create' ]" (click)="closedCard.emit()">
|
2021-12-10 16:14:24 +01:00
|
|
|
<mat-icon class="avatar">add</mat-icon>
|
|
|
|
{{'MENU.NEWORG' | translate}}
|
|
|
|
</button>
|
|
|
|
</ng-template>
|
2022-04-28 12:35:02 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<ng-template #toggleButton let-key="key">
|
|
|
|
<button matTooltip="{{'ACTIONS.PIN' | translate}}" [ngClass]="{ selected: pinned.isSelected(key)}"
|
|
|
|
(click)="toggle(key,$event)" class="edit-button" mat-icon-button>
|
|
|
|
<mat-icon *ngIf="pinned.isSelected(key)" svgIcon="mdi_pin"></mat-icon>
|
|
|
|
<mat-icon svgIcon="mdi_pin_outline" *ngIf="!pinned.isSelected(key)"></mat-icon>
|
|
|
|
</button>
|
|
|
|
</ng-template>
|