mirror of
https://github.com/Dvorinka/Bookra.git
synced 2026-10-28 15:51:15 +00:00
feat(booking): stepped public booking flow with service/staff selection
The public booking page showed a capped flat preview of slots with no way to pick a service, day, or staff member. Replaces it with a stepped flow: pick service, optional staff preference, pick a day, pick a time. Backend: availability accepts serviceId/staffId/date filters (default response unchanged for the embed widget), a new public catalog endpoint exposes bookable services and active staff, and slots carry staffName. Slot generation and booking creation now honor tenant-wide and per-staff blocked days; appointment requests must fit inside a matching availability rule and reference tenant-owned, active staff and locations. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
09f780e7a6
commit
d9aa29dbcb
9 files changed
+940
-118
No files matched your search
@@ -114,6 +114,7 @@ type TimeSlot struct {
|
||||
ServiceID *string `json:"serviceId,omitempty"`
|
||||
ClassSessionID *string `json:"classSessionId,omitempty"`
|
||||
StaffID *string `json:"staffId,omitempty"`
|
||||
StaffName *string `json:"staffName,omitempty"`
|
||||
LocationID *string `json:"locationId,omitempty"`
|
||||
StartsAt string `json:"startsAt"`
|
||||
EndsAt string `json:"endsAt"`
|
||||
@@ -129,6 +130,24 @@ type PublicAvailability struct {
|
||||
Slots []TimeSlot `json:"slots"`
|
||||
}
|
||||
|
||||
type PublicService struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
DurationMinutes int `json:"durationMinutes"`
|
||||
PriceCents int `json:"priceCents"`
|
||||
}
|
||||
|
||||
type PublicStaff struct {
|
||||
ID string `json:"id"`
|
||||
DisplayName string `json:"displayName"`
|
||||
}
|
||||
|
||||
type PublicCatalog struct {
|
||||
TenantSlug string `json:"tenantSlug"`
|
||||
Services []PublicService `json:"services"`
|
||||
Staff []PublicStaff `json:"staff"`
|
||||
}
|
||||
|
||||
type CreateBookingRequest struct {
|
||||
TenantSlug string `json:"tenantSlug"`
|
||||
BookingMode string `json:"bookingMode"`
|
||||
|
||||
Reference in new issue
Block a user