O1SoftwareNetwork / repairs

0 stars 5 forks source link

Connect official calendar to Schedule form component #24

Open jaygabe opened 1 month ago

jaygabe commented 1 month ago

Right now, the calendar and date input in the Schedule component within the Signup path allows users to schedule an appointment at any time.

You'll find this functionality inside:

src/app/signup/components/schedule

We need this calendar to only allow customer's to select a date and time that is available.

We'll have a Gmail or Outlook calendar with all of the appointments scheduled, and our Schedule component should import this data of currently scheduled appointments and use this data to prevent the customer from selecting a date or time that is already selected and in the calendar.

Another option is storing appointments in the database and using this information to block off certain spots, but I think using a platform that already exists will be easier increase development speed. If later we want to create our own custom calendar to ensure all of our data stays within our application and is not shared with other companies, this should be fine. But for now, just getting this functionality set up with Gmail or Outlook should be fine.

If eventually there are hundreds of repair technicians, each repair technician will have their own calendar and the availabilities that display for the customer will be based on the repair technicians available within their area, but for now, we can just get the functionality set up with one calendar assuming one repair technician will be accepting all the work. Just something to think about as we develop this feature.

RaspBri commented 1 month ago

Connected to Google Calendar with Supabase for Oauth 2 API Authentication. Pushed all changes to my personal branch. I have only added functionality and need to refine the UI aspect of the app next. Then I will resolve any merge conflicts that arrise.

If you wish to test this app please reach out to me for the credentials. Here is a link to my recent code changes. https://github.com/RaspBri/repairs/blob/googleCalendar/src/app/signup/components/Schedule.tsx