76 lines
4.1 KiB
HTML
76 lines
4.1 KiB
HTML
<div page-content>
|
|
<div header>
|
|
<users-tabs tab="notifications"></users-tabs>
|
|
</div>
|
|
<div inner>
|
|
<form>
|
|
<div class="uk-card-header">
|
|
<div class=" uk-margin-small-top uk-margin-small-bottom">
|
|
<button class="uk-float-right uk-button uk-margin-left uk-button-secondary " [disabled]="!hasChanged || showLoading"
|
|
(click)="updateUserNotifications()">Save
|
|
</button>
|
|
<button class=" uk-float-right uk-button uk-button-secondary outlined" [disabled]="!hasChanged || showLoading"
|
|
(click)="resetForm()">Reset
|
|
</button>
|
|
<div>Notifications settings</div>
|
|
</div>
|
|
</div>
|
|
<div class="uk-card uk-card-default uk-position-relative" style="min-height: 60vh">
|
|
<div *ngIf="communityId && userNotifications && notifications && !showLoading" style="max-height: 60vh"
|
|
class="uk-overflow-auto uk-padding uk-padding-remove-bottom">
|
|
<!--<div class="uk-alert uk-alert-primary uk-flex-center" role="alert">Notification settings are related to your
|
|
personal
|
|
account.
|
|
</div>-->
|
|
<h5 class="uk-text-bold uk-margin-medium-bottom">Manage Notifications</h5>
|
|
<div class="uk-width-large uk-margin-bottom">
|
|
<div class="uk-margin uk-grid" >
|
|
<div class="uk-width-expand" title="Get e-mail notification when there are changes in the managers list of your community">
|
|
Notifications for manager list changes <span>{{userNotifications.notifyForNewManagers ? '(Enabled)' : '(Disabled)'}}</span></div>
|
|
<mat-slide-toggle [checked]="userNotifications.notifyForNewManagers"
|
|
(change)="($event.source.checked = userNotifications.notifyForNewManagers);changeValueForNewManagers(userNotifications.notifyForNewManagers)">
|
|
</mat-slide-toggle>
|
|
</div>
|
|
<div class="uk-margin uk-grid">
|
|
<div class="uk-width-expand" title="Get e-mail notification when a user subscribes in your community">Notifications for new
|
|
subscribers <span>{{userNotifications.notifyForNewSubscribers ? '(Enabled)' : '(Disabled)'}}</span></div>
|
|
<mat-slide-toggle [checked]="userNotifications.notifyForNewSubscribers"
|
|
(change)="($event.source.checked = userNotifications.notifyForNewSubscribers);changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)">
|
|
</mat-slide-toggle>
|
|
</div>
|
|
<hr class="uk-margin-medium">
|
|
<div *ngFor="let notification of notifications; let i=index">
|
|
<div class="uk-margin uk-grid">
|
|
<div class="uk-width-expand"
|
|
title="Get e-mail notification when users create new links related your community">Notify for
|
|
links
|
|
<span>{{notification.notify ? '(Enabled)' : '(Disabled)'}}</span></div>
|
|
<mat-slide-toggle [checked]="notification.notify"
|
|
(change)="($event.source.checked = notification.notify);changeNotify(notification, !notification.notify, i)">
|
|
</mat-slide-toggle>
|
|
</div>
|
|
<div *ngIf="notification.notify" [class]="notification.notify ? 'uk-margin' :
|
|
'uk-margin cursor-not-allowed'">
|
|
<div class="input-box">
|
|
<mat-form-field class="uk-width-1-1">
|
|
<mat-select #select class="" [(ngModel)]="notification.frequency"
|
|
(ngModelChange)="changeFrequency()"
|
|
name="select_frequency" [disableOptionCentering]="true">
|
|
<mat-option *ngFor=" let fr of frequencyOptions let i = index"
|
|
[value]="fr.value">{{fr.label}}</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div *ngIf="showLoading" class="uk-position-center">
|
|
<loading></loading>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|