6 Commits

Author SHA1 Message Date
d6c55ef82b 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-11-05 09:26:03 +01:00
d977ddfb7b Fix null ref exception 2024-11-05 09:26:00 +01:00
jenkins
0e8bd5343d [ci skip] Updated packages #2520
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-10-30 10:39:49 +00:00
ceeaa89ba3 AW-6410 Add indexed parm to getItemListCount
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-10-30 11:37:51 +01:00
jenkins
c3dbf85eb6 [ci skip] Updated packages #2519
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-10-23 12:02:56 +00:00
ad5fe95b55 AW-6410 Add extra parms to /api/v1/items/../children/count
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-10-23 14:00:47 +02:00
4 changed files with 14 additions and 10 deletions

12
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "4.11.0", "version": "4.12.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "4.11.0", "version": "4.12.0",
"dependencies": { "dependencies": {
"@angular-eslint/eslint-plugin": "^18.2.0", "@angular-eslint/eslint-plugin": "^18.2.0",
"@angular/animations": "^18.2.3", "@angular/animations": "^18.2.3",
@@ -90,7 +90,7 @@
}, },
"dist/common": { "dist/common": {
"name": "@farmmaps/common", "name": "@farmmaps/common",
"version": "4.11.0-prerelease.2517", "version": "4.12.0-prerelease.2519",
"dependencies": { "dependencies": {
"tslib": "^2.3.0" "tslib": "^2.3.0"
}, },
@@ -115,7 +115,7 @@
}, },
"dist/common-map": { "dist/common-map": {
"name": "@farmmaps/common-map", "name": "@farmmaps/common-map",
"version": "4.11.0-prerelease.2517", "version": "4.12.0-prerelease.2519",
"dependencies": { "dependencies": {
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
@@ -130,7 +130,7 @@
}, },
"dist/common-map3d": { "dist/common-map3d": {
"name": "@farmmaps/common-map3d", "name": "@farmmaps/common-map3d",
"version": "4.11.0-prerelease.2517", "version": "4.12.0-prerelease.2519",
"dependencies": { "dependencies": {
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
@@ -143,7 +143,7 @@
}, },
"dist/ng-openlayers": { "dist/ng-openlayers": {
"name": "@farmmaps/ng-openlayers", "name": "@farmmaps/ng-openlayers",
"version": "4.11.0-prerelease.2517", "version": "4.12.0-prerelease.2519",
"license": "MPL-2.0", "license": "MPL-2.0",
"dependencies": { "dependencies": {
"tslib": "^2.3.0" "tslib": "^2.3.0"

View File

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

View File

@@ -99,12 +99,14 @@ 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, sourceTask?: string): Observable<number> { getItemListCount(itemType: string, startDate?: Date, endDate?: Date, sourceTask?: string,
indexed?: boolean): Observable<number> {
let params = new HttpParams(); let params = new HttpParams();
params = params.append("it", itemType); params = params.append("it", itemType);
if (sourceTask) params = params.append("sourceTask", sourceTask); 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());
if(indexed) params = params.append("ind",indexed?"true":"false");
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 });
} }
@@ -127,7 +129,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 +137,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 });
} }

View File

@@ -27,7 +27,7 @@ export class ItemTypeService {
getExtraAttributes(itemType: string) { getExtraAttributes(itemType: string) {
let extraAttributes = null; let extraAttributes = null;
if (this.itemTypes[itemType] && this.itemTypes[itemType].extraAttributes) extraAttributes = this.itemTypes[itemType].extraAttributes; if (this.itemTypes[itemType] && this.itemTypes[itemType]?.extraAttributes) extraAttributes = this.itemTypes[itemType]?.extraAttributes;
return extraAttributes; return extraAttributes;
} }