90 lines
4.6 KiB
HTML
90 lines
4.6 KiB
HTML
<div page-content>
|
|
<div header>
|
|
<ng-content></ng-content>
|
|
</div>
|
|
<div actions>
|
|
<div class="uk-section-xsmall">
|
|
<div class="uk-grid uk-flex-right@m uk-flex-center uk-flex-middle" uk-grid>
|
|
<div search-input [searchControl]="filterForm.get('keyword')" placeholder="Search members"
|
|
[expandable]="true" [disabled]="loading || !subscriberInvite || subscriberInvite.loading" searchInputClass="outer" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">
|
|
</div>
|
|
<div>
|
|
<button *ngIf="exists" class="uk-button uk-button-default uk-flex uk-flex-middle"
|
|
[attr.uk-tooltip]="inviteDisableMessage" [class.uk-disabled]="loading || !subscriberInvite || subscriberInvite.loading"
|
|
[disabled]="loading || !subscriberInvite || subscriberInvite.loading || !!inviteDisableMessage" (click)="openInviteModal()">
|
|
<icon name="person_add" [flex]="true" type="filled"></icon>
|
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Invite to join</span>
|
|
</button>
|
|
<button *ngIf="!exists && isPortalAdmin" class="uk-button uk-button-default uk-flex uk-flex-middle"
|
|
(click)="openCreateRoleModal()">
|
|
<icon name="person_add" [flex]="true" type="filled"></icon>
|
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Create Group</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div inner>
|
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
|
<div *ngIf="loading" class="uk-position-center">
|
|
<loading></loading>
|
|
</div>
|
|
<div *ngIf="!loading">
|
|
<div *ngIf="showSubscribers.length == 0"
|
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
|
<div>No members found</div>
|
|
</div>
|
|
<div *ngIf="showSubscribers.length > 0">
|
|
<no-load-paging [type]="(subscribers.length > 1)?'members':'member'"
|
|
(pageChange)="updatePage($event)"
|
|
[page]="page" [pageSize]="pageSize"
|
|
[totalResults]="showSubscribers.length">
|
|
</no-load-paging>
|
|
<div class="uk-grid uk-grid-large uk-child-width-1-1@s uk-child-width-1-2@m uk-margin-top uk-margin-bottom" uk-grid>
|
|
<div *ngFor="let item of currentPage">
|
|
<div class="uk-card uk-card-default">
|
|
<div class="uk-card-body">
|
|
<span class="uk-text-bold uk-text-large">{{item.email}}</span>
|
|
</div>
|
|
<div class="uk-card-footer uk-flex uk-flex-right">
|
|
<button (click)="openDeleteModal(item)" class="uk-button uk-button-link uk-flex uk-flex-middle"
|
|
[disabled]="item.isManager" [attr.uk-tooltip]="item.isManager?'This user is a manager and cannot be removed.':null">
|
|
<icon name="delete" [flex]="true" type="filled"></icon>
|
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">{{'Delete'}}</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small-top">
|
|
<paging-no-load [currentPage]="page" customClasses="uk-flex-right@m uk-flex-center"
|
|
[totalResults]="subscribers.length" [size]="pageSize"
|
|
(pageChange)="updatePage($event)">
|
|
</paging-no-load>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<modal-alert *ngIf="user" #inviteModal (alertOutput)="subscriberInvite.invite()" [okDisabled]="!subscriberInvite.valid"
|
|
[large]="true" classTitle="uk-background-primary uk-light">
|
|
<subscriber-invite #subscriberInvite [user]="user"></subscriber-invite>
|
|
</modal-alert>
|
|
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="deleteSubscriber()" classTitle="uk-background-primary uk-light">
|
|
<div *ngIf="selectedUser">
|
|
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from members?
|
|
</div>
|
|
</modal-alert>
|
|
<modal-alert #createRoleModal (alertOutput)="createGroup()" classTitle="uk-background-primary uk-light"
|
|
[okDisabled]="roleFb && roleFb.invalid">
|
|
<div *ngIf="roleFb">
|
|
<div class="uk-grid" uk-grid [formGroup]="roleFb">
|
|
<div input [formInput]="roleFb.get('name')"
|
|
placeholder="Name" class="uk-width-1-1"></div>
|
|
<div input [formInput]="roleFb.get('description')" type="textarea"
|
|
placeholder="Description" class="uk-width-1-1"></div>
|
|
</div>
|
|
</div>
|
|
</modal-alert>
|