Add marker for empty pickup slots
Closes #452 (closed)
What does this MR do?
Adds markers to the store menu if there are free pickup slots in the next few days. The markers are coloured: red for today and tomorrow, orange for [today+1 day ... today+3 days], yellow for [today+3 ... today+5]. The shopping cart is marked with the maximum priority, i.e. red if at least one store is red, and so on. Free slots are only considered if the foodsaver is not already signed into the same pickup time.
The next free slot is stored in the $_SESSION
, so it only takes effect after refreshing the session (logout) but this does not add too much load to the server.
How confident are you it won't break things if deployed?
Finding the correct next empty slot: works for me; added some unit tests
Layout/CSS: ~50%, might need some testing on different platforms
Links to related issues
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes -
asked someone for a code review -
joined #foodsharing-beta channel at https://slackin.yunity.org -
added an entry to CHANGELOG.md (description, merge request link, username(s)) -
Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings