diff --git a/src/app/components/kit/editKit/editKit.controller.js b/src/app/components/kit/editKit/editKit.controller.js index 4069ac94..c6d82eaf 100644 --- a/src/app/components/kit/editKit/editKit.controller.js +++ b/src/app/components/kit/editKit/editKit.controller.js @@ -189,7 +189,7 @@ } // TODO: Refactor, bring this back once we have a way to create legacy - // if(vm.device.isLegacy){ + if(vm.device.isLegacy){ if(!vm.deviceForm.macAddress || vm.deviceForm.macAddress === ''){ /*jshint camelcase: false */ data.mac_address = null; @@ -202,7 +202,7 @@ alert.error(message); data.mac_address = null; throw new Error('[Client:error] ' + message); - // } + } } device.updateDevice(vm.device.id, data) diff --git a/src/app/components/kit/editKit/editKit.html b/src/app/components/kit/editKit/editKit.html index 68a678f4..d9ddc8fd 100644 --- a/src/app/components/kit/editKit/editKit.html +++ b/src/app/components/kit/editKit/editKit.html @@ -257,7 +257,6 @@

Mac address

- diff --git a/src/app/components/kit/newKit/newKit.controller.js b/src/app/components/kit/newKit/newKit.controller.js index 7d4b0a30..f2af7c73 100644 --- a/src/app/components/kit/newKit/newKit.controller.js +++ b/src/app/components/kit/newKit/newKit.controller.js @@ -24,6 +24,7 @@ zoom: 16 }, is_private: false, + legacyVersion: '1.1', tags: [] }; @@ -33,6 +34,12 @@ {name: 'outdoor', value: 2} ]; + // VERSION SELECT + vm.version = [ + {name: 'Smart Citizen Kit 1.0', value: '1.0'}, + {name: 'Smart Citizen Kit 1.1', value: '1.1'} + ]; + $scope.$on('leafletDirectiveMarker.dragend', function(event, args){ vm.deviceForm.location.lat = args.model.lat; vm.deviceForm.location.lng = args.model.lng; @@ -62,7 +69,6 @@ vm.removeTag = removeTag; // MAP CONFIGURATION - var mapBoxToken = 'pk.eyJ1IjoidG9tYXNkaWV6IiwiYSI6ImRTd01HSGsifQ.loQdtLNQ8GJkJl2LUzzxVg'; vm.getLocation = getLocation; @@ -119,6 +125,7 @@ latitude: vm.deviceForm.location.lat, longitude: vm.deviceForm.location.lng, is_private: vm.deviceForm.is_private, + hardware_version_override: vm.deviceForm.legacyVersion, /*jshint camelcase: false */ user_tags: _.map(vm.deviceForm.tags, 'name').join(',') }; diff --git a/src/app/components/kit/newKit/newKit.html b/src/app/components/kit/newKit/newKit.html index 3ba209c5..6a7f2a97 100644 --- a/src/app/components/kit/newKit/newKit.html +++ b/src/app/components/kit/newKit/newKit.html @@ -44,6 +44,12 @@

Basic information

+
+ + + {{ version.name }} + +