Évol pour afficher le total de sauts et 1-2 infos

sur le dernier saut
This commit is contained in:
Sébastien André
2020-03-03 15:58:32 +01:00
parent 3363a72323
commit 63f801d37b
4 changed files with 60 additions and 19 deletions

View File

@@ -1,4 +1,5 @@
import { Observable } from 'rxjs';
import { JumpResp } from './jump';
export enum StatType {
ForLastMonth = 1,
@@ -11,6 +12,8 @@ export enum StatType {
}
export class StatsResp {
public simpleSummary: Observable<SimpleSummary>;
public statsByDz: Observable<Array<StatsByDzResp>>;
public statsByAircraft: Observable<Array<StatsByAircraftResp>>;
public statsByGear: Observable<Array<StatsByGearResp>>;
@@ -21,6 +24,18 @@ export class StatsResp {
public statsForLastMonth: Observable<StatsForLastMonthResp>;
}
export class SimpleSummary {
constructor(data: any) {
this.totalJumps = data.totalJumps;
this.totalCutaways = data.totalCutaways;
this.lastJump = new JumpResp(data.lastJump);
}
public totalJumps: number;
public totalCutaways: number;
public lastJump: JumpResp;
}
export class StatsByDzResp {
constructor(data: any) {
Object.assign(this, data);