mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 18:24:31 +00:00
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:
@@ -2,7 +2,16 @@ import { NextRequest, NextResponse } from 'next/server'
|
||||
import { supabaseAdmin } from '@/lib/supabase/admin'
|
||||
|
||||
/**
|
||||
* @description Retrieves detailed availability time slots for a date
|
||||
* @description Retrieves detailed availability time slots for a specific location, service, and date
|
||||
* @param {NextRequest} request - HTTP request with query parameters location_id, service_id (optional), date, and time_slot_duration_minutes (optional, default 60)
|
||||
* @returns {NextResponse} JSON with success status and array of available time slots with staff count
|
||||
* @example GET /api/availability/time-slots?location_id=...&service_id=...&date=2026-01-21&time_slot_duration_minutes=30
|
||||
* @audit BUSINESS RULE: Returns only time slots where staff availability, resource availability, and business hours all align
|
||||
* @audit SECURITY: Public endpoint for booking availability display
|
||||
* @audit Validate: Ensures location_id and date are valid and required
|
||||
* @audit Validate: Ensures date is in valid YYYY-MM-DD format
|
||||
* @audit PERFORMANCE: Uses optimized RPC function 'get_detailed_availability' for complex availability calculation
|
||||
* @audit AUDIT: High-volume endpoint, consider rate limiting in production
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user