Skip to content
Snippets Groups Projects
Commit 8680a6ce authored by Maximilian Betz's avatar Maximilian Betz
Browse files

first version with editing events done

parent c1f11e3e
No related branches found
No related tags found
No related merge requests found
......@@ -458,7 +458,7 @@ class _EditEventPageState extends State<EditEvent> {
if (_validateInput(editEvent)) {
_updateOpenEvent(context);
_showResultPopup(context, "Successfully updated Event !", false );
_showResultPopup(context, "Updated Event !", false );
Navigator.pop(context);
}
},
......
......@@ -81,11 +81,11 @@ class _ViewEvents extends State<ViewEvents> {
var index = 0;
for (var event in events) {
if(_cancelSync == true){
_currentlySyncing = false;
_syncButtonText = 'Start Sync';
debugPrint('Sync process canceled');
return;
}
_currentlySyncing = false;
_syncButtonText = 'Start Sync';
debugPrint('Sync process canceled');
return;
}
_currentlySyncing = true;
_syncButtonText = 'Syncing ...';
if(mounted) {
......@@ -234,18 +234,14 @@ class _ViewEvents extends State<ViewEvents> {
}
debugPrint("Selected Row: " + i.toString());
//TODO: open widget to edit the rows event values.
//TODO: Similar to Widget Add Event, GNSS editing always enabled, No GNSS switch, No Now Button?
//TODO: Show start and end time separately.
//TODO: Do not show GNSS on/off switch
//TODO: Provide "cancel" and "update" functionality at the bottom bar.
//TODO: display "Exported Events are read only, Edit via Sensor.awi.de" when trying to edit.
debugPrint(_localEvents[i].toString());
//Open Edit widget. Reload updated events from database and setState when returning.
var eventCopy = Event.fromEvent(_localEvents[i]);
Navigator.pushNamed(context, '/fifth', arguments: {'event': eventCopy} ).then((_) => setState(() {fetchEventsFromDb();}));
if(eventCopy.status == 'PENDING'){
Navigator.pushNamed(context, '/fifth', arguments: {'event': eventCopy} ).then((_) => setState(() {fetchEventsFromDb();}));
}else
{
debugPrint('Can not edit already exported events.');
//TODO: display popup or grey out"Exported Events are read only, Edit via Sensor.awi.de" when trying to edit.
}
},
cells: <DataCell>[
//DataCell(Text(_localEvents[i].urnId.toString())),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment