Update to retrieve the jumps page by page.
This commit is contained in:
@@ -5,6 +5,7 @@ import { forkJoin, Observable, of } from "rxjs";
|
||||
import { map } from "rxjs/operators";
|
||||
|
||||
import { JumpResp, JumpReq, Jump } from "../models/jump";
|
||||
import { JumpListResp, JumpList } from "../models/jumpList";
|
||||
import { GearResp } from "../models/gear";
|
||||
import { DropZoneResp } from "../models/dropzone";
|
||||
import { AircraftResp } from "../models/aircraft";
|
||||
@@ -39,6 +40,19 @@ export class JumpService extends BaseService {
|
||||
}));
|
||||
}
|
||||
|
||||
public GetJumps(beginIndex: number, endIndex: number): Observable<JumpList> {
|
||||
return this.http.get<JumpListResp>(`${this.apiUrl}/Jump/${beginIndex}/${endIndex}`,
|
||||
{ headers: this.headers })
|
||||
.pipe(map((response) => {
|
||||
let result: JumpList = {
|
||||
rows : this.MapWithDataInCache(response.rows),
|
||||
count : response.count
|
||||
};
|
||||
|
||||
return new JumpList(result);
|
||||
}));
|
||||
}
|
||||
|
||||
public AddListOfJump(selectedJumpType: number,
|
||||
selectedAircraft: number,
|
||||
selectedDz: number,
|
||||
|
||||
Reference in New Issue
Block a user