diff --git a/lib/addevent.dart b/lib/addevent.dart index 695550fc4ecb2dc5ae28ed57206118e17146616c..7c885040bc6685830899a0221ab8fd9f254c3959 100644 --- a/lib/addevent.dart +++ b/lib/addevent.dart @@ -19,6 +19,9 @@ class AddEvent extends StatelessWidget { )); } + //TODO: add field validators for freetext fields. Check allowed characters in sensor.awi.de + //TODO: (Description, Label, Latitude, Longitude, Elevation, ) + @override Widget build(BuildContext context) { /* Get singletons to access relevant data here.*/ diff --git a/lib/main.dart b/lib/main.dart index 2f6118e0ad1a7a98284859942658d241c2fc83fe..01284fbff2db1ab9ed367871a9eaab635205f95a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,17 +16,21 @@ void main() { // Add some dummy devices + // TODO: load from shared preferences. + // TODO: this shall be requested from sensor.awi.de after selecting a collection in configuration. availableDevice.store.add(Device.fromJson({'id': 8311, 'urn':'station:neumayer_iii:awi_snow_sampler_1'})); availableDevice.store.add(Device.fromJson({'id': 4086, 'urn':'acoustic_backscatter_sensor:test'})); + availableDevice.store.add(Device.fromJson({'id': 1393, 'urn':'vessel:polarstern:hydrosweep_ds3'})); - // Create current event as basis when starting add event widget + // Fill the textboxes in addevent with some usefull data. + // TODO: store this in shared preferences so that last entered data reappears when restarting the app. currentEvent.store.urn = 'acoustic_backscatter_sensor:test'; currentEvent.store.id = 1234; currentEvent.store.description = 'blabla'; currentEvent.store.label = 'PS129_ABC'; currentEvent.store.type = 'Deployment'; - //Add some dummy events to eventstore + //Add some dummy events to eventstore. Just development purpose. TODO: Remove after development. events.store.add(Event.fromJson({ 'id': 8311, 'urn': 'station:neumayer_iii:awi_snow_sampler_1', @@ -60,7 +64,9 @@ void main() { 'status': 'PENDING' })); - //Add some dummy eventtypes. TODO: request from https://sensor.awi.de/rest/sensors/events/getAllEventTypes + //Add some dummy eventtypes. + // TODO: loard from shared preferences. + // TODO: request from https://sensor.awi.de/rest/sensors/events/getAllEventTypes in configuration widget. eventTypes.store.add(EventType.fromJson({'id': 317, 'name':'Configuration'})); eventTypes.store.add(EventType.fromJson({'id': 216, 'name':'Decommissioned'})); eventTypes.store.add(EventType.fromJson({'id': 187, 'name':'Deployment'}));