54 lines
2.5 KiB
HTML
54 lines
2.5 KiB
HTML
<div>
|
|
<div *ngIf="error" class="uk-alert uk-alert-danger uk-flex uk-flex-top">
|
|
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span>
|
|
<div>
|
|
{{error}}
|
|
</div>
|
|
</div>
|
|
<div class="uk-grid" uk-grid>
|
|
<div class="uk-width-expand">
|
|
<ul class="uk-subnav uk-subnav-pill">
|
|
<li [class.uk-active]="showManagers" (click)="showManagers = true">
|
|
<a>Managers</a>
|
|
</li>
|
|
<li [class.uk-active]="!showManagers" (click)="showManagers = false">
|
|
<a>Pending Managers</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="uk-width-1-5 uk-flex uk-flex-right">
|
|
<button class="uk-button uk-button-primary" (click)="openInviteModal()">Invite Manager</button>
|
|
</div>
|
|
</div>
|
|
<div *ngIf="loadManagers || loadPending" class="uk-margin-large-top">
|
|
<loading></loading>
|
|
</div>
|
|
<div *ngIf="!loadManagers && !loadPending" class="uk-margin-medium-top">
|
|
<div *ngIf="(showManagers && managers.length == 0) || (!showManagers && pending.length == 0)"
|
|
class="uk-card uk-card-default uk-padding uk-card-body uk-text-center">
|
|
<div *ngIf="showManagers">No managers for {{name}}</div>
|
|
<div *ngIf="!showManagers">No pending manager invitations for {{name}}</div>
|
|
</div>
|
|
<div *ngIf="(showManagers && managers.length > 0) || (!showManagers && pending.length > 0)"
|
|
class="uk-overflow-auto uk-height-max-large uk-padding-small">
|
|
<div class="uk-card uk-card-default uk-card-body" *ngFor="let item of (showManagers)?managers:pending">
|
|
<div class="uk-grid uk-grid-divider uk-flex uk-flex-middle" uk-grid>
|
|
<div class="uk-width-3-4">Email: {{(showManagers) ? item.email : item}}</div>
|
|
<div *ngIf="properties.environment === 'development'" class="uk-width-expand uk-text-center">
|
|
<a (click)="openDeleteModal(item)" class="uk-icon-button remove uk-button-danger"
|
|
uk-icon="icon: close; ratio: 1" title="Remove"></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<modal-alert #inviteManagerModal (alertOutput)="inviteManager()" [okDisabled]="invited && invited.invalid">
|
|
<div *ngIf="invited" class="uk-padding uk-text-center">
|
|
<span class="uk-text-bold">Email: </span>
|
|
<input class="uk-input space uk-width-medium" [class.uk-form-danger]="invited.invalid" [formControl]="invited">
|
|
</div>
|
|
</modal-alert>
|
|
<modal-alert #deleteManagerModal (alertOutput)="deleteManager()"></modal-alert>
|
|
<modal-alert #deletePendingModal (alertOutput)="deletePendingManager()"></modal-alert>
|