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:
@@ -1,9 +1,14 @@
|
||||
/**
|
||||
* @description Payroll management API with commission and tip calculations
|
||||
* @audit BUSINESS RULE: Payroll based on completed bookings, base salary, commissions, tips
|
||||
* @audit SECURITY: Only admin/manager can access payroll data via middleware
|
||||
* @audit Validate: Calculations use actual booking data and service revenue
|
||||
* @audit PERFORMANCE: Real-time calculations from booking history
|
||||
* @description Retrieves payroll calculations for staff including base salary, commissions, tips, and hours worked
|
||||
* @param {NextRequest} request - HTTP request with query parameters: staff_id, period_start (default 2026-01-01), period_end (default 2026-01-31), action (optional 'calculate')
|
||||
* @returns {NextResponse} JSON with success status and payroll data including earnings breakdown
|
||||
* @example GET /api/aperture/payroll?staff_id=...&period_start=2026-01-01&period_end=2026-01-31&action=calculate
|
||||
* @audit BUSINESS RULE: Calculates payroll based on completed bookings within the specified period
|
||||
* @audit BUSINESS RULE: Commission is 10% of service revenue, tips are 5% of service revenue
|
||||
* @audit SECURITY: Requires authenticated admin/manager role via middleware
|
||||
* @audit Validate: Ensures staff member exists and has completed bookings in the period
|
||||
* @audit PERFORMANCE: Computes hours worked from booking start/end times
|
||||
* @audit AUDIT: Payroll calculations logged for financial compliance and transparency
|
||||
*/
|
||||
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
|
||||
Reference in New Issue
Block a user