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

preparing own sync widget on viewevents

parent 4798bf5a
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,8 @@ Text: #57827E
- animated Feedbackpopup on first line : "speech bubble" (Download successfull) Show pop up for 2s. "Detail information as is below the collection dropdown menu.
- Collection List Drop Down. Item separation "grey line" + Abbort button. "Highlight "chosen collection" italic or pinned on top. Sort alphabetic.
- Add a selection mode functionality. 1. Own devices (based on e-mail adress as editor on devices), 2. Collections, 3. Mission management based
- https://sandbox.sensor.awi.de/rest/sensors/device/getItemsOfContact/mbetz%40awi.de
- Split in two widgets? 1st to login und 2nd to configure. Allow configuration only with successfull login?
## Add Event
- Show \* next to lable for required fields.
......@@ -72,14 +74,18 @@ Text: #57827E
- Block creation of a new event for e.g. 2 seconds after creation. This shall prevent unintended creation of multiple events.
- Deactivate Timestamp field and Now button if GNSS sync active.
- Choose Urns in configuration: Label on Add Event is beeing cleared but GNSS data is not Harmonize.
- GNSS switch next to lat long elevation field. Similar as the NOW field. (Feedback from Dana)
## View & Events
- "All Events" "Pending Events" on first line above table. Alligned right. 50pix hight distance to table start.
- Multiple lines for one event to reduce width. Alternative: Do not show all event details in table but show them in a separate widget on selection. This could also be the view to edit event details.
- Edit mode (only pending events). Select an event and open event in edit mode with all details (including start and finish time), allow to remove event.
- Feedback "Success" to line above table and below top bar.
- Show sync widget, show sync status, allow canceling of sync process. E.g. an error can be caused if "Sync" is pressed multiple times in the View & Sync Widget as multiple async functions are syncing events in parallel. Simple solution would be to deactivate the sync button if a sync process is active.
- Show sync widget (similar to the information widget), show sync status progress, allow canceling of sync process. Currently an error can be caused if "Sync" is pressed multiple times in the View & Sync Widget as multiple async functions are syncing events in parallel. Simple solution would be to deactivate the sync button if a sync process is active.
- Clone event data from here to Add Event widget.
## Wishlist:
- Allow upload of pictures check interface how to upload with sensor.
......
......@@ -30,6 +30,12 @@ class Overview extends StatelessWidget {
],
),
actions: <Widget>[
TextButton(
onPressed: () {
//TODO: show legal notices text
},
child: const Text('Legal notices'),
),
TextButton(
onPressed: () {
Navigator.of(context).pop();
......
......@@ -20,6 +20,46 @@ class _ViewEvents extends State<ViewEvents> {
var database = DatabaseInstance();
List<Event> _localEvents = [];
Widget _buildSyncDialog(BuildContext context) {
SensorConnector sensorConnector = SensorConnector();
return WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: const <Widget>[
Text('Syncing Events...'),
//TODO: show progress bar here., Horizontal progress bar?
//TODO: show text XX pending events. count down
],
),
actions: <Widget>[
TextButton(
onPressed: () {
//Start sync process but only once.
},
child: const Text('Start'), //Change text to Syncing... during Sync process.
),
TextButton(
onPressed: () {
// Depending on state. Cancel or close. TODO: implement statemachine.
Navigator.of(context).pop();
},
child: const Text('Close'), // Change to Cancel during Sync process.
),
],
)
);
}
Future<void> fetchEventsFromDb() async{
final EventStoreInstance event = EventStoreInstance();
int pendingEvents = 0;
......@@ -256,6 +296,14 @@ class _ViewEvents extends State<ViewEvents> {
label: const Text('Sync'),
onPressed: () {
syncEvents();
//showDialog(
// barrierDismissible: false,
// context: context,
// builder: (BuildContext context) => _buildSyncDialog(context),
//);
},
),
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment