Browse Source

Sort out the weekly rows

old-project-state
Dan 2 years ago
parent
commit
2c53e8a584
  1. 1
      src/app/components/race-details/race-details.component.html
  2. 13
      src/app/components/weekly-standings-table/weekly-standings-table.component.html
  3. 2
      src/app/components/weekly-standings-table/weekly-standings-table.component.ts

1
src/app/components/race-details/race-details.component.html

@ -4,7 +4,6 @@
<mat-grid-tile [colspan]="1" [rowspan]="2"><img
src={{week.mapThumbnailUrl}}
class="img-thumbnail shadow-2-strong"
alt="Palm Springs Road"
/></mat-grid-tile>
<mat-grid-tile [colspan]="3" [rowspan]="1">Three</mat-grid-tile>
</mat-grid-list>

13
src/app/components/weekly-standings-table/weekly-standings-table.component.html

@ -1,26 +1,25 @@
<div *ngIf="dataSource">
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
<ng-container matColumnDef="position">
<th mat-header-cell *matHeaderCellDef> No. </th>
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element"> {{element.position}} </td>
</ng-container>
<!-- Name Column -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>Name </th>
<td mat-cell *matCellDef="let element"> {{element.racer.name}} </td>
<td mat-cell *matCellDef="let element"> {{element.racer.name}} ({{element.racer.gameHandle}}) </td>
</ng-container>
<!-- Weight Column -->
<ng-container matColumnDef="runTime">
<th mat-header-cell *matHeaderCellDef> runTime </th>
<th mat-header-cell *matHeaderCellDef>Time </th>
<td mat-cell *matCellDef="let element"> {{formatMilliseconds(element.timeInMilliseconds)}} </td>
</ng-container>
<!-- Symbol Column -->
<ng-container matColumnDef="gameHandle">
<th mat-header-cell *matHeaderCellDef> gamerTag </th>
<td mat-cell *matCellDef="let element"> {{element.racer.gameHandle}} </td>
<ng-container matColumnDef="ghost">
<th mat-header-cell *matHeaderCellDef>Ghost</th>
<td mat-cell *matCellDef="let element"> <button mat-raised-button color="warn"><mat-icon aria-hidden="false" aria-label="Example home icon" fontIcon="download"></mat-icon> Ghost</button> </td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

2
src/app/components/weekly-standings-table/weekly-standings-table.component.ts

@ -7,7 +7,7 @@ import { SeasonWeekEntry } from '../../models/season';
styleUrls: ['./weekly-standings-table.component.scss']
})
export class WeeklyStandingsTableComponent {
displayedColumns: string[] = ['position', 'name', 'gameHandle', 'runTime'];
displayedColumns: string[] = ['position', 'name', 'runTime', 'ghost'];
@Input() dataSource?: SeasonWeekEntry[];
formatMilliseconds(milliseconds: number)

Loading…
Cancel
Save