Skip to content
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

Open
mark-boute opened this issue Dec 11, 2023 · 7 comments
Open

Group orders per user #529

mark-boute opened this issue Dec 11, 2023 · 7 comments
Assignees
Labels
feature New or improved functionality.

Comments

@mark-boute
Copy link
Collaborator

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.

1a          1a
2a    ===>  1b
2b          2a
1b          2b
@mark-boute mark-boute changed the title Group orders Group orders per user Dec 11, 2023
@KiOui KiOui added the feature New or improved functionality. label Dec 12, 2023
@JobDoesburg
Copy link
Collaborator

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.

@mark-boute
Copy link
Collaborator Author

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.

@mark-boute
Copy link
Collaborator Author

@JobDoesburg
Copy link
Collaborator

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

@mark-boute mark-boute self-assigned this Dec 13, 2023
@KiOui
Copy link
Owner

KiOui commented Dec 13, 2023

I would maybe even go as far and just implement this in the javascript on the frontend.

@JobDoesburg
Copy link
Collaborator

I would maybe even go as far and just implement this in the javascript on the frontend.

Noooooooo

@mark-boute
Copy link
Collaborator Author

I would maybe even go as far and just implement this in the javascript on the frontend.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New or improved functionality.
Projects
None yet
Development

No branches or pull requests

3 participants