forked from FarmMaps/FarmMapsApiClient
		
	aggegrate KPI = false toegevoegd aan inputs
This commit is contained in:
		@@ -13,6 +13,8 @@ namespace FarmmapsApiSamples
 | 
				
			|||||||
        public const string GEOJSON_ITEMTYPE = "vnd.farmmaps.itemtype.geojson";
 | 
					        public const string GEOJSON_ITEMTYPE = "vnd.farmmaps.itemtype.geojson";
 | 
				
			||||||
        public const string BLIGHT_ITEMTYPE = "vnd.farmmaps.itemtype.blight";
 | 
					        public const string BLIGHT_ITEMTYPE = "vnd.farmmaps.itemtype.blight";
 | 
				
			||||||
        public const string CROPREC_ITEMTYPE = "vnd.farmmaps.itemtype.crprec.operation";
 | 
					        public const string CROPREC_ITEMTYPE = "vnd.farmmaps.itemtype.crprec.operation";
 | 
				
			||||||
 | 
					        public const string CROPSCHEME_ITEMTYPE = "vnd.farmmaps.itemtype.croppingscheme"; // deze toegevoegd, misschien is het type van de KPI task wel een croppingscheme
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public const string VRANBS_TASK = "vnd.farmmaps.task.vranbs";
 | 
					        public const string VRANBS_TASK = "vnd.farmmaps.task.vranbs";
 | 
				
			||||||
        public const string VRAHERBICIDE_TASK = "vnd.farmmaps.task.vraherbicide";
 | 
					        public const string VRAHERBICIDE_TASK = "vnd.farmmaps.task.vraherbicide";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -300,12 +300,12 @@ namespace FarmmapsApi.Services
 | 
				
			|||||||
            //hier nog definieren waar in de hierarchie een KPI item is?
 | 
					            //hier nog definieren waar in de hierarchie een KPI item is?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //the kpi data is a child of the cropfield
 | 
					            //the kpi data is a child of the cropfield
 | 
				
			||||||
            var itemname = "KPI";
 | 
					            var itemName = "kpi";
 | 
				
			||||||
            var KPIItem = await FindChildItemAsync(cropfieldItem.Code,
 | 
					            var KPIItem = await FindChildItemAsync(cropfieldItem.Code,
 | 
				
			||||||
                CROPFIELD_ITEMTYPE, itemname); //hier moet ik dus verwijzen naar waar het KPIItem zit? ik gok dat het een cropfield item type is...
 | 
					                CROPFIELD_ITEMTYPE, itemName); //hier moet ik dus verwijzen naar waar het KPIItem zit? ik gok dat het een cropfield item type is.-> of onderdeel van een croppingscheme? net toegevoegd. 
 | 
				
			||||||
            if (KPIItem == null)
 | 
					            if (KPIItem == null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                _logger.LogError("could not find the bofek data as a child item under the cropfield");
 | 
					                _logger.LogError("could not find the KPI data as a child item under the cropfield");
 | 
				
			||||||
                return null;
 | 
					                return null;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,17 @@ namespace FarmmapsKPI
 | 
				
			|||||||
            _farmmapsApiService = farmmapsApiService;
 | 
					            _farmmapsApiService = farmmapsApiService;
 | 
				
			||||||
            _generalService = generalService;
 | 
					            _generalService = generalService;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        // zoiets kan ik overwegen als ik de itemtype niet kan vinden 
 | 
				
			||||||
 | 
					        //public async Task<Item> CreateTargetKPIItem(Item cropfieldItem)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    var itemRequest = new ItemRequest()
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        ParentCode = cropfieldItem.ParentCode,
 | 
				
			||||||
 | 
					        //        ItemType = USERINPUT_ITEMTYPE,
 | 
				
			||||||
 | 
					        //        Name = "kpi"
 | 
				
			||||||
 | 
					        //    };
 | 
				
			||||||
 | 
					        //    return await _farmmapsApiService.CreateItemAsync(itemRequest);
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user