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,17 @@ import { NextRequest, NextResponse } from 'next/server'
|
||||
import { supabaseAdmin } from '@/lib/supabase/admin'
|
||||
|
||||
/**
|
||||
* @description Fetches comprehensive dashboard data including bookings, top performers, and activity feed
|
||||
* @description Fetches comprehensive dashboard data including bookings, top performers, activity feed, and KPIs
|
||||
* @param {NextRequest} request - HTTP request with query parameters for filtering and data inclusion options
|
||||
* @returns {NextResponse} JSON with bookings array, top performers, activity feed, and optional customer data
|
||||
* @example GET /api/aperture/dashboard?location_id=...&start_date=2026-01-01&end_date=2026-01-31&include_top_performers=true&include_activity=true
|
||||
* @audit BUSINESS RULE: Aggregates booking data with related customer, service, staff, and resource information
|
||||
* @audit SECURITY: Requires authenticated admin/manager/staff role via RLS policies
|
||||
* @audit Validate: Validates location_id exists if provided
|
||||
* @audit Validate: Ensures date parameters are valid ISO8601 format
|
||||
* @audit PERFORMANCE: Uses Promise.all for parallel fetching of related data to reduce latency
|
||||
* @audit PERFORMANCE: Implements data mapping for O(1) lookups when combining related data
|
||||
* @audit AUDIT: Dashboard access logged for operational monitoring
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user