Évol pour afficher le total de sauts et 1-2 infos
sur le dernier saut
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<div>
|
||||
<label style="float: left; width: 130px;">Total jumps :</label>
|
||||
<span>850</span>
|
||||
<label style="float: left; width: 130px;">Total jumps</label>
|
||||
<span>: {{ totalJumps }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label style="float: left; width: 130px;">Total cutaways :</label>
|
||||
<span>1</span>
|
||||
<label style="float: left; width: 130px;">Total cutaways</label>
|
||||
<span>: {{ totalCutaways }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label style="float: left; width: 130px;">Last jump :</label>
|
||||
<span>5 Février 2020 à Barcelonnette</span>
|
||||
<label style="float: left; width: 130px;">Last jump</label>
|
||||
<span>: {{ lastJump }}</span>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; flex-direction: row; flex-wrap: wrap; margin-top: 15px;">
|
||||
|
||||
@@ -32,17 +32,27 @@ export class SummaryComponent implements OnInit {
|
||||
private _shownStats: Map<StatType, boolean>;
|
||||
public StatType = StatType;
|
||||
|
||||
public totalJumps: number;
|
||||
public totalCutaways: number;
|
||||
public lastJump: string;
|
||||
|
||||
constructor(
|
||||
private serviceApi: StatsService,
|
||||
private serviceComm: ServiceComm
|
||||
private _serviceApi: StatsService,
|
||||
private _serviceComm: ServiceComm
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.initShownStats();
|
||||
|
||||
this.serviceComm.UpdatedComponentTitle('Summary');
|
||||
this._serviceComm.UpdatedComponentTitle('Summary');
|
||||
|
||||
const statsResult = this.serviceApi.getStatsOfJumps();
|
||||
const statsResult = this._serviceApi.getStatsOfJumps();
|
||||
|
||||
statsResult.simpleSummary.subscribe(data => {
|
||||
this.totalJumps = data.totalJumps;
|
||||
this.totalCutaways = data.totalCutaways;
|
||||
this.lastJump = data.lastJump.jumpDate + ' (' + data.lastJump.dropZone.name + ')';
|
||||
});
|
||||
|
||||
statsResult.statsByDz.subscribe(data => {
|
||||
this.dsNbJumpByDz = new MatTableDataSource(data);
|
||||
|
||||
Reference in New Issue
Block a user