AW-1037 Add filter parameter
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
bf883a779f
commit
8ef248b0a7
@ -149,8 +149,9 @@ export class ItemService {
|
||||
return this.httpClient.post<IItemTask>(`${this.ApiEndpoint()}/api/v1/items/${item.code}/tasks`, task);
|
||||
}
|
||||
|
||||
getItemTaskList(itemcode: string): Observable<IItemTask[]> {
|
||||
return this.httpClient.get<IItemTask[]>(`${this.ApiEndpoint()}/api/v1/items/${itemcode}/tasks`).pipe(map(ia => ia.map(i => this.parseDates(i))));
|
||||
getItemTaskList(itemcode: string, unfinishedOnly?: boolean): Observable<IItemTask[]> {
|
||||
var params = new HttpParams();
|
||||
if (unfinishedOnly) params = params.append("unfinishedOnly", unfinishedOnly.toString());
|
||||
return this.httpClient.get<IItemTask[]>(`${this.ApiEndpoint()}/api/v1/items/${itemcode}/tasks`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i))));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user