Compare commits

..

2 Commits

Author SHA1 Message Date
b5828cd0fa Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-09-16 14:11:56 +02:00
af4e6f45d1 AW6241 Support source in item count 2024-09-16 14:11:39 +02:00

View File

@ -81,7 +81,7 @@ export class ItemService {
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string, getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string,
indexed?: boolean, validToday?: boolean,tags?:string,crs?:string, startDate?: Date, endDate?: Date, indexed?: boolean, validToday?: boolean,tags?:string,crs?:string, startDate?: Date, endDate?: Date,
skip?: number, take?: number): Observable<IItem[]> { skip?: number, take?: number, sourceTask?: string): Observable<IItem[]> {
let params = new HttpParams(); let params = new HttpParams();
if(itemType) params = params.append("it", itemType); if(itemType) params = params.append("it", itemType);
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter)); if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
@ -93,15 +93,16 @@ export class ItemService {
if (crs) params = params.append("crs", crs); 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());
if (sourceTask) params = params.append("sourceTask", sourceTask);
if(skip) params = params.append("skip", skip); if(skip) params = params.append("skip", skip);
if(take) params = params.append("take", take); if(take) params = params.append("take", take);
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, crs?:string): Observable<number> { getItemListCount(itemType: string, startDate?: Date, endDate?: Date, sourceTask?: 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 (sourceTask) params = params.append("sourceTask", sourceTask);
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 });