Add ability to retrieve only items that are valid today.
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
798ec8d1ca
commit
3504990708
@ -71,13 +71,14 @@ 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): Observable<IItem[]> {
|
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string, indexed?: boolean, validToday?: boolean): Observable<IItem[]> {
|
||||||
var params = new HttpParams();
|
var 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));
|
||||||
if(atItemLocationItemCode) params = params.append("ail",atItemLocationItemCode);
|
if(atItemLocationItemCode) params = params.append("ail",atItemLocationItemCode);
|
||||||
if(indexed) params = params.append("ind",indexed?"true":"false");
|
if(indexed) params = params.append("ind",indexed?"true":"false");
|
||||||
if (level) params = params.append("lvl", level.toFixed());
|
if (level) params = params.append("lvl", level.toFixed());
|
||||||
|
if (validToday) params = params.append("vt", indexed ? "true" : "false");
|
||||||
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
|
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user