| {{team.name}} |
-
- {{getTime(x, team.idteam)}}
+ |
+ {{time/1000}}s
|
Gem. beste 2 |
diff --git a/src/app/content/poule/poule.component.scss b/src/app/content/poule/poule.component.scss
index e69de29..9f745cb 100644
--- a/src/app/content/poule/poule.component.scss
+++ b/src/app/content/poule/poule.component.scss
@@ -0,0 +1,5 @@
+.time {
+ background-color: aquamarine;
+ margin: 2px;
+}
+
diff --git a/src/app/content/poule/poule.component.ts b/src/app/content/poule/poule.component.ts
index 5562954..181fcdc 100644
--- a/src/app/content/poule/poule.component.ts
+++ b/src/app/content/poule/poule.component.ts
@@ -61,23 +61,21 @@ export class PouleComponent implements OnInit {
});
}
- /**
- * Get an array of laps:
- * [{ lap: 1, time: xxxx}, {lap : 2, time: yyyy}]
- */
- getTimesForRace(raceNr: number, idTeam: number) {
- // what is the 'raceNr'd idrace? first get the unique idraces, they're already sorted, then take the 'raceNr'd one.
- // const anies = this.times.filter(t => t.idteam === idTeam);
- // if (anies && anies.length >= raceNr) {
- // console.log('anies');
- // console.log(anies);
- // return anies[raceNr - 1];
- // } else {
- // return [];
- // }
+ getPenaltySum(lapNr: number, idTeam: number) {
+ if (!this.timesIndexed
+ || !this.timesIndexed[idTeam]
+ || !this.timesIndexed[idTeam][lapNr]
+ || !this.timesIndexed[idTeam][lapNr].penaltysum) {
+ return null;
+ }
+ const penaltysum = this.timesIndexed[idTeam][lapNr].penaltysum;
+ if (!penaltysum) {
+ return 0;
+ }
+ return penaltysum;
}
- getTime(lapNr: number, idTeam: number) {
+ getTime(lapNr: number, idTeam: number):number[] {
// console.log('lapnr/idteam' + lapNr + ' ' + idTeam);
// console.log(this.timesIndexed);
// console.log(this.timesIndexed[idTeam][lapNr]);
diff --git a/src/app/topmenu/topmenu.component.html b/src/app/topmenu/topmenu.component.html
index ac91631..de0ae3f 100644
--- a/src/app/topmenu/topmenu.component.html
+++ b/src/app/topmenu/topmenu.component.html
@@ -1,6 +1,6 @@