2020-11-03 19:25:03 +01:00
|
|
|
<div page-content>
|
|
|
|
<div header>
|
|
|
|
<ng-content></ng-content>
|
|
|
|
<div class="uk-grid uk-flex uk-flex-middle" uk-grid>
|
|
|
|
<div class="uk-width-expand uk-flex uk-flex-left@m uk-flex-center">
|
|
|
|
<ul class="uk-subnav uk-subnav-pill">
|
|
|
|
<li [class.uk-active]="showActive" (click)="showActive = true">
|
2020-11-04 10:09:18 +01:00
|
|
|
<a class="uk-text-capitalize">{{role}}s</a>
|
2020-11-03 19:25:03 +01:00
|
|
|
</li>
|
|
|
|
<li [class.uk-active]="!showActive" (click)="showActive = false">
|
|
|
|
<a>Pending {{role}}s</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2021-01-21 16:15:53 +01:00
|
|
|
<div [class.uk-invisible]="loadActive || loadPending"
|
|
|
|
class="uk-width-1-5@l uk-width-1-3@m uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center">
|
2020-11-03 19:25:03 +01:00
|
|
|
<a *ngIf="exists" class="uk-text-uppercase uk-flex uk-flex-middle" (click)="openInviteModal()">
|
|
|
|
<button class="uk-icon-button large uk-button-secondary">
|
|
|
|
<icon name="person_add"></icon>
|
|
|
|
</button>
|
|
|
|
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Invite {{role}}</button>
|
|
|
|
</a>
|
2021-01-21 16:15:53 +01:00
|
|
|
<a *ngIf="!exists && isPortalAdmin" class="uk-text-uppercase uk-flex uk-flex-middle"
|
|
|
|
(click)="openCreateRoleModal()">
|
2020-11-03 19:25:03 +01:00
|
|
|
<button class="uk-icon-button large uk-button-secondary">
|
|
|
|
<icon name="person_add"></icon>
|
|
|
|
</button>
|
|
|
|
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Create Group</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div inner>
|
|
|
|
<div *ngIf="loadActive || loadPending" class="uk-margin-large-top">
|
|
|
|
<loading></loading>
|
|
|
|
</div>
|
2021-01-21 16:15:53 +01:00
|
|
|
<div *ngIf="!loadActive && !loadPending">
|
2020-11-03 19:25:03 +01:00
|
|
|
<div *ngIf="(showActive && active.length == 0) || (!showActive && pending.length == 0)"
|
|
|
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
|
|
|
<div *ngIf="showActive">No {{role}}s for {{name}}</div>
|
|
|
|
<div *ngIf="!showActive">No pending {{role}} invitations for {{name}}</div>
|
|
|
|
</div>
|
2021-01-15 11:47:57 +01:00
|
|
|
<div *ngIf="(showActive && active.length > 0) || (!showActive && pending.length > 0)">
|
2020-11-03 19:25:03 +01:00
|
|
|
<div class="uk-card uk-card-default uk-card-body uk-text-small uk-margin-bottom"
|
|
|
|
*ngFor="let item of (showActive)?active:pending">
|
|
|
|
<div class="uk-grid uk-grid-divider uk-flex uk-flex-middle" uk-grid>
|
|
|
|
<div class="uk-width-3-4@l uk-width-1-2@m">
|
|
|
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
|
|
|
<span class="uk-text-muted">Email: </span>
|
|
|
|
<span class="uk-text-bold">{{(showActive) ? item.email : item}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-17 15:37:28 +01:00
|
|
|
<div *ngIf="isCurator || !showActive" class="uk-width-expand">
|
2020-11-03 19:25:03 +01:00
|
|
|
<div class="uk-padding-small uk-padding-remove-horizontal uk-flex uk-flex-center">
|
|
|
|
<a (click)="openDeleteModal(item)" class="uk-button action uk-flex uk-flex-middle">
|
|
|
|
<icon name="remove_circle_outline" ratio="0.7" [flex]="true"></icon>
|
|
|
|
<span class="uk-margin-small-left">{{showActive ? ('Remove ' + role) : 'Cancel invitation'}}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<modal-alert #inviteModal (alertOutput)="invite()" [okDisabled]="invited && invited.invalid">
|
2020-11-19 18:13:27 +01:00
|
|
|
<div class="uk-padding uk-padding-remove-horizontal">
|
2021-01-15 11:47:57 +01:00
|
|
|
<div *ngIf="message" class="uk-margin-medium-bottom uk-text-small">
|
|
|
|
<div [innerHTML]="message | safeHtml"></div>
|
2020-11-19 18:13:27 +01:00
|
|
|
</div>
|
|
|
|
<div *ngIf="invited" class="uk-text-center">
|
|
|
|
<div dashboard-input [formInput]="invited"
|
|
|
|
placeholder="Write an email..."></div>
|
|
|
|
</div>
|
2020-11-03 19:25:03 +01:00
|
|
|
</div>
|
|
|
|
</modal-alert>
|
|
|
|
<modal-alert #deleteModal (alertOutput)="deleteActive()">
|
|
|
|
<div *ngIf="selectedUser" class="uk-padding-small uk-padding-remove-horizontal">
|
|
|
|
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from {{role}}s?
|
|
|
|
</div>
|
|
|
|
</modal-alert>
|
|
|
|
<modal-alert #deletePendingModal (alertOutput)="deletePending()">
|
|
|
|
<div *ngIf="selectedUser" class="uk-padding-small uk-padding-remove-horizontal">
|
|
|
|
Are you sure you want to cancel {{role}} invitation of <span class="uk-text-bold">{{selectedUser}}</span>?
|
|
|
|
</div>
|
|
|
|
</modal-alert>
|
|
|
|
<modal-alert #createRoleModal (alertOutput)="createGroup()" [okDisabled]="roleFb && roleFb.invalid">
|
|
|
|
<div *ngIf="roleFb" class="uk-padding uk-padding-remove-horizontal">
|
|
|
|
<div class="uk-grid" uk-grid [formGroup]="roleFb">
|
|
|
|
<div dashboard-input [formInput]="roleFb.get('name')"
|
|
|
|
label="Name"
|
|
|
|
placeholder="Write a name..." class="uk-width-1-1"></div>
|
|
|
|
<div dashboard-input [formInput]="roleFb.get('description')"
|
|
|
|
label="Description"
|
|
|
|
type="textarea"
|
|
|
|
placeholder="Write a description..." class="uk-width-1-1"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</modal-alert>
|