1
|
<ng-container *ngIf="role; else noRole">
|
2
|
<h4 class="p-text-center">
|
3
|
Role: {{role.name}}
|
4
|
</h4>
|
5
|
<label>
|
6
|
<strong>{{(!role.readOnly ? 'NOTIFYENABLE' : '') | translate}}</strong>
|
7
|
</label>
|
8
|
<p-toolbar styleClass="p-mb-4">
|
9
|
<ng-template pTemplate="left">
|
10
|
<p-button label="{{(isSelectedAll ? 'DISELECT-ALL' : 'SELECT-ALL') | translate}}"
|
11
|
(onClick)="checkAllCheckBoxes()"
|
12
|
[disabled]="rightsIsDisabled()"
|
13
|
styleClass="p-button-primary">
|
14
|
</p-button>
|
15
|
</ng-template>
|
16
|
<ng-template pTemplate="right">
|
17
|
<p-button label="{{'UPDATE-RIGHTS' | translate}}"
|
18
|
(onClick)="updateRights()"
|
19
|
[disabled]="rightsIsDisabled()"
|
20
|
styleClass="p-button-primary">
|
21
|
</p-button>
|
22
|
</ng-template>
|
23
|
</p-toolbar>
|
24
|
<div class="p-grid p-nogutter p-mt-3">
|
25
|
<div class="p-col-12">
|
26
|
<p-accordion>
|
27
|
<p-accordionTab *ngFor="let category of filterCategories(categories)"
|
28
|
header="{{category.name}}">
|
29
|
<div *ngFor="let right of filterRights(category.rights)"
|
30
|
class="p-field-checkbox">
|
31
|
<p-checkbox name="group2"
|
32
|
value="right.id"
|
33
|
[value]="right.id"
|
34
|
[(ngModel)]="selectedValues"
|
35
|
[disabled]="rightsIsDisabled()">
|
36
|
</p-checkbox>
|
37
|
<label class="p-mr-0">{{right.name}}</label>
|
38
|
</div>
|
39
|
</p-accordionTab>
|
40
|
</p-accordion>
|
41
|
</div>
|
42
|
</div>
|
43
|
</ng-container>
|
44
|
|
45
|
<ng-template #noRole>
|
46
|
<p-card>
|
47
|
<h4 class="p-text-center">
|
48
|
No role selected
|
49
|
</h4>
|
50
|
</p-card>
|
51
|
</ng-template>
|