Pickup Slot behaviour
Description
The Pickup handling logic is a bit ugly and I am refactoring it (which basically is a rewrite using the same database schema).
I would like to unify all pickup logic in a handful of backend methods that provide accurate information about pickup slots.
We have two types of pickup slots:
- Regular pickups, described by day-of-week and time
- Manual pickups, described by an exact date
I suggest the following behaviour:
- Regular pickups are the default people put in, e.g. every monday at 8pm 3 slots.
- Manual pickups can be used for
- actual manual pickups (next saturday, 3pm)
- overriding regular pickups (next monday, 8pm, does not happen -> 0 slots)
- extending regular pickups (next monday, 8pm, we need 5 slots)
That roughly fits the current behaviour on the store page (fsbetrieb), but would then be true everywhere else as well. I suggest the following transition behaviours:
- manual slot/time gets created for existing regular pickup
- has less slots than are already occupied on regular: Creation gets blocked. Bieb should manually remove people.
- has more slots than are already occupied: Additional slots will appear, currently signed up people stay signed up
- Every slot/time can be removed, the UI should provide a button: Manual slot with 0 fetchers is internally handled.
- Bieb can create a manual slot again later for the same time, which will be handled correctly internally (e.g. no duplicates)
To me this behaviour feels logically and not hard to implement and then get right everywhere... (Dashboard, Emails, profile, store page) Also, we get the external API nearly for free :-)
Edited by Matthias Larisch