In my application I have a provider that has a schedule and clients that book appointment from the schedule. I need the following features.
Provider: - Be able to specify reoccurring availability. For example Mon 9-5, Tues 10-3, etc. - Be able to black out datas. For example - not available on this Mon. - Be able to add single, not reoccurring dates/times slots. For example - This Sat 9-5.
Customer: - Be able to book single appointments. - Be able to book reoccurring appointments. (Every Mon 9-4).
So far I came up with 3 options:
1.Create a event table:
a) With the basic columns eventdate, starttime, endtime, with other details for the event - these are the busy times so are what you block out on the calendar
b) Recurring Events - add columns: - isrecurring - defaults to 0 - recurrencetype (daily, weekly, monthly) - recurevery (a count of when the recurrence will occur) - mon, tue, wed, thur, fri, sat, sun - days of the week for weekly recurrence - month and dayofmonth - for monthly recurrence
2.The challenge comes when creating the recurring events on the calendar: - if you create all of them at once (say for the next 6 months), whenever you edit one the others have to be updated - If you only create an event when the previous one has passed then you need complex logic to display the calendars for future dates
3.You also need rules to take care of whether events are allowed to overlap each other, what resources are to be used, how far ahead the events can be scheduled
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With