205stelzear / elections

Website / Webapp to create and view elections for any Scout group
https://205stelzear-elections.v-ed.ca/
MIT License
0 stars 0 forks source link

Handle shared election page closing or going to local election #74

Open V-ed opened 4 years ago

V-ed commented 4 years ago

This is a continuation of PR #68

TODOs

V-ed commented 4 years ago

The data object would have a new field, named currentlyHasSeat that would track if the current election has a seat taken. This will be used to load the election back again if the connection is broken.


Actually... thinking about it, we already kinda handle problems of sending votes by storing the votes array in a temporary variable and querying that variable in the go_to_next_voter method...

I should just simply use that variable to try again on load if there were errors! That variable should therefore be added to the data when there is errors, so I can handle it later on. Don't take a seat, just send the votes that were saved on error (maybe after confirmation?).

That would actually fix all the things! Maybe you shouldn't even need that much of a lease-seat after all! But it would be useful if a device dies, not only that it loses internet.