2021-01-21 16:15:53 +01:00
|
|
|
<div page-content>
|
|
|
|
<div header>
|
|
|
|
<ng-content></ng-content>
|
2021-03-01 18:32:21 +01:00
|
|
|
<div [class.uk-invisible]="loading"
|
|
|
|
class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
|
2021-03-28 13:07:48 +02:00
|
|
|
<div search-input [control]="filterForm.get('keyword')" [showSearch]="false" placeholder="Search subscribers"
|
|
|
|
[bordered]="true" colorClass="uk-text-secondary">
|
|
|
|
</div>
|
2021-01-21 16:15:53 +01:00
|
|
|
<div>
|
2021-05-17 13:28:04 +02:00
|
|
|
<a *ngIf="exists" class="uk-text-uppercase uk-flex uk-flex-middle" [attr.uk-tooltip]="(inviteDisableMessage)">
|
|
|
|
<button class="uk-icon-button large uk-button-secondary" (click)="openInviteModal()"
|
|
|
|
[disabled]="!subscriberInvite || subscriberInvite.loading || !!inviteDisableMessage">
|
2021-01-21 16:15:53 +01:00
|
|
|
<icon name="person_add"></icon>
|
|
|
|
</button>
|
2021-05-17 13:28:04 +02:00
|
|
|
<button class="uk-button uk-button-link uk-margin-small-left" (click)="openInviteModal()"
|
|
|
|
[disabled]="!subscriberInvite || subscriberInvite.loading || !!inviteDisableMessage"
|
|
|
|
[class.uk-text-secondary]="subscriberInvite && !subscriberInvite.loading && !inviteDisableMessage">
|
|
|
|
Invite Subscribers
|
|
|
|
</button>
|
2021-01-21 16:15:53 +01:00
|
|
|
</a>
|
2021-03-01 18:32:21 +01:00
|
|
|
<a *ngIf="!exists && isPortalAdmin" class="uk-text-uppercase uk-flex uk-flex-middle"
|
|
|
|
(click)="openCreateRoleModal()">
|
2021-01-21 16:15:53 +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>
|
2021-03-18 15:11:41 +01:00
|
|
|
<div *ngIf="loading" class="uk-position-center">
|
2021-01-21 16:15:53 +01:00
|
|
|
<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">
|
2021-03-18 15:11:41 +01:00
|
|
|
<div>No subscribers found</div>
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
|
|
|
<div *ngIf="showSubscribers.length > 0">
|
2021-03-04 18:11:36 +01:00
|
|
|
<no-load-paging [type]="(subscribers.length > 1)?'subscribers':'subscriber'"
|
2021-01-21 16:15:53 +01:00
|
|
|
(pageChange)="updatePage($event)"
|
|
|
|
[page]="page" [pageSize]="pageSize"
|
|
|
|
[totalResults]="showSubscribers.length">
|
|
|
|
</no-load-paging>
|
2021-03-04 18:11:36 +01:00
|
|
|
<div class="uk-margin-top uk-margin-medium-bottom">
|
2021-01-21 16:15:53 +01:00
|
|
|
<div class="uk-card uk-card-default uk-card-body uk-text-small uk-margin-bottom"
|
2021-04-08 16:35:39 +02:00
|
|
|
*ngFor="let item of currentPage">
|
2021-01-21 16:15:53 +01:00
|
|
|
<div class="uk-grid uk-grid-divider uk-flex uk-flex-middle" uk-grid>
|
2021-03-01 18:32:21 +01:00
|
|
|
<div class="uk-width-expand@m uk-width-1-1">
|
2021-01-21 16:15:53 +01:00
|
|
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
|
|
|
<span class="uk-text-muted">Email: </span>
|
|
|
|
<span class="uk-text-bold">{{item.email}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-01 18:32:21 +01:00
|
|
|
<div class="uk-width-auto@m uk-width-1-1">
|
|
|
|
<div class="uk-width-1-1 uk-flex uk-flex-center">
|
|
|
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
2021-03-28 13:07:48 +02:00
|
|
|
<button (click)="openDeleteModal(item)" class="uk-button action uk-flex uk-flex-middle"
|
|
|
|
[disabled]="item.isManager"
|
|
|
|
[attr.uk-tooltip]="item.isManager?'This user is a manager and cannot be removed.':null">
|
2021-03-24 01:26:56 +01:00
|
|
|
<icon name="remove_circle_outline" [flex]="true"></icon>
|
2021-03-01 18:32:21 +01:00
|
|
|
<span class="uk-margin-small-left">Remove subscriber</span>
|
2021-03-02 11:08:19 +01:00
|
|
|
</button>
|
2021-03-01 18:32:21 +01:00
|
|
|
</div>
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<no-load-paging *ngIf="showSubscribers.length > pageSize" [type]="'subscribers'"
|
|
|
|
(pageChange)="updatePage($event)"
|
|
|
|
[page]="page" [pageSize]="pageSize"
|
|
|
|
[totalResults]="showSubscribers.length">
|
|
|
|
</no-load-paging>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-01 18:32:21 +01:00
|
|
|
<modal-alert *ngIf="user" #inviteModal (alertOutput)="subscriberInvite.invite()" [okDisabled]="!subscriberInvite.valid"
|
|
|
|
[large]="true">
|
2021-01-21 16:15:53 +01:00
|
|
|
<subscriber-invite #subscriberInvite [user]="user"></subscriber-invite>
|
|
|
|
</modal-alert>
|
2022-06-20 15:17:26 +02:00
|
|
|
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="deleteSubscriber()">
|
|
|
|
<div *ngIf="selectedUser">
|
2021-01-21 16:15:53 +01:00
|
|
|
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from subscribers?
|
|
|
|
</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>
|