Début d'evol pour la page "Summary"
This commit is contained in:
@@ -3,10 +3,11 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { DropZoneResp } from '../models/dropzone';
|
||||
import { JumpResp } from '../models/jump';
|
||||
import { AircraftResp } from '../models/aircraft';
|
||||
import { JumpTypeResp } from '../models/jumpType';
|
||||
import { DropZoneResp } from 'src/models/dropzone';
|
||||
import { JumpResp } from 'src/models/jump';
|
||||
import { AircraftResp } from 'src/models/aircraft';
|
||||
import { JumpTypeResp } from 'src/models/jumpType';
|
||||
import { StatsResp, StatsByDzResp, StatsByAircraftResp, StatsByJumpTypeResp, StatsByRigResp, StatsByYearResp } from 'src/models/statsresp';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@@ -37,4 +38,15 @@ export class ServiceApi {
|
||||
public getListOfJumpTypes(): Observable<Array<JumpTypeResp>> {
|
||||
return this.http.get<Array<JumpTypeResp>>('http://localhost:5000/api/JumpType', { headers: this.headers });
|
||||
}
|
||||
|
||||
public getStatsOfJumps(): StatsResp {
|
||||
const resultat = new StatsResp();
|
||||
resultat.statsByDz = this.http.get<StatsByDzResp>('http://localhost:5000/api/Stats/ByDz', { headers: this.headers });
|
||||
resultat.statsByAircraft = this.http.get<StatsByAircraftResp>('http://localhost:5000/api/Stats/ByAircraft', { headers: this.headers });
|
||||
resultat.statsByJumpType = this.http.get<StatsByJumpTypeResp>('http://localhost:5000/api/Stats/ByJumpType', { headers: this.headers });
|
||||
resultat.statsByRig = this.http.get<StatsByRigResp>('http://localhost:5000/api/Stats/ByRig', { headers: this.headers });
|
||||
resultat.statsByYear = this.http.get<StatsByYearResp>('http://localhost:5000/api/Stats/ByYear', { headers: this.headers });
|
||||
|
||||
return resultat;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user