feat(bookings): improve admin booking wizard and user dashboard

Backend:
- Enriched GetAllUserBookings response with calculated total_amount,
  amount_paid, and duration_minutes.
- Refactored GetBookingHandler to return a flat booking object matching
  frontend expectations.
- Added account_role to admin user list response and sorted users by
  booking activity.
- Corrected function name oo to AdminCreateBookingForUserHandler.

Frontend:
- Rebuilt BookingCreateModal into a 4-step wizard supporting guest
  bookings, service overrides, and real-time availability checks.
- Fixed account dashboard logic to correctly identify upcoming vs past
  bookings and sort unpaid items to the top.
- Extracted booking flow into a shared BookingFlow component.
- Redirected admin users from home page to /today.
This commit is contained in:
2026-02-12 22:15:10 +00:00
parent 2ace6d4d87
commit 50746595e7
34 changed files with 7688 additions and 5413 deletions
@@ -0,0 +1,31 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import { Button } from '$lib/components/ui/button';
export let canBack = false;
export let canNext = false;
export let isSubmitting = false;
export let nextLabel = 'Next';
export let submitLabel = 'Submit';
export let showSubmit = false;
const dispatch = createEventDispatcher();
</script>
<div class="flex justify-between">
<Button variant="outline" disabled={!canBack} onclick={() => dispatch('back')}>Back</Button>
{#if showSubmit}
<Button
disabled={!canNext || isSubmitting}
onclick={() => dispatch('submit')}
class="bg-primary text-primary-foreground"
>
{isSubmitting ? 'Processing...' : submitLabel}
</Button>
{:else}
<Button disabled={!canNext} onclick={() => dispatch('next')}>
{nextLabel}
</Button>
{/if}
</div>