Open joel-shiftdelivery opened 3 years ago
It looks like the "Same day cutoff" is implemented only for "Mode avancé" https://github.com/coopcycle/coopcycle-web/blob/dc14efdd688aef4e0cdd71840d130f3749e1bac4/src/Form/Type/TimeSlotChoiceLoader.php#L122
And I see that the "Mode simple" is going to be deprecated (#2511) https://docs.coopcycle.org/en/admin/deliveries/timeslots/#delivery-time-slots is it possible for you to switch to using "Mode avancé"?
Actually, what I wrote applies to Obtaining time slots endpoint https://docs.coopcycle.org/en/developer/time-slots/
and it looks like the endpoint that creates deliveries https://docs.coopcycle.org/en/developer/deliveries/ does not perform any checks. I'm able to create a delivery in the past, for example. How do you see that the "Prior notice" is taken into account?
Describe the bug When placing an order via the API, it seems that the Same day cutoff is not respected for at least some time slots. With a 10am cutoff set for a 900-1700 time slot, Orders are still able to be places at 1600.
Similarly, for a 1800-2100 time slot with a 1600 cutoff, the time slot was returning as an option and allowed orders to be placed at 16:15.
To Reproduce Steps to reproduce the behavior:
Expected behavior The Same day cutoff time should be respected for time slots via API
Screenshots
Additional context The "Prior notice" seems to be working even though the same day cutoff does not.