Friday, May 12, 2023
1 change · master
Enhancements to existing features
Appointments can now reserve either staff members or physical resources such as restaurant tables, equipment, or shared capacity. Businesses can offer booking flows that account for group size, combined resources, shared availability, and manual confirmation when capacity thresholds are reached.
Original PR description
Take appointment with users and resources. This allow to take an appointment with users like before. But also to book a table in a restaurant or other type of material for yourself or multiple…
Take appointment with users and resources. This allow to take an appointment with users like before. But also to book a table in a restaurant or other type of material for yourself or multiple people. Changes and improvements: * An appointment can now be based on two things: - users (like the previous appointment type) - resources * The assign_method field is common for the two and has three mode: - resource_time: which let you select the resource/user before selecting a slot - time_resource: which let you select the slot before the resource or user - time_auto_assign: which correspond to the old random * A new model manage the appointment resources which inherits from resource.mixin * A resource is defined by multiple values: - capacity: the maximum capacity for a resource for a time slot - shareable: allows to share the resource with different attendees for a time slot - linked_resource_ids: the resources that can be combine with the actual resource to allow a bigger capacity (e.g. restaurant tables) * When based on resources, some options change for the appointment type: - An option is available (resource_manage_capacity) to display a capacity picker on the frontend to let the user select the number of persons, he want to booked for. - You can enable a manual confirmation for the appointment booked when a certain threshold is reached. When reached, the status of the attendee is set as 'needsAction' instead of 'accepted' * A new model is created to manage the appointment where multiple resources are used for a single event (appointment.booking.line). This one is used when the appointment type is based on resources to compute the availabilities for the slot based on the resource's info and the appointment already booked. The info taking into account are the capacity, the linked resources and the shareability of each resource. For example: - If we have a bar counter for 10 persons and is shareable. There is already a booking for 2 persons. So the remaining capacity for these case is 8 people. - If we have a restaurant with 3 tables for 4 persons and 1 table for 2 persons. And we have the 3 tables for 4 that can be linked to the table for 2. The maximum capacity that can be booked will be for 6 persons in this case. task-2453291