|
1 | | -<div class="loading-shade" *ngIf="isLoadingResults"> |
| 1 | +<div *ngIf="isLoadingResults" class="loading-shade"> |
2 | 2 | <mat-spinner *ngIf="isLoadingResults"></mat-spinner> |
3 | 3 | </div> |
4 | 4 | <div *ngIf="errorMessage" class="error-messages p-3 m-2"> |
|
8 | 8 | <div class="table-container"> |
9 | 9 | <div class="table-container"> |
10 | 10 | <table |
11 | | - mat-table |
| 11 | + (matSortChange)="announceSortChange($event)" |
12 | 12 | [dataSource]="data" |
13 | 13 | class="mat-elevation-z0" |
| 14 | + mat-table |
14 | 15 | matSort |
15 | 16 | matSortActive="name" |
16 | | - matSortDisableClear |
17 | 17 | matSortDirection="asc" |
18 | | - (matSortChange)="announceSortChange($event)" |
| 18 | + matSortDisableClear |
19 | 19 | > |
20 | 20 | <ng-container matColumnDef="statusCheck"> |
21 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 21 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
22 | 22 | <div [ngClass]="this.sort.active === 'statusCheck' ? 'column-title-color' : 'column-title-color-inactive'"> |
23 | 23 | {{ "APPLICATION-TABLE.STATUS" | translate }} |
24 | 24 | </div> |
25 | | - <app-table-sort-icon [sortDirection]="getSortDirection('statusCheck')" /> |
| 25 | + <app-table-sort-icon [sortDirection]="getSortDirection('statusCheck')"/> |
26 | 26 | </th> |
27 | | - <td mat-cell *matCellDef="let application"> |
28 | | - <app-status-icon [iconType]="application.statusCheck" /> |
| 27 | + <td *matCellDef="let application" mat-cell> |
| 28 | + <app-status-icon [iconType]="application.statusCheck"/> |
29 | 29 | </td> |
30 | 30 | </ng-container> |
31 | 31 |
|
32 | 32 | <ng-container matColumnDef="status"> |
33 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 33 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
34 | 34 | <div [ngClass]="this.sort.active === 'status' ? 'column-title-color' : 'column-title-color-inactive'"> |
35 | 35 | {{ "APPLICATION-TABLE.STATE" | translate }} |
36 | 36 | </div> |
37 | | - <app-table-sort-icon [sortDirection]="getSortDirection('status')" /> |
| 37 | + <app-table-sort-icon [sortDirection]="getSortDirection('status')"/> |
38 | 38 | </th> |
39 | | - <td mat-cell *matCellDef="let application"> |
| 39 | + <td *matCellDef="let application" mat-cell> |
40 | 40 | <div class="options-container"> |
41 | 41 | <app-option-field |
42 | 42 | [title]="'APPLICATION.STATUS.' + application.status | translate" |
|
47 | 47 | </ng-container> |
48 | 48 |
|
49 | 49 | <ng-container matColumnDef="name"> |
50 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 50 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
51 | 51 | <div [ngClass]="this.sort.active === 'name' ? 'column-title-color' : 'column-title-color-inactive'"> |
52 | 52 | {{ "APPLICATION-TABLE.NAME" | translate }} |
53 | 53 | </div> |
54 | | - <app-table-sort-icon [sortDirection]="getSortDirection('name')" /> |
| 54 | + <app-table-sort-icon [sortDirection]="getSortDirection('name')"/> |
55 | 55 | </th> |
56 | | - <td mat-cell *matCellDef="let element" class="name-and-description"> |
| 56 | + <td *matCellDef="let element" class="name-and-description" mat-cell> |
57 | 57 | <div class="name-and-description"> |
58 | 58 | <div class="application-name"> |
59 | 59 | {{ element.name }} |
|
66 | 66 | </ng-container> |
67 | 67 |
|
68 | 68 | <ng-container matColumnDef="data"> |
69 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 69 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
70 | 70 | <div [ngClass]="this.sort.active === 'data' ? 'column-title-color' : 'column-title-color-inactive'"> |
71 | 71 | {{ "APPLICATION-TABLE.CONTROLLED-PROPERTIES" | translate }} |
72 | 72 | </div> |
73 | | - <app-table-sort-icon [sortDirection]="getSortDirection('data')" /> |
| 73 | + <app-table-sort-icon [sortDirection]="getSortDirection('data')"/> |
74 | 74 | </th> |
75 | | - <td mat-cell *matCellDef="let application"> |
| 75 | + <td *matCellDef="let application" mat-cell> |
76 | 76 | <div class="options-container"> |
77 | 77 | @for (property of application.controlledProperties; track $index) { |
78 | | - <app-option-field [title]="property.type" /> |
| 78 | + <app-option-field [title]="property.type"/> |
79 | 79 | } |
80 | 80 | </div> |
81 | 81 | </td> |
82 | 82 | </ng-container> |
83 | 83 |
|
84 | 84 | <ng-container matColumnDef="devices"> |
85 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 85 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
86 | 86 | <div [ngClass]="this.sort.active === 'devices' ? 'column-title-color' : 'column-title-color-inactive'"> |
87 | 87 | {{ "APPLICATION-TABLE.IOT-DEVICES" | translate }} |
88 | 88 | </div> |
89 | | - <app-table-sort-icon [sortDirection]="getSortDirection('devices')" /> |
| 89 | + <app-table-sort-icon [sortDirection]="getSortDirection('devices')"/> |
90 | 90 | </th> |
91 | | - <td mat-cell *matCellDef="let element"> |
| 91 | + <td *matCellDef="let element" mat-cell> |
92 | 92 | {{ element?.iotDevices?.length ?? 0 }} |
93 | 93 | </td> |
94 | 94 | </ng-container> |
95 | 95 |
|
96 | 96 | <ng-container matColumnDef="owner"> |
97 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 97 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
98 | 98 | <div [ngClass]="this.sort.active === 'owner' ? 'column-title-color' : 'column-title-color-inactive'"> |
99 | 99 | {{ "APPLICATION-TABLE.OWNER" | translate }} |
100 | 100 | </div> |
101 | | - <app-table-sort-icon [sortDirection]="getSortDirection('owner')" /> |
| 101 | + <app-table-sort-icon [sortDirection]="getSortDirection('owner')"/> |
102 | 102 | </th> |
103 | | - <td mat-cell *matCellDef="let application"> |
| 103 | + <td *matCellDef="let application" mat-cell> |
104 | 104 | {{ application.owner ?? "-" }} |
105 | 105 | </td> |
106 | 106 | </ng-container> |
107 | 107 |
|
108 | 108 | <!-- Not default columns --> |
109 | 109 |
|
110 | 110 | <ng-container matColumnDef="contactPerson"> |
111 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 111 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
112 | 112 | <div [ngClass]="this.sort.active === 'contactPerson' ? 'column-title-color' : 'column-title-color-inactive'"> |
113 | 113 | {{ "APPLICATION-TABLE.CONTACT-PERSON" | translate }} |
114 | 114 | </div> |
115 | | - <app-table-sort-icon [sortDirection]="getSortDirection('contactPerson')" /> |
| 115 | + <app-table-sort-icon [sortDirection]="getSortDirection('contactPerson')"/> |
116 | 116 | </th> |
117 | | - <td mat-cell *matCellDef="let application"> |
| 117 | + <td *matCellDef="let application" mat-cell> |
118 | 118 | {{ application.contactPerson ?? "-" }} |
119 | 119 | </td> |
120 | 120 | </ng-container> |
121 | 121 |
|
122 | 122 | <ng-container matColumnDef="dataTargets"> |
123 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 123 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
124 | 124 | <div [ngClass]="this.sort.active === 'dataTargets' ? 'column-title-color' : 'column-title-color-inactive'"> |
125 | 125 | {{ "APPLICATION-TABLE.DATA-TARGETS" | translate }} |
126 | 126 | </div> |
127 | | - <app-table-sort-icon [sortDirection]="getSortDirection('dataTargets')" /> |
| 127 | + <app-table-sort-icon [sortDirection]="getSortDirection('dataTargets')"/> |
128 | 128 | </th> |
129 | | - <td mat-cell *matCellDef="let application"> |
| 129 | + <td *matCellDef="let application" mat-cell> |
130 | 130 | {{ application?.dataTargets?.length ?? 0 }} |
131 | 131 | </td> |
132 | 132 | </ng-container> |
133 | 133 |
|
134 | 134 | <ng-container matColumnDef="openDataDkEnabled"> |
135 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 135 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
136 | 136 | <div |
137 | 137 | [ngClass]="this.sort.active === 'openDataDkEnabled' ? 'column-title-color' : 'column-title-color-inactive'" |
138 | 138 | > |
139 | 139 | {{ "APPLICATION-TABLE.OPEN-DATA-DK" | translate }} |
140 | 140 | </div> |
141 | | - <app-table-sort-icon [sortDirection]="getSortDirection('openDataDkEnabled')" /> |
| 141 | + <app-table-sort-icon [sortDirection]="getSortDirection('openDataDkEnabled')"/> |
142 | 142 | </th> |
143 | | - <td mat-cell *matCellDef="let application"> |
| 143 | + <td *matCellDef="let application" mat-cell> |
144 | 144 | {{ isOpenDataDK(application.dataTargets) | yesNo }} |
145 | 145 | </td> |
146 | 146 | </ng-container> |
147 | 147 |
|
148 | 148 | <ng-container matColumnDef="personalData"> |
149 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 149 | + <th *matHeaderCellDef mat-header-cell mat-sort-header> |
150 | 150 | <div [ngClass]="this.sort.active === 'personalData' ? 'column-title-color' : 'column-title-color-inactive'"> |
151 | 151 | {{ "APPLICATION-TABLE.PERSONAL-DATA" | translate }} |
152 | 152 | </div> |
153 | | - <app-table-sort-icon [sortDirection]="getSortDirection('personalData')" /> |
| 153 | + <app-table-sort-icon [sortDirection]="getSortDirection('personalData')"/> |
154 | 154 | </th> |
155 | | - <td mat-cell *matCellDef="let application"> |
| 155 | + <td *matCellDef="let application" mat-cell> |
156 | 156 | <fa-icon *ngIf="application.personalData" [icon]="faFlagIcon" class="flag-icon"></fa-icon> |
157 | 157 | {{ !application.personalData ? "-" : "" }} |
158 | 158 | </td> |
159 | 159 | </ng-container> |
160 | 160 |
|
161 | 161 | <ng-container matColumnDef="startDate"> |
162 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header class="col-1"> |
| 162 | + <th *matHeaderCellDef class="col-1" mat-header-cell mat-sort-header> |
163 | 163 | <div [ngClass]="this.sort.active === 'startDate' ? 'column-title-color' : 'column-title-color-inactive'"> |
164 | 164 | {{ "APPLICATION-TABLE.START-DATE" | translate }} |
165 | 165 | </div> |
166 | | - <app-table-sort-icon [sortDirection]="getSortDirection('startDate')" /> |
| 166 | + <app-table-sort-icon [sortDirection]="getSortDirection('startDate')"/> |
167 | 167 | </th> |
168 | | - <td mat-cell *matCellDef="let application"> |
| 168 | + <td *matCellDef="let application" mat-cell> |
169 | 169 | {{ (application.startDate | dateOnly) ?? "-" }} |
170 | 170 | </td> |
171 | 171 | </ng-container> |
172 | 172 |
|
173 | 173 | <ng-container matColumnDef="endDate"> |
174 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header class="col-1"> |
| 174 | + <th *matHeaderCellDef class="col-1" mat-header-cell mat-sort-header> |
175 | 175 | <div [ngClass]="this.sort.active === 'endDate' ? 'column-title-color' : 'column-title-color-inactive'"> |
176 | 176 | {{ "APPLICATION-TABLE.END-DATE" | translate }} |
177 | 177 | </div> |
178 | | - <app-table-sort-icon [sortDirection]="getSortDirection('endDate')" /> |
| 178 | + <app-table-sort-icon [sortDirection]="getSortDirection('endDate')"/> |
179 | 179 | </th> |
180 | | - <td mat-cell *matCellDef="let application"> |
| 180 | + <td *matCellDef="let application" mat-cell> |
181 | 181 | {{ (application.endDate | dateOnly) ?? "-" }} |
182 | 182 | </td> |
183 | 183 | </ng-container> |
184 | 184 |
|
185 | 185 | <ng-container matColumnDef="category"> |
186 | | - <th mat-header-cell *matHeaderCellDef class="col-1"> |
| 186 | + <th *matHeaderCellDef class="col-1" mat-header-cell> |
187 | 187 | <div [ngClass]="this.sort.active === 'category' ? 'column-title-color' : 'column-title-color-inactive'"> |
188 | 188 | {{ "APPLICATION-TABLE.CATEGORY" | translate }} |
189 | 189 | </div> |
190 | | - <app-table-sort-icon [sortDirection]="getSortDirection('category')" /> |
| 190 | + <app-table-sort-icon [sortDirection]="getSortDirection('category')"/> |
191 | 191 | </th> |
192 | | - <td mat-cell *matCellDef="let application"> |
| 192 | + <td *matCellDef="let application" mat-cell> |
193 | 193 | {{ application.category ?? "-" }} |
194 | 194 | </td> |
195 | 195 | </ng-container> |
196 | 196 |
|
197 | 197 | <ng-container matColumnDef="deviceTypes"> |
198 | | - <th mat-header-cell *matHeaderCellDef class="col-1"> |
| 198 | + <th *matHeaderCellDef class="col-1" mat-header-cell> |
199 | 199 | <div [ngClass]="this.sort.active === 'deviceTypes' ? 'column-title-color' : 'column-title-color-inactive'"> |
200 | 200 | {{ "APPLICATION-TABLE.DEVICE-TYPES" | translate }} |
201 | 201 | </div> |
202 | | - <app-table-sort-icon [sortDirection]="getSortDirection('deviceTypes')" /> |
| 202 | + <app-table-sort-icon [sortDirection]="getSortDirection('deviceTypes')"/> |
203 | 203 | </th> |
204 | | - <td mat-cell *matCellDef="let application"> |
| 204 | + <td *matCellDef="let application" mat-cell> |
205 | 205 | {{ mapDeviceTypes(application.deviceTypes) ?? "-" }} |
206 | 206 | </td> |
207 | 207 | </ng-container> |
208 | 208 |
|
209 | 209 | <ng-container matColumnDef="menu"> |
210 | | - <th mat-header-cell *matHeaderCellDef class="col-1"></th> |
| 210 | + <th *matHeaderCellDef class="col-1" mat-header-cell></th> |
211 | 211 |
|
212 | | - <td mat-cell *matCellDef="let element"> |
213 | | - <div class="dropdown" *ngIf="element?.id | canEditApplication"> |
| 212 | + <td *matCellDef="let element" mat-cell> |
| 213 | + <div *ngIf="element?.id | canEditApplication" class="dropdown"> |
214 | 214 | <a |
215 | | - href="#" |
216 | | - role="button" |
217 | | - id="tableRowDropdown-{{ element.id }}" |
| 215 | + [attr.aria-label]="'APPLICATION-TABLE-ROW.SHOW-OPTIONS' | translate" |
| 216 | + aria-expanded="false" |
218 | 217 | class="applicationRow__edit dropdown-toggle" |
219 | 218 | data-toggle="dropdown" |
220 | | - aria-expanded="false" |
221 | | - [attr.aria-label]="'APPLICATION-TABLE-ROW.SHOW-OPTIONS' | translate" |
| 219 | + href="#" |
| 220 | + id="tableRowDropdown-{{ element.id }}" |
| 221 | + role="button" |
222 | 222 | ></a> |
223 | | - <ul class="dropdown-menu dropdown-menu--table" attr.aria-labelledby="tableRowDropdown-{{ element.id }}"> |
| 223 | + <ul attr.aria-labelledby="tableRowDropdown-{{ element.id }}" class="dropdown-menu dropdown-menu--table"> |
224 | 224 | <li class="dropdown-item"> |
225 | 225 | <a (click)="navigateToEditPage(element.id)" routerLinkActive="active">{{ |
226 | | - "APPLICATION-TABLE-ROW.EDIT" | translate |
227 | | - }}</a> |
| 226 | + "APPLICATION-TABLE-ROW.EDIT" | translate |
| 227 | + }}</a> |
228 | 228 | </li> |
229 | 229 | <li class="dropdown-item"> |
230 | 230 | <a (click)="onOpenChangeOrganizationDialog(element.id)" routerLinkActive="active">{{ |
231 | | - "APPLICATION.CHANGE-ORGANIZATION.TITLE" | translate |
232 | | - }}</a> |
| 231 | + "APPLICATION.CHANGE-ORGANIZATION.TITLE" | translate |
| 232 | + }}</a> |
233 | 233 | </li> |
234 | 234 | <li class="dropdown-item"> |
235 | 235 | <a (click)="deleteApplication(element.id)" [routerLink]="[]">{{ |
236 | | - "APPLICATION-TABLE-ROW.DELETE" | translate |
237 | | - }}</a> |
| 236 | + "APPLICATION-TABLE-ROW.DELETE" | translate |
| 237 | + }}</a> |
238 | 238 | </li> |
239 | 239 | </ul> |
240 | 240 | </div> |
241 | 241 | </td> |
242 | 242 | </ng-container> |
243 | 243 |
|
244 | | - <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
245 | | - <tr mat-row *matRowDef="let row; columns: displayedColumns" [routerLink]="['/applications', row.id]"></tr> |
| 244 | + <tr *matHeaderRowDef="displayedColumns" mat-header-row></tr> |
| 245 | + <tr *matRowDef="let row; columns: displayedColumns" [routerLink]="['/applications', row.id]" |
| 246 | + class="table-row-pointer" |
| 247 | + mat-row></tr> |
246 | 248 | </table> |
247 | | - <mat-paginator class="paginator" [length]="resultsLength" [pageSizeOptions]="pageSizeOptions"> </mat-paginator> |
| 249 | + <mat-paginator [length]="resultsLength" [pageSizeOptions]="pageSizeOptions" class="paginator"></mat-paginator> |
248 | 250 | </div> |
249 | 251 | <div class="tool-container"> |
250 | 252 | <app-column-selector |
|
255 | 257 | </div> |
256 | 258 | </div> |
257 | 259 | <div> |
258 | | - <app-table-paginator [paginator]="paginator" /> |
| 260 | + <app-table-paginator [paginator]="paginator"/> |
259 | 261 | </div> |
0 commit comments