Project

General

Profile

« Previous | Next » 

Revision 53198

Added by Sofia Baltzi over 5 years ago

Add manage user notification form's functionality, services and userNotificationsRights class

View differences:

manage-user-notification.component.html
1 1
<div id="manage-user-notification " class=" uk-card uk-card-default uk-padding">
2 2
    <div class="uk-text-large uk-text-center uk-width-5-6@l uk-width">Manage User Notification</div>
3
</div>
3
</div>
4

  
5
    <!-- TODO error messages and loading -->
6
    <!-- <table *ngIf="communityId != null && community != null && !showLoading && !errorMessage" class="uk-table uk-align-center"> -->
7
    <table  class="uk-table uk-width-1-2 uk-align-center">
8
        <tbody>
9
            <div *ngIf="userNotifications">
10
                <tr>
11
                    <td>
12
                        <p>Notify for new managers:</p>
13
                    </td>
14
                    <td>
15
                        <div data-uk-button-group>
16
                            <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button uk-button-primary uk-button-small"
17
                                     data-uk-button>ON</button>
18
                            <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button-default uk-button-small"
19
                                    (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>ON</button>
20
                            <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button uk-button-danger uk-button-small"
21
                                     data-uk-button>OFF</button>
22
                            <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button-default uk-button-small"
23
                                    (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>OFF</button>
24
                        </div>
25
                        <!-- <select class="form-control uk-select uk-width-small" id="notifyForNewManagers"
26
                            [(ngModel)] = "userNotifications.notifyForNewManagers" (input)="change()">
27
                            <option value="true">ON</option>
28
                            <option value="false">OFF</option>
29
                        </select> -->
30
                    </td>
31
                </tr>
32
                <tr>
33
                    <td>
34
                        <p>Notify for new subscribers:</p>
35
                    </td>
36
                    <td>
37
                        <div data-uk-button-group>
38
                            <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button uk-button-primary uk-button-small"
39
                                     data-uk-button disabled>ON</button>
40
                            <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button-default uk-button-small"
41
                                    (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>ON</button>
42
                            <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button uk-button-danger uk-button-small"
43
                                     data-uk-button>OFF</button>
44
                            <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button-default uk-button-small"
45
                                    (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>OFF</button>
46
                        </div>
47
                        <!-- <select class="form-control uk-select uk-width-small" id="notifyForNewSubscribers"
48
                            [(ngModel)] = "userNotifications.notifyForNewSubscribers" (input)="change()">
49
                            <option value="true">ON</option>
50
                            <option value="false">OFF</option>
51
                        </select> -->
52
                    </td>
53
                </tr>
54
                    <!-- <td>
55
                        <span class = "uk-align-right">
56
                            <button *ngIf="hasChanged" class="uk-button uk-button-primary" (click)="updateUserNotifications()">Save</button>
57
                            <button *ngIf="!hasChanged" class="uk-button uk-button-default" disabled>Save</button>
58
                        </span>
59
                    </td>
60
                    <td>
61
                        <span class = "uk-align-left">
62
                            <button class="uk-button" (click)="resetForm(communityId)">Reset</button>
63
                        </span>
64
                    </td> -->
65
            </div>
66
        </tbody>
67
    </table>
68
    <div class = "uk-grid-margin uk-first-column uk-align-center uk-width-1-3">
69
        <button *ngIf="hasChanged" class="uk-button uk-button-primary" (click)="updateUserNotifications()">Save</button>
70
        <button *ngIf="!hasChanged" class="uk-button uk-button-default" disabled>Save</button>
71
        <button class="uk-button" (click)="resetForm(communityId)">Reset</button>
72
    </div>

Also available in: Unified diff