You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
continuous-integration/drone/push Build is passing
Details
Implemented complete UI foundation for booking drawer with provider gating:
**Components Created:**
1. **ProviderBanner** (src/components/bookings/ProviderBanner.tsx)
- Displays informational banner for FairPlay clubs
- "This club is managed by {provider}" messaging
- Only shows for non-local providers
- Blue theme with Info icon
2. **CapacityDisplay** (src/components/bookings/CapacityDisplay.tsx)
- Shows "X / Y booked · Z remaining" format
- Three variants: default, compact, inline
- Color-coded availability (red=full, orange=low, gray=available)
- Responsive text sizing
3. **NotifyPlayersToggle** (src/components/bookings/NotifyPlayersToggle.tsx)
- Toggle for controlling player notifications
- Defaults to ON (true)
- Persists preference to localStorage (key: booking_admin_notify_players)
- SSR-safe with hydration protection
- Bell/BellOff icon feedback
- Exports getStoredNotifyPreference() helper
4. **BookingDrawer** (src/components/bookings/BookingDrawer.tsx)
- Main booking management UI (360+ lines)
- Provider-aware: disables actions for FairPlay clubs
- Displays: time, location, capacity, attendees, booked_by
- Status badges (confirmed/cancelled/no_show)
- Attendee type badges (app_user/guest/remote_member)
- Action buttons: Move, Edit Attendees, Cancel (hidden for FairPlay)
- ETag support for optimistic concurrency
- Loading and error states
- Integrates all sub-components
**Features:**
- Read-only mode for FairPlay bookings (provider.manages_slot_storage === false)
- Capacity display with color-coded availability
- Notification toggle with localStorage persistence
- Professional slate theme matching existing UI
- Fully typed with BookingDetail interface
- Error handling with user-friendly messages
**TODO Placeholders:**
- Move booking flow (button wired, implementation pending)
- Edit attendees flow (button wired, implementation pending)
- Cancel booking flow (button wired, implementation pending)
Related: Phase 3, Booking Admin API v1.1, BUILD #22
|
1 month ago | |
|---|---|---|
| .. | ||
| app | 1 month ago | |
| assets | 1 month ago | |
| components | 1 month ago | |
| config | 1 month ago | |
| constants | 1 month ago | |
| contexts | 1 month ago | |
| hooks | 1 month ago | |
| lib | 1 month ago | |
| services | 1 month ago | |
| styles | 1 month ago | |
| types | 1 month ago | |
| utils | 1 month ago | |
| index.css | 1 month ago | |
| middleware.ts | 1 month ago | |