feat: Add kiosk management, artist selection, and schedule management

- Add KiosksManagement component with full CRUD for kiosks
- Add ScheduleManagement for staff schedules with break reminders
- Update booking flow to allow artist selection by customers
- Add staff_services API for assigning services to artists
- Update staff management UI with service assignment dialog
- Add auto-break reminder when schedule >= 8 hours
- Update availability API to filter artists by service
- Add kiosk management to Aperture dashboard
- Clean up ralphy artifacts and logs
This commit is contained in:
Marco Gallegos
2026-01-21 13:02:06 -06:00
parent 24e5af3860
commit d27354fd5a
71 changed files with 3353 additions and 2701 deletions

View File

@@ -1,5 +1,13 @@
'use client'
/**
* @description Kiosk booking confirmation interface for customers arriving with appointments
* @audit BUSINESS RULE: Customers confirm appointments by entering 6-character short ID
* @audit SECURITY: Authenticated via x-kiosk-api-key header for all API calls
* @audit Validate: Only pending bookings can be confirmed; already confirmed shows warning
* @audit PERFORMANCE: Large touch-friendly input optimized for self-service kiosks
*/
import { useState } from 'react'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
@@ -12,7 +20,17 @@ interface BookingConfirmationProps {
}
/**
* BookingConfirmation component that allows confirming a booking by short ID.
* @description Booking confirmation component for kiosk self-service check-in
* @param {string} apiKey - Kiosk API key for authentication
* @param {Function} onConfirm - Callback when booking is successfully confirmed
* @param {Function} onCancel - Callback when customer cancels the process
* @returns {JSX.Element} Input form for 6-character booking code with confirmation options
* @audit BUSINESS RULE: Search by short_id (6 characters) for quick customer lookup
* @audit BUSINESS RULE: Only pending bookings can be confirmed; other statuses show error
* @audit SECURITY: All API calls require valid kiosk API key in header
* @audit Validate: Short ID must be exactly 6 characters
* @audit PERFORMANCE: Single API call to fetch booking by short_id
* @audit AUDIT: Booking confirmations logged through /api/kiosk/bookings/[shortId]/confirm
*/
export function BookingConfirmation({ apiKey, onConfirm, onCancel }: BookingConfirmationProps) {
const [shortId, setShortId] = useState('')

View File

@@ -1,5 +1,13 @@
'use client'
/**
* @description Kiosk walk-in booking flow for in-store service reservations
* @audit BUSINESS RULE: Walk-in flow designed for touch screen with large buttons and simple navigation
* @audit SECURITY: Authenticated via x-kiosk-api-key header for all API calls
* @audit Validate: Multi-step flow with service → customer → confirm → success states
* @audit PERFORMANCE: Optimized for offline-capable touch interface
*/
import { useState } from 'react'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
@@ -14,7 +22,17 @@ interface WalkInFlowProps {
}
/**
* WalkInFlow component that manages the walk-in booking process in steps.
* @description Walk-in booking flow component for kiosk terminals
* @param {string} apiKey - Kiosk API key for authentication
* @param {Function} onComplete - Callback when walk-in booking is completed successfully
* @param {Function} onCancel - Callback when customer cancels the walk-in process
* @returns {JSX.Element} Multi-step wizard for service selection, customer info, and confirmation
* @audit BUSINESS RULE: 4-step flow: services → customer info → resource assignment → success
* @audit BUSINESS RULE: Resources auto-assigned based on availability and service priority
* @audit SECURITY: All API calls require valid kiosk API key in header
* @audit Validate: Customer name and service selection required before booking
* @audit PERFORMANCE: Single-page flow optimized for touch interaction
* @audit AUDIT: Walk-in bookings logged through /api/kiosk/walkin endpoint
*/
export function WalkInFlow({ apiKey, onComplete, onCancel }: WalkInFlowProps) {
const [step, setStep] = useState<'services' | 'customer' | 'confirm' | 'success'>('services')