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

Would you like to support multiple selections? #10

Open
13byte opened this issue Jun 13, 2022 · 8 comments
Open

Would you like to support multiple selections? #10

13byte opened this issue Jun 13, 2022 · 8 comments

Comments

@13byte
Copy link

13byte commented Jun 13, 2022

I am a beginner.
I'm trying to make a library reservation app, so I have to support multiple selections, but I don't know how to do it no matter how hard I look

@13byte 13byte changed the title Would you like to support multiple choices? Would you like to support multiple selections? Jun 13, 2022
@radikris
Copy link
Owner

hello @13byte . What do you mean by multiple selection? You mean booking multiple slots at the same time, like in one reservation?

@13byte
Copy link
Author

13byte commented Jun 14, 2022

hello @13byte . What do you mean by multiple selection? You mean booking multiple slots at the same time, like in one reservation?

yes, that's right
If you break it into 30 minutes, you can reserve only one 30 minutes and the next 30 minutes. I'd like to change it so that I can choose several slots at once and make a reservation.

@radikris
Copy link
Owner

radikris commented Jul 1, 2022

currently the logic does not support this, but when I will have enough time will make this feature as well. I will keep you updated

@Loki1976
Copy link

Loki1976 commented Jul 7, 2022

This would make this package the bomb

@igornast
Copy link

igornast commented Jul 31, 2022

Would be also great to define a service with a longer duration (for example 4H) and make it available to reserve the service with more start date/hour flexibility.
If now I define that my working hours are 8-16 and specify that service X is 4 hours long there will be only 2 slots available - 8:00 and 12:00.

Do you @radikris think that adding support for more "start" options, like 8:15, 8:30, 8:45 ... (depends on configuration) would be difficult?
This will also take the widget to a higher level. 😃

@radikris
Copy link
Owner

@igornast great insight. Yes, I also thought of this issue, but the idea is not so easy at all.
I mean, yes we could add an extra starting parameter, but the main issue is, that what if you want slots that are not next to each other
For example currently, if you have 30 minutes slots:

you can only have: 8:00 - 8:30 - 9:00 etc
But what if you would like to get: 8:00 - 8:45 - 9:25 or something like that

You could play around with the breaktime property, but that is not so straightforward either.

@igornast
Copy link

You are right, but please keep in mind that afaik the most common case is 15 minutes gaps. The most popular solution in booking apps is like 8:00, 8:15, 8:30, 8:45...

Remember also that if you will complicate it too much it'll become harder to maintain the widget and build new features 😛

@marcussenise
Copy link

I did that just editing the bookingEnd on the uploadBooking method, like that:
bookingServiceModel.bookingEnd = newBooking.bookingStart.add(const Duration(hours: 4));
So when someone book, the next 4 hours are blocking too. The thing that I trying to do now is to check the next 4 hours to don't cause any time conflicts.

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

No branches or pull requests

5 participants