AW6241 Support src in item count
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Peter Bastiani 2024-09-16 13:58:54 +02:00
parent 7d7e5bcd37
commit 53c60427f1

View File

@ -98,9 +98,10 @@ export class ItemService {
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> { getItemListCount(itemType: string, startDate?: Date, endDate?: Date, crs?:string): Observable<number> {
let params = new HttpParams(); let params = new HttpParams();
params = params.append("it", itemType); params = params.append("it", itemType);
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());
return this.httpClient.get<number>(`${this.ApiEndpoint()}/api/v1/items/count`, { params: params }); return this.httpClient.get<number>(`${this.ApiEndpoint()}/api/v1/items/count`, { params: params });