Aw-6020 Add getItemListCount for paging
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
f3252a378d
commit
a999c05631
@ -79,7 +79,9 @@ export class ItemService {
|
|||||||
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string, indexed?: boolean, validToday?: boolean,tags?:string,crs?:string, startDate?: Date, endDate?: Date): Observable<IItem[]> {
|
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string,
|
||||||
|
indexed?: boolean, validToday?: boolean,tags?:string,crs?:string, startDate?: Date, endDate?: Date,
|
||||||
|
skip?: number, take?: number): Observable<IItem[]> {
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
if(itemType) params = params.append("it", itemType);
|
if(itemType) params = params.append("it", itemType);
|
||||||
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
|
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
|
||||||
@ -91,9 +93,19 @@ export class ItemService {
|
|||||||
if (crs) params = params.append("crs", crs);
|
if (crs) params = params.append("crs", crs);
|
||||||
if (startDate) params = params.append("sDate", startDate.toISOString());
|
if (startDate) params = params.append("sDate", startDate.toISOString());
|
||||||
if (endDate) params = params.append("eDate", endDate.toISOString());
|
if (endDate) params = params.append("eDate", endDate.toISOString());
|
||||||
|
if(skip) params = params.append("skip", skip);
|
||||||
|
if(take) params = params.append("take", take);
|
||||||
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
|
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getItemListCount(itemType: string, startDate?: Date, endDate?: Date): Observable<number> {
|
||||||
|
let params = new HttpParams();
|
||||||
|
params = params.append("it", itemType);
|
||||||
|
if (startDate) params = params.append("sDate", startDate.toISOString());
|
||||||
|
if (endDate) params = params.append("eDate", endDate.toISOString());
|
||||||
|
return this.httpClient.get<number>(`${this.ApiEndpoint()}/api/v1/items/count`, { params: params });
|
||||||
|
}
|
||||||
|
|
||||||
getChildItemList(parentcode: string, itemType?: string, dataFilter?: any, level = 1, deep = true,
|
getChildItemList(parentcode: string, itemType?: string, dataFilter?: any, level = 1, deep = true,
|
||||||
startDate?: Date, endDate?: Date, skip?: number, take?: number): Observable<IItem[]> {
|
startDate?: Date, endDate?: Date, skip?: number, take?: number): Observable<IItem[]> {
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
Loading…
Reference in New Issue
Block a user