How to set availability with date and time using Draftbit?

Options

I want to set certain available date and time slots in the app, so that users can book that time and once someone books one slot it will not be shown again, using Draftbit as frontend.

For example: One doctor is available on 10/06/2023 from 9am to 11am, considering each bookings to be 15 minutes there should be 8 time slots after 15minutes that can be booked.

Please help.

Comments

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi,

    I'm happy to help, but can specify what is causing problems here. Are you encountering any errors while trying to built this? Can you show your endpoint so far?

  • Harshajit
    Harshajit Member
    Options

    hi Pawel,

    I don’t know how i can set this field of date and time in table with availability. Can u please show how i can start?

    I want to set available date and time slots in the table.

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    I would create an object in users table with start and end hour for every day of the week as integers. that is our availability. Based on this availability template I would create a schedule (in a new schedule table) every now and then (how often you need) for the next week or month (for how long in the future you need). Then you need to fill this schedule with doctor meetings, that would be another table with relation to users (doktors and patients), exact date and hour as well as the time block of the event.

  • Harshajit
    Harshajit Member
    Options

    thank u Pawel

    Is there any video or screenshots or documentation references u can provide please would be very useful

    Also I would need all these availability to be accessible in draftbit front end

  • Harshajit
    Harshajit Member
    Options

    Hi can u please help me with a screenshot or video bit please?

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi, what this video should include? I don't have a solution like that ready

  • Harshajit
    Harshajit Member
    Options

    how to connect each table and how can i schedule one user to certain time slot for a doctor?

    For example i have 2 tables 1 for users details

    Another for doctors details

    How can a user schedule a certain tome slot in a doctor’s appointment availability.