Signing up for and confirming a pickup *after* the pickup time
Summary
A FS should not be able to sign up for a pickup after the pickup time has passed. A BIEB should be able to confirm a pickup after the pickup time has passed.
Steps to reproduce
Let's say it's 11 am now, and there is an empty pickup slot for today at 10 am (so one hour in the past).
What is the current bug behavior?
A FS who is not BIEB is able to request a pickup for the slot in the past. A BIEB is not able to confirm the pickup request.
What is the expected correct behavior?
-
A normal FS should not be able to sign up for a pickup slot in the past. Since it's possible that the web page was loaded before the pickup time, but the click requesting the pickup comes after the pickup time, it should be the server who performs the $ago check and return an error "This pickup slot lies in the past".
-
Imagine a FS requesting at 9 am a pickup for a pickup slot at 10 am (should be able to do so). Now imagine that the BIEB sees the request at 11 am. The BIEB should be able to confirm the request, even though the pickup time is in the past.
Relevant error messages and/or screenshots
Possible fixes
Apparently in the code there is a check: "is 'now' after the pickup time?" for the BIEB. This check should be moved from the BIEB to the FS.