Merge branch 'master' of https://home.git.sebastienandre.com/sandre/SkydiveLogs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material';
|
||||
import { ServiceComm } from '../../services/service-comm.service';
|
||||
import { StatsService } from '../../services/stats.service';
|
||||
|
||||
@@ -22,5 +23,23 @@ export class SummaryComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.serviceComm.UpdatedComponentTitle('Summary');
|
||||
|
||||
const statsResult = this.serviceApi.getStatsOfJumps();
|
||||
|
||||
statsResult.statsByDz.subscribe(data => {
|
||||
this.dsNbJumpByDz = new MatTableDataSource(data);
|
||||
});
|
||||
statsResult.statsByAircraft.subscribe(data => {
|
||||
this.dsNbJumpByAircraft = new MatTableDataSource(data);
|
||||
});
|
||||
statsResult.statsByGear.subscribe(data => {
|
||||
this.dsNbJumpByGear = new MatTableDataSource(data);
|
||||
});
|
||||
statsResult.statsByJumpType.subscribe(data => {
|
||||
this.dsNbJumpByType = new MatTableDataSource(data);
|
||||
});
|
||||
statsResult.statsByYear.subscribe(data => {
|
||||
this.dsNbJumpByYear = new MatTableDataSource(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user