Compare commits

..

No commits in common. "ea26cdd628cd286687666d5bc48ac02828cadac5" and "9e4a538a076fe6109ab95d3281afbb8ec0d869e6" have entirely different histories.

3 changed files with 19 additions and 17 deletions

17
package-lock.json generated
View File

@ -2692,14 +2692,14 @@
}
},
"@farmmaps/common": {
"version": "0.0.1-prerelease.398",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-0.0.1-prerelease.398.tgz",
"integrity": "sha512-lAOHGwYFUSE4lTqiSIbANbP6KJoAW0uEgor8ag2ridTRHE8X5skj3wYZIkzYOhUA8njPEju+U6wwW8e4wshlCw=="
"version": "0.0.1-prerelease.349",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-0.0.1-prerelease.349.tgz",
"integrity": "sha512-CLANnjefX8vpIIOHX/eutPG9H/7PD/rgG5HH/VhmXjTwSjU97W4xf+iLow4SvukVFfikQ1EDnWECx/6uKKRIUg=="
},
"@farmmaps/common-map": {
"version": "0.0.1-prerelease.398",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-0.0.1-prerelease.398.tgz",
"integrity": "sha512-XZt8q55r5oQUdUwLDxFeAkzliyMRXC6qHm87ok/hIZvQkq90RlTRBAZ1+xoLS8Gi3Ix28fQMDwjYD68n2PJ5Vg=="
"version": "0.0.1-prerelease.360",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-0.0.1-prerelease.360.tgz",
"integrity": "sha512-V7cWPiTHS1gIahwCpt32Qcv+wHxdOWg/+LzmP2x/6X9cJnC0L6XDR5rJFvS8zpGeRJiunq7cSFCm/22MOpnRTQ=="
},
"@istanbuljs/schema": {
"version": "0.1.2",
@ -9443,11 +9443,6 @@
"minimist": "^1.2.5"
}
},
"moment": {
"version": "2.28.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.28.0.tgz",
"integrity": "sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",

View File

@ -19,8 +19,8 @@
"@angular/platform-browser": "~9.1.0",
"@angular/platform-browser-dynamic": "~9.1.0",
"@angular/router": "~9.1.0",
"@farmmaps/common": ">=0.0.1-prerelease.398 <0.0.1",
"@farmmaps/common-map": ">=0.0.1-prerelease.398 <0.0.1",
"@farmmaps/common": ">=0.0.1-prerelease.349 <0.0.1",
"@farmmaps/common-map": ">=0.0.1-prerelease.349 <0.0.1",
"@microsoft/signalr": "^3.1.3",
"@ng-bootstrap/ng-bootstrap": "^6.0",
"@ngrx/effects": "^9.0",

View File

@ -1,4 +1,4 @@
import { Component, Input, Injectable, OnInit } from '@angular/core';
import { Component, Input, Injectable, OnInit, ComponentFactoryResolver, Inject, ComponentFactory } from '@angular/core';
import { Location } from '@angular/common';
import { Feature } from 'ol';
import { Store } from '@ngrx/store';
@ -11,6 +11,7 @@ import { Observable,of } from 'rxjs';
import {GeoJSON} from 'ol/format';
import {getArea} from 'ol/sphere';
import { withLatestFrom,switchMap,combineLatest } from 'rxjs/operators';
import { AbstractItemListItemComponent, ItemListItemComponent } from '../item-list-item/item-list-item.component';
@ForItemType("vnd.farmmaps.itemtype.cropfield")
@ -24,7 +25,8 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
public items: Observable<IListItem[]>;
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService,
private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractItemListItemComponent) public itemComponentList: AbstractItemListItemComponent[] ) {
super(store, itemTypeService,location,router);
}
@ -39,6 +41,7 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
}
ngOnInit() {
var componentFactory: ComponentFactory<AbstractItemListItemComponent> = this.componentFactoryResolver.resolveComponentFactory(ItemListItemComponent); // default
var childItems = this.folderService$.getItems(this.item.code, 0, 1000);
var atLocationItems = this.itemService$.getItemList(null,null,null,this.item.code,true);
this.items = childItems.pipe(
@ -47,8 +50,12 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
let retVal:IListItem[] = [];
let codes = {};
ci.forEach((listItem) => {
if (this.itemComponentList.findIndex(i =>
i.item['forItemType'].indexOf(this.item.itemType) >= 0 &&
i.item['forSourceTask'].indexOf(this.item.sourceTask) >= 0) >= 0) {
retVal.push(listItem);
codes[listItem.code]=listItem;
}
});
ali.forEach((atlocationitem) => {
let listItem = atlocationitem as IListItem;