mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 14:24:27 +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,9 +2,15 @@ import { NextRequest, NextResponse } from 'next/server'
|
||||
import { supabaseAdmin } from '@/lib/supabase/admin'
|
||||
|
||||
/**
|
||||
* @description Get staff performance report for date range
|
||||
* @param {NextRequest} request - Query params: location_id, start_date, end_date
|
||||
* @returns {NextResponse} Staff performance metrics per staff member
|
||||
* @description Generates staff performance report with metrics for a specific date range and location
|
||||
* @param {NextRequest} request - HTTP request with query parameters: location_id, start_date, end_date (all required)
|
||||
* @returns {NextResponse} JSON with success status and array of performance metrics per staff member
|
||||
* @example GET /api/aperture/finance/staff-performance?location_id=...&start_date=2026-01-01&end_date=2026-01-31
|
||||
* @audit BUSINESS RULE: Performance metrics include completed bookings, revenue generated, hours worked, and commissions
|
||||
* @audit SECURITY: Requires authenticated admin/manager role via RLS policies
|
||||
* @audit Validate: All three parameters (location_id, start_date, end_date) are required
|
||||
* @audit PERFORMANCE: Uses RPC function 'get_staff_performance_report' for complex aggregation
|
||||
* @audit AUDIT: Staff performance reports used for commission calculations and HR decisions
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user