mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 21:24:35 +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,17 @@ import { NextRequest, NextResponse } from 'next/server'
|
||||
import { supabaseAdmin } from '@/lib/supabase/admin'
|
||||
|
||||
/**
|
||||
* @description Apply no-show penalty to a specific booking
|
||||
* @param {NextRequest} request - Body with booking_id and optional override_by (admin)
|
||||
* @returns {NextResponse} Penalty application result
|
||||
* @description Applies no-show penalty to a booking, retaining the deposit and updating booking status
|
||||
* @param {NextRequest} request - HTTP request containing booking_id and optional override_by (admin ID who approved override)
|
||||
* @returns {NextResponse} JSON with success status and updated booking data after penalty application
|
||||
* @example POST /api/aperture/bookings/no-show { booking_id: "...", override_by: "admin-id" }
|
||||
* @audit BUSINESS RULE: No-show penalty retains 50% deposit and marks booking as no_show status
|
||||
* @audit BUSINESS RULE: Admin can override penalty by providing override_by parameter
|
||||
* @audit SECURITY: Validates booking exists and can be marked as no-show
|
||||
* @audit Validate: Ensures booking is within no-show window (typically 12 hours before start time)
|
||||
* @audit Validate: If override is provided, validates admin permissions
|
||||
* @audit PERFORMANCE: Uses RPC function 'apply_no_show_penalty' for atomic penalty application
|
||||
* @audit AUDIT: No-show penalties are logged for customer tracking and revenue protection
|
||||
*/
|
||||
export async function POST(request: NextRequest) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user