2022-07-13 19:25:19 +02:00
|
|
|
<div page-content>
|
2021-01-21 16:15:53 +01:00
|
|
|
<div header>
|
|
|
|
<ng-content></ng-content>
|
2022-06-28 20:13:40 +02:00
|
|
|
</div>
|
2022-07-13 19:25:19 +02:00
|
|
|
<div actions>
|
2023-03-09 15:07:39 +01:00
|
|
|
<div class="uk-section-xsmall uk-margin-top">
|
2022-07-13 19:25:19 +02:00
|
|
|
<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>
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-07-13 19:25:19 +02:00
|
|
|
</div>
|
|
|
|
<div inner>
|
2022-06-30 17:22:35 +02:00
|
|
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
|
|
|
<div *ngIf="loading" class="uk-position-center">
|
|
|
|
<loading></loading>
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
2022-06-30 17:22:35 +02:00
|
|
|
<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>
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-30 17:22:35 +02:00
|
|
|
<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>
|
2022-06-28 20:13:40 +02:00
|
|
|
</div>
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-01 18:32:21 +01:00
|
|
|
<modal-alert *ngIf="user" #inviteModal (alertOutput)="subscriberInvite.invite()" [okDisabled]="!subscriberInvite.valid"
|
2022-06-21 12:41:44 +02:00
|
|
|
[large]="true" classTitle="uk-background-primary uk-light">
|
2021-01-21 16:15:53 +01:00
|
|
|
<subscriber-invite #subscriberInvite [user]="user"></subscriber-invite>
|
|
|
|
</modal-alert>
|
2022-06-21 12:41:44 +02:00
|
|
|
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="deleteSubscriber()" classTitle="uk-background-primary uk-light">
|
2022-06-20 15:17:26 +02:00
|
|
|
<div *ngIf="selectedUser">
|
2022-06-28 20:13:40 +02:00
|
|
|
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from members?
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
|
|
|
</modal-alert>
|
2022-06-21 12:41:44 +02:00
|
|
|
<modal-alert #createRoleModal (alertOutput)="createGroup()" classTitle="uk-background-primary uk-light"
|
|
|
|
[okDisabled]="roleFb && roleFb.invalid">
|
2022-06-28 20:13:40 +02:00
|
|
|
<div *ngIf="roleFb">
|
2021-01-21 16:15:53 +01:00
|
|
|
<div class="uk-grid" uk-grid [formGroup]="roleFb">
|
2022-06-28 20:13:40 +02:00
|
|
|
<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>
|
2021-01-21 16:15:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</modal-alert>
|