AW-3912 added startDate and endDate to the item child list method
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit Details

AW-4620
Mark van der Wal 2022-07-04 16:19:00 +02:00
parent d551a2cf7a
commit 8c59976de6
1 changed files with 4 additions and 1 deletions

View File

@ -83,7 +83,8 @@ export class ItemService {
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
}
getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level: number = 1, deep: boolean = true): Observable<IItem[]> {
getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level: number = 1, deep: boolean = true,
startDate?: Date = null, endDate?: Date = null): Observable<IItem[]> {
var params = new HttpParams();
if(itemType != null) {
params = params.append("it", itemType);
@ -93,6 +94,8 @@ export class ItemService {
}
params = params.append("lvl", level.toString());
params = params.append("deep", deep.toString());
if (startDate) params = params.append("sDate", startDate.toISOString());
if (endDate) params = params.append("eDate", endDate.toISOString());
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params });
}