Fix: Product ledger was not totalling. This is because for some reason, pydantic was sending the data as string when the field was nullable
59 lines
1.9 KiB
HTML
59 lines
1.9 KiB
HTML
<mat-card>
|
|
<mat-card-header>
|
|
<mat-card-title-group>
|
|
<mat-card-title>Users</mat-card-title>
|
|
<a mat-button [routerLink]="['/users', 'new']">
|
|
<mat-icon>add_box</mat-icon>
|
|
Add
|
|
</a>
|
|
</mat-card-title-group>
|
|
</mat-card-header>
|
|
<mat-card-content>
|
|
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
|
<!-- Name Column -->
|
|
<ng-container matColumnDef="name">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
|
|
<mat-cell *matCellDef="let row"
|
|
><a [routerLink]="['/users', row.id]">{{ row.name }}</a></mat-cell
|
|
>
|
|
</ng-container>
|
|
|
|
<!-- Locked Out Column -->
|
|
<ng-container matColumnDef="lockedOut">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Is Locked Out?</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">{{ row.lockedOut }}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Roles Column -->
|
|
<ng-container matColumnDef="roles">
|
|
<mat-header-cell *matHeaderCellDef>Roles</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">
|
|
<ul>
|
|
<li *ngFor="let role of row.roles">{{ role }}</li>
|
|
</ul>
|
|
</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Last Login Column -->
|
|
<ng-container matColumnDef="last">
|
|
<mat-header-cell *matHeaderCellDef>Last Login</mat-header-cell>
|
|
<mat-cell *matCellDef="let row"
|
|
>{{ row.lastDevice }} @ {{ row.lastDate ? (row.lastDate | localTime) : 'Never' }}</mat-cell
|
|
>
|
|
</ng-container>
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
|
</mat-table>
|
|
|
|
<mat-paginator
|
|
#paginator
|
|
[length]="dataSource.data.length"
|
|
[pageIndex]="0"
|
|
[pageSize]="50"
|
|
[pageSizeOptions]="[25, 50, 100, 250]"
|
|
>
|
|
</mat-paginator>
|
|
</mat-card-content>
|
|
</mat-card>
|