-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group orders per user #529
Comments
The current behavior is intended and @KiOui and I actually discussed it a lot (considering both the intended behavior but also the maintainability and elegance of the software). I think this could cause some unwanted edge cases if there is a large delay between the orders. What should happen if there's 15 minutes in-between the orders? I agree that you might want to do this, but only for a 1 minute window or something. |
For a x-minute window I think we'll need a separate sort function. If you don't mind that extra layer of complexity that would be the nicest solution indeed. |
@JobDoesburg I think this order_by should be changed, is that assumption correct? |
Yes so it seems. You probably want to group on user and sort on the min order time of each group. But only group if the order times are at most x minutes apart, the latter of which I wouldn't directly know how to implement |
I would maybe even go as far and just implement this in the javascript on the frontend. |
Noooooooo |
I think you want to stay as close as possible to the source of truth here, hence change it right where that truth is generated |
Group orders based on users and sort queue based on the first order time.
This would remove the case where someone is clicking their Tosti at the same speed my grandpa uses his phone results in a lot of in-between orders. This simulates the old-fashioned method of serving customers customer at a time.
The text was updated successfully, but these errors were encountered: