theonlysam / bookthecourt

MIT License
0 stars 0 forks source link

Booking timeslots #12

Open theonlysam opened 11 months ago

theonlysam commented 11 months ago

The bookings are made against preset individual 1 hr timeslots e.g 5pm, 6pm, 7pm etc. In the period 6am to 9pm All the booking slots for each day should be displayed and the available ones the user would be able to select and book. The already booked ones the user should be able to see who has booked it and the players.

How do we treat this logic, add all the timeslots to the database and then update them as the users book? Do we store the timeslots in a table?

theonlysam commented 11 months ago

I think this represents kinda similar concept I'm envisioning -> https://github.com/tylertaewook/tutor-scheduler-django

bbelderbos commented 11 months ago

I think we should only save the booked ones and display the open ones in the calendar based on the time slot rules above.

Otherwise we have to store an infinite amount of rows and continuously update it as we go. I rather keep the database lean, but that does not exclude the view/template from showing available slots, right?

I like the design of the project you sent.

bbelderbos commented 11 months ago

Do this first for today / tomorrow for members first, not a full calendar view = too complex for starters.

bbelderbos commented 11 months ago

Have a list of time slots (Python list), and each time slot has a boolean if it has been booked (cross checking booking db table), then in the template you can display green free or grey booked based on this boolean.