|
36 | 36 | dataKey="groupId">
|
37 | 37 | <ng-template pTemplate="header">
|
38 | 38 | <tr>
|
39 |
| - <th *ngFor="let col of allColumns" |
40 |
| - id="col" |
41 |
| - [pSortableColumn]="col.field" |
42 |
| - [ngStyle]="{'width': col.width}"> |
43 |
| - {{col.header}} |
44 |
| - <ng-container *ngIf="col.field === 'benchmarkId'"> |
45 |
| - <p-columnFilter [type]="'multi'" |
46 |
| - [field]="col.field" |
47 |
| - [showOperator]="false" |
48 |
| - [showMatchModes]="false" |
49 |
| - showAddButton="false" |
50 |
| - showClearButton="false" |
51 |
| - showApplyButton="false" |
52 |
| - [matchMode]="'in'" |
53 |
| - display="menu"> |
54 |
| - <ng-template pTemplate="filter" let-value let-filter="filterCallback"> |
55 |
| - <p-multiSelect [(ngModel)]="selectedBenchmarkIds" |
56 |
| - [options]="col.filterOptions" |
57 |
| - placeholder="Select Benchmarks" |
58 |
| - [showClear]="true" |
59 |
| - (onChange)="onBenchmarkFilterChange($event, filter)" |
60 |
| - (onClear)="onBenchmarkFilterClear($event, filter)" |
61 |
| - styleClass="w-full" |
62 |
| - [maxSelectedLabels]="1" |
63 |
| - [showToggleAll]="true" |
64 |
| - optionLabel="label" |
65 |
| - optionValue="value" |
66 |
| - selectedItemsLabel="{0} benchmarks selected"> |
67 |
| - </p-multiSelect> |
68 |
| - </ng-template> |
69 |
| - </p-columnFilter> |
70 |
| - </ng-container> |
71 |
| - <ng-container *ngIf="col.field === 'poam'"> |
72 |
| - <p-columnFilter [field]="col.filterField" |
73 |
| - type="multi" |
74 |
| - matchMode="in" |
75 |
| - [showOperator]="false" |
76 |
| - [showMatchModes]="false" |
77 |
| - [showAddButton]="false" |
78 |
| - [showButtons]="true" |
79 |
| - display="menu"> |
80 |
| - <ng-template pTemplate="filter" let-value let-filter="filterCallback"> |
81 |
| - <p-multiSelect [ngModel]="value" |
82 |
| - [options]="col.filterOptions" |
83 |
| - (onChange)="filter($event.value)" |
84 |
| - placeholder="Select Status" |
85 |
| - [showClear]="true" |
86 |
| - styleClass="w-full"> |
87 |
| - </p-multiSelect> |
88 |
| - </ng-template> |
89 |
| - </p-columnFilter> |
90 |
| - </ng-container> |
91 |
| - <p-columnFilter *ngIf="col.field !== 'poam' && col.field !== 'benchmarkId'" |
92 |
| - [type]="col.filterType" |
93 |
| - [field]="col.field" |
94 |
| - [showOperator]="false" |
95 |
| - display="menu"> |
96 |
| - </p-columnFilter> |
97 |
| - </th> |
| 39 | + <th *ngFor="let col of allColumns" |
| 40 | + id="col" |
| 41 | + [pSortableColumn]="col.field" |
| 42 | + [ngStyle]="{'width': col.width}"> |
| 43 | + {{col.header}} |
| 44 | + <ng-container *ngIf="col.field === 'benchmarkId'"> |
| 45 | + <p-columnFilter [type]="'multi'" |
| 46 | + [field]="col.field" |
| 47 | + [showOperator]="false" |
| 48 | + [showMatchModes]="false" |
| 49 | + showAddButton="false" |
| 50 | + showClearButton="false" |
| 51 | + showApplyButton="false" |
| 52 | + [matchMode]="'in'" |
| 53 | + display="menu"> |
| 54 | + <ng-template pTemplate="filter" let-value let-filter="filterCallback"> |
| 55 | + <p-multiSelect [(ngModel)]="selectedBenchmarkIds" |
| 56 | + [options]="col.filterOptions" |
| 57 | + placeholder="Select Benchmarks" |
| 58 | + [showClear]="true" |
| 59 | + (onChange)="onBenchmarkFilterChange($event, filter)" |
| 60 | + (onClear)="onBenchmarkFilterClear($event, filter)" |
| 61 | + styleClass="w-full" |
| 62 | + [maxSelectedLabels]="1" |
| 63 | + [showToggleAll]="true" |
| 64 | + optionLabel="label" |
| 65 | + optionValue="value" |
| 66 | + selectedItemsLabel="{0} benchmarks selected"> |
| 67 | + </p-multiSelect> |
| 68 | + </ng-template> |
| 69 | + </p-columnFilter> |
| 70 | + </ng-container> |
| 71 | + <ng-container *ngIf="col.field === 'poam'"> |
| 72 | + <p-columnFilter [field]="col.filterField" |
| 73 | + type="multi" |
| 74 | + matchMode="in" |
| 75 | + [showOperator]="false" |
| 76 | + [showMatchModes]="false" |
| 77 | + [showAddButton]="false" |
| 78 | + [showButtons]="true" |
| 79 | + display="menu"> |
| 80 | + <ng-template pTemplate="filter" let-value let-filter="filterCallback"> |
| 81 | + <p-multiSelect [ngModel]="value" |
| 82 | + [options]="col.filterOptions" |
| 83 | + (onChange)="filter($event.value)" |
| 84 | + placeholder="Select Status" |
| 85 | + [showClear]="true" |
| 86 | + styleClass="w-full"> |
| 87 | + </p-multiSelect> |
| 88 | + </ng-template> |
| 89 | + </p-columnFilter> |
| 90 | + </ng-container> |
| 91 | + <ng-container *ngIf="col.field === 'severity'"> |
| 92 | + <p-columnFilter type="multi" |
| 93 | + [field]="col.field" |
| 94 | + matchMode="in" |
| 95 | + [showOperator]="false" |
| 96 | + [showMatchModes]="false" |
| 97 | + [showAddButton]="false" |
| 98 | + [showButtons]="true" |
| 99 | + display="menu"> |
| 100 | + <ng-template pTemplate="filter" let-value let-filter="filterCallback"> |
| 101 | + <p-multiSelect [ngModel]="value" |
| 102 | + [options]="col.filterOptions" |
| 103 | + (onChange)="filter($event.value)" |
| 104 | + placeholder="Select Severity" |
| 105 | + [showClear]="true" |
| 106 | + styleClass="w-full"> |
| 107 | + </p-multiSelect> |
| 108 | + </ng-template> |
| 109 | + </p-columnFilter> |
| 110 | + </ng-container> |
| 111 | + <p-columnFilter *ngIf="col.field !== 'poam' && col.field !== 'benchmarkId' && col.field !== 'severity'" |
| 112 | + [type]="col.filterType" |
| 113 | + [field]="col.field" |
| 114 | + [showOperator]="false" |
| 115 | + display="menu"> |
| 116 | + </p-columnFilter> |
| 117 | + </th> |
98 | 118 | </tr>
|
99 | 119 | </ng-template>
|
100 | 120 | <ng-template pTemplate="body" let-rowData>
|
|
0 commit comments