[baf4cc4] | 1 | <div class="flex flex-col gap-5">
|
---|
| 2 | <table mat-table [dataSource]="users" class="mat-elevation-z8">
|
---|
| 3 |
|
---|
| 4 | <ng-container matColumnDef="id">
|
---|
| 5 | <th mat-header-cell *matHeaderCellDef> id </th>
|
---|
| 6 | <td mat-cell *matCellDef="let element"> {{element.id}} </td>
|
---|
| 7 | </ng-container>
|
---|
| 8 |
|
---|
| 9 | <ng-container matColumnDef="name">
|
---|
| 10 | <th mat-header-cell *matHeaderCellDef> name </th>
|
---|
| 11 | <td mat-cell *matCellDef="let element"> {{element.name}} </td>
|
---|
| 12 | </ng-container>
|
---|
| 13 |
|
---|
| 14 | <!-- Weight Column -->
|
---|
| 15 | <ng-container matColumnDef="email">
|
---|
| 16 | <th mat-header-cell *matHeaderCellDef> email </th>
|
---|
| 17 | <td mat-cell *matCellDef="let element"> {{element.email}} </td>
|
---|
| 18 | </ng-container>
|
---|
| 19 |
|
---|
| 20 | <!-- Symbol Column -->
|
---|
| 21 | <ng-container matColumnDef="address">
|
---|
| 22 | <th mat-header-cell *matHeaderCellDef> address </th>
|
---|
| 23 | <td mat-cell *matCellDef="let element"> {{element.address}} </td>
|
---|
| 24 | </ng-container>
|
---|
| 25 |
|
---|
| 26 | <ng-container matColumnDef="phoneNumber">
|
---|
| 27 | <th mat-header-cell *matHeaderCellDef> address </th>
|
---|
| 28 | <td mat-cell *matCellDef="let element"> {{element.phoneNumber}} </td>
|
---|
| 29 | </ng-container>
|
---|
| 30 |
|
---|
| 31 | <ng-container matColumnDef="roles">
|
---|
| 32 | <th mat-header-cell *matHeaderCellDef> roles </th>
|
---|
| 33 | <td mat-cell *matCellDef="let element">
|
---|
| 34 | @for(role of allRoles; track $index){
|
---|
| 35 | <mat-checkbox [name]="role" [value]="role" (change)="onSelectRole(element.id, $event)" [checked]="checked(role, element.roles)" class="example-margin">{{role}}</mat-checkbox>
|
---|
| 36 | }
|
---|
| 37 | </td>
|
---|
| 38 | </ng-container>
|
---|
| 39 |
|
---|
| 40 | <ng-container matColumnDef="update">
|
---|
| 41 | <th mat-header-cell *matHeaderCellDef>Update Roles</th>
|
---|
| 42 | <td mat-cell *matCellDef="let element">
|
---|
| 43 | <button mat-flat-button (click)="updateRoles(element.id)">Update</button>
|
---|
| 44 | </td>
|
---|
| 45 | </ng-container>
|
---|
| 46 |
|
---|
| 47 | <tr mat-header-row *matHeaderRowDef="usersColumns"></tr>
|
---|
| 48 | <tr mat-row *matRowDef="let row; columns: usersColumns;"></tr>
|
---|
| 49 | </table>
|
---|
| 50 |
|
---|
| 51 | <div>
|
---|
| 52 | <app-pie-chart [dataFn]="getFinesPerLine()"></app-pie-chart>
|
---|
| 53 | </div>
|
---|
| 54 |
|
---|
| 55 | <div>
|
---|
| 56 | <app-line-chart [dataFn]="getCommutesByHour()"></app-line-chart>
|
---|
| 57 | </div>
|
---|
| 58 |
|
---|
| 59 | <div>
|
---|
| 60 | <app-income-chart [dataFn]="getTotalIncome()"></app-income-chart>
|
---|
| 61 | </div>
|
---|
| 62 |
|
---|
| 63 | </div>
|
---|