Add ability to retrieve only items that are valid today.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Peter Bastiani 2021-04-30 10:36:58 +02:00
parent 798ec8d1ca
commit 3504990708

View File

@ -71,13 +71,14 @@ export class ItemService {
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();
if(itemType) params = params.append("it", itemType);
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
if(atItemLocationItemCode) params = params.append("ail",atItemLocationItemCode);
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 });
}