CaffGeek/MBACNationals

View on GitHub
Website/src/app/website/components/highscores/highscores.component.html

Summary

Maintainability
Test Coverage

<mat-card color="primary">
    <mat-card-header>
        <mat-card-title>{{ division }}</mat-card-title>
    </mat-card-header>
    <mat-card-content fxLayout="row wrap">
        <div fxFlex="100" fxFlex.gt-xs="50">
            <h4>Men</h4>
            <ul>
                <li *ngFor="let high of men">
                    <span *ngIf="stat === 'POA'">
                        {{high[stat] > 0 ? '+' : ''}}  <!-- if it's a negative, it's already part of the number -->
                    </span>
                    {{high[stat] | number:'1.0-1'}} - <app-participant-name [participant]="high"></app-participant-name>
                </li>
            </ul>
        </div>

        <div fxFlex="100" fxFlex.gt-xs="50">
            <h4>Women</h4>
            <ul>
                <li *ngFor="let high of women">
                    <span *ngIf="stat === 'POA'">
                        {{high[stat] > 0 ? '+' : ''}}  <!-- if it's a negative, it's already part of the number -->
                    </span>
                    {{high[stat] | number:'1.0-1'}} - <app-participant-name [participant]="high"></app-participant-name>
                </li>
            </ul>
        </div>
    </mat-card-content>
    <mat-card-actions>
        <button *ngIf="limit" mat-raised-button color="primary" [routerLink]="'statistics'">More Stats</button>
    </mat-card-actions>
</mat-card>