Add staff role mapping, display role in UI, and enhance staff playtime calculations
This commit is contained in:
@@ -20,17 +20,22 @@
|
||||
|
||||
<table mat-table [dataSource]="staffPt()" class="mat-elevation-z2 full-width">
|
||||
<ng-container matColumnDef="staff_member">
|
||||
<th mat-header-cell *matHeaderCellDef> Staff Member</th>
|
||||
<th mat-header-cell *matHeaderCellDef>Staff Member</th>
|
||||
<td mat-cell *matCellDef="let row"> {{ row.staff_member }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="playtime">
|
||||
<th mat-header-cell *matHeaderCellDef> Playtime</th>
|
||||
<th mat-header-cell *matHeaderCellDef>Playtime</th>
|
||||
<td mat-cell *matCellDef="let row"
|
||||
[style.color]="row.playtime < 420 ? 'red' : ''"> {{ minutesToHm(row.playtime) }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="role">
|
||||
<th mat-header-cell *matHeaderCellDef>Rank</th>
|
||||
<td mat-cell *matCellDef="let row"> {{ row.role }}</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ export class StaffPtComponent implements OnInit {
|
||||
parts.push(`${d}d`);
|
||||
}
|
||||
if (h > 0 || d > 0) {
|
||||
parts.push(`${h}h`);
|
||||
parts.push(`${h}hr`);
|
||||
}
|
||||
if (m > 0 || (h === 0 && d === 0)) {
|
||||
parts.push(`${m}m`);
|
||||
|
||||
Reference in New Issue
Block a user