Phase 1: Fix TypeScript compilation — add missing API functions and fix hook signatures
- Add 8 missing API client functions (getBreakPeriods, createBreakPeriod, deleteBreakPeriod, getTips, getParentalLeave, getPlannedDays, createPlannedDay, deletePlannedDay) - Fix useAnalytics to accept optional childId parameter - Fix ApiError strict optional properties handling - Export HeaderProps from Header component - Update hook tests to use correct data structures and optional parameters npx tsc --noEmit now passes with zero errors. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ export function usePlannedDays(workspaceId: string | null, childId?: string): Us
|
||||
if (!workspaceId) throw new Error('Workspace not selected')
|
||||
const result = await api.createPlannedDay(workspaceId, childId, {
|
||||
date,
|
||||
day_type: leaveType,
|
||||
leaveType,
|
||||
})
|
||||
await fetch()
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user