role-access.component.html
2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<mat-expansion-panel>
<mat-expansion-panel-header [expandedHeight]="expandedHeight" [collapsedHeight]="collapsedHeight">
<mat-panel-title>Select Role</mat-panel-title>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
</ng-template>
<mat-form-field>
<mat-select placeholder="Role">
<mat-option>--</mat-option>
<mat-option value="SUPERADMIN">Super Admin</mat-option>
<mat-option value="ADMIN">Admin</mat-option>
<mat-option value="MARKETING">Marketing</mat-option>
<mat-option value="DEVELOPER">Developer</mat-option>
<mat-option value="QA">QA</mat-option>
<mat-option value="CS">CS</mat-option>
</mat-select>
</mat-form-field>
<button mat-raised-button color="primary">Search</button>
</mat-expansion-panel>
<br>
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex="100" fxFlex.gt-sm="100" fxFlex.sm="100">
<div class="mat-box-shadow">
<ngx-datatable class="material bg-white" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="0"
[rowHeight]="50" [scrollbarV]="true" [scrollbarH]="true" [rows]="roleAccessDataSource">
<ngx-datatable-column name="Menu">
<ng-template let-row="row" ngx-datatable-cell-template>
<mat-checkbox (change)="current_item = row.id; triggerCheckBoxEventrow($event, 1)">{{ row?.menu }}
</mat-checkbox>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Child Menu">
<ng-template let-row="row" ngx-datatable-cell-template>
<mat-checkbox [disabled]="row.isDisabled < 2" (change)="current_item = row.id; triggerCheckBoxEventrow($event, 2)">{{ row?.childMenu}}</mat-checkbox>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Status">
<ng-template let-row="row" ngx-datatable-cell-template>
<mat-checkbox [disabled]="row.isDisabled < 3"></mat-checkbox>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Operation">
<ng-template let-row="row" ngx-datatable-cell-template>
<mat-checkbox [disabled]="row.isDisabled < 3" >{{ row?.operation}}</mat-checkbox>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Action">
<ng-template let-row="row" ngx-datatable-cell-template>
<mat-checkbox [disabled]="row.isDisabled < 3">{{ row?.action }}</mat-checkbox>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
</div>