Compare commits

..

3 Commits

Author SHA1 Message Date
7b2dbc1777 AW-3912 fix build
All checks were successful
FarmMaps/FarmMapsLib/pipeline/head This commit looks good
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2022-07-04 16:23:08 +02:00
8c59976de6 AW-3912 added startDate and endDate to the item child list method
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2022-07-04 16:19:00 +02:00
d551a2cf7a upped version (to fix some faulty builds)
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2022-06-20 17:11:58 +02:00
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "2.0.5", "version": "2.1.1",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",

View File

@ -83,7 +83,8 @@ 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 });
} }
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, endDate?: Date): Observable<IItem[]> {
var params = new HttpParams(); var params = new HttpParams();
if(itemType != null) { if(itemType != null) {
params = params.append("it", itemType); params = params.append("it", itemType);
@ -93,6 +94,8 @@ export class ItemService {
} }
params = params.append("lvl", level.toString()); params = params.append("lvl", level.toString());
params = params.append("deep", deep.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 }); return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params });
} }