AW-6410 Add extra parms to /api/v1/items/../children/count
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Peter Bastiani 2024-10-23 14:00:47 +02:00
parent 6b95fb7f77
commit ad5fe95b55

View File

@ -127,7 +127,7 @@ export class ItemService {
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params });
} }
getChildItemListCount(parentcode: string, itemType?: string,dataFilter?: any): Observable<number> { getChildItemListCount(parentcode: string, itemType?: string,dataFilter?: any, startDate?: Date, endDate?: Date): Observable<number> {
let params = new HttpParams(); let params = new HttpParams();
if(itemType != null) { if(itemType != null) {
params = params.append("it", itemType); params = params.append("it", itemType);
@ -135,6 +135,8 @@ export class ItemService {
if (dataFilter != null) { if (dataFilter != null) {
params = params.append("df", JSON.stringify(dataFilter)); params = params.append("df", JSON.stringify(dataFilter));
} }
if (startDate) params = params.append("sDate", startDate.toISOString());
if (endDate) params = params.append("eDate", endDate.toISOString());
return this.httpClient.get<number>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children/count`, { params: params }); return this.httpClient.get<number>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children/count`, { params: params });
} }