Fix duplicate parsing of pickup slot date, Sentry error when replying in forum
What does this MR do?
Use correct comparison format for pickup slots determining what day it is
This had broken highlighting the current day's pickup slots, disabling interactions with slots in the past, and probably more.
Fix vue error when replying in forum
the dummy post had the wrong property defined, so an invalid date was being computed from createdAt===null instead of the "now" value.
this was broken since f10ed9b9 and caused quite some Sentry load.
How confident are you it won't break things if deployed?
99%.
Links to related issues
bug report slot highlight: https://yunity.slack.com/archives/C74JC2V26/p1586684885140700
Forum-reply example issue: https://sentry.io/share/issue/fb4b92228a9649858144bb936543ec09/
How to test
Best to compare the same situation before and after:
- login as store manager (or higher), go to store
- create a new pickup slot for today, time in the past
Expected:
- current day slot is highlighted in bold
- slot in the past cannot be joined, removed etc
and of course the second bugfix:
- go to any forum post
- write a reply, check the browser devtools console
Screenshots (if applicable)
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
Edited by Chris Oelmueller