Next.js Discord

Discord Forum

Availability for barber

Unanswered
Ojos Azules posted this in #help-forum
Open in Discord
Ojos AzulesOP
I am working on establishing availability for my barbers. I have set start and end times for each barber, and I aim to generate time slots that customers can book appointments within. For instance, if the start time is 10:00 and the end time is 9:00, I want my form to display available time slots every half hour from 10:00 to 9:00.

How can i achieve that?

My startTime & endTime are saved as String in my database.

10 Replies

you code
this isn't really a next.js related issue
you code that using javascript
ask gpt or something
if you need idea
Ojos AzulesOP
I tried with gpt but didnt give any good solution
I doubt you'll get help here, anyways good luck 👍
Ojos AzulesOP
thank you
American Crow
You need some basic knowledge.
Database Model would look something like this
Here is a blog article for your use case
https://vertabelo.com/blog/a-database-model-to-manage-appointments-and-organize-schedules/
Ojos AzulesOP
Thank you!