mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 19:24:32 +00:00
docs: add comprehensive code comments, update README and TASKS, create training and troubleshooting guides
- Add JSDoc comments to API routes and business logic functions - Update README.md with Phase 2 status and deployment/production notes - Enhance TASKS.md with estimated timelines and dependencies - Create docs/STAFF_TRAINING.md for team onboarding - Create docs/CLIENT_ONBOARDING.md for customer experience - Create docs/OPERATIONAL_PROCEDURES.md for daily operations - Create docs/TROUBLESHOOTING.md for common setup issues - Fix TypeScript errors in hq/page.tsx
This commit is contained in:
@@ -17,6 +17,9 @@ async function validateAdmin(request: NextRequest) {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Creates a booking block for a resource
|
||||
*/
|
||||
export async function POST(request: NextRequest) {
|
||||
try {
|
||||
const isAdmin = await validateAdmin(request)
|
||||
@@ -76,6 +79,9 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Retrieves booking blocks with filters
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const isAdmin = await validateAdmin(request)
|
||||
@@ -151,6 +157,9 @@ export async function GET(request: NextRequest) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Deletes a booking block by ID
|
||||
*/
|
||||
export async function DELETE(request: NextRequest) {
|
||||
try {
|
||||
const isAdmin = await validateAdmin(request)
|
||||
|
||||
@@ -17,6 +17,9 @@ async function validateAdminOrStaff(request: NextRequest) {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Marks staff as unavailable for a time period
|
||||
*/
|
||||
export async function POST(request: NextRequest) {
|
||||
try {
|
||||
const hasAccess = await validateAdminOrStaff(request)
|
||||
@@ -119,6 +122,9 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Retrieves staff unavailability records
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const hasAccess = await validateAdminOrStaff(request)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import { supabaseAdmin } from '@/lib/supabase/client'
|
||||
|
||||
/**
|
||||
* @description Retrieves available staff for a time range
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const { searchParams } = new URL(request.url)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import { supabaseAdmin } from '@/lib/supabase/client'
|
||||
|
||||
/**
|
||||
* @description Retrieves detailed availability time slots for a date
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const { searchParams } = new URL(request.url)
|
||||
|
||||
Reference in New Issue
Block a user