Skip to content
Snippets Groups Projects
Commit 49dc35e9 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

poi type selection restricted (Can't select weather station)

parent 9717f1c9
Branches
No related tags found
No related merge requests found
......@@ -18,10 +18,10 @@ export default {
CONST_STORAGE_POI_LIST : 'store-poi-list',
CONST_STORAGE_VISIBILITY_POLYGON : 'store-polygon',
CONST_POI_TYPES : [
{"point_of_interest_type_id":0,"default_name":"General"},
{"point_of_interest_type_id":2,"default_name":"Farm"},
{"point_of_interest_type_id":3,"default_name":"Field"},
{"point_of_interest_type_id":1,"default_name":"Weather station"}
{"point_of_interest_type_id":0,"default_name":"General", "is_user_selectable": true},
{"point_of_interest_type_id":2,"default_name":"Farm", "is_user_selectable": true},
{"point_of_interest_type_id":3,"default_name":"Field", "is_user_selectable": true},
{"point_of_interest_type_id":1,"default_name":"Weather station", "is_user_selectable": false}
],
CONST_POI_TYPE_DEFAULT : 3,
CONST_IMAGE_WIDTH : 100,
......
......@@ -36,7 +36,7 @@
<div class='form-group'>
<select class="form-control" v-model="poi.pointOfInterestTypeId" :disabled="!userCanEditPOI">
<option v-for="poiType in poiTypes" v-bind:key="poiType.point_of_interest_type_id" :value='poiType.point_of_interest_type_id'>{{$t(poiType.default_name)}}</option>
<option v-for="poiType in poiTypes" v-bind:key="poiType.point_of_interest_type_id" :value='poiType.point_of_interest_type_id' :disabled="!poiType.is_user_selectable">{{$t(poiType.default_name)}}</option>
</select>
</div>
<div class="form-group" v-show="userCanEditPOI">
......@@ -553,6 +553,7 @@ export default{
this.mapZoom = CommonUtil.CONST_GPS_OBSERVATION_ZOOM;
this.poiTypes = CommonUtil.CONST_POI_TYPES;
console.info(this.poiTypes);
if(this.$route.params.pointOfInterestId)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment