Streamlining Bookings and Filtering Dates for Improved Performance
In this meeting, James discusses an API call related to past and upcoming bookings in Webflow. He explains that he has a function to retrieve past bookings by querying all records from the bookings table. However, he encounters an issue with the date, as it is coming from an error table called availabilities.
James suggests using a filter to only retrieve past bookings based on the start date being less than the current date. He considers creating a date variable to facilitate this filtering process. The other participants suggest using a different approach by filtering availabilities instead of bookings, as the dates are more closely connected to availabilities.
They discuss the relationships between availabilities and bookings, and the participants recommend getting a list of availabilities where the booked field is true. By using the add-on feature in Webflow, James can access the related information about the bookings associated with each availability.
James agrees with this suggestion and acknowledges that it will make the filtering process more straightforward. However, he mentions that implementing this change will require some time, and they decide to address it later due to time constraints. The participants emphasize the importance of choosing the primary table for filtering and highlight the performance considerations associated with this decision.
They conclude the meeting by expressing satisfaction with the progress made and plan to reconvene the following day to continue working on the project.