Fix calendar style
This commit is contained in:
@@ -148,6 +148,16 @@ export async function updateWorkspace(
|
||||
})
|
||||
}
|
||||
|
||||
export async function addPartner(
|
||||
workspaceId: string,
|
||||
displayName: string,
|
||||
): Promise<{ uuid: string; name: string; salary_type: string; employment_status: string }> {
|
||||
return apiFetch(`/workspace/${workspaceId}/parents`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ display_name: displayName }),
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Vacation days (reference endpoint group — mirror this pattern for others)
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -289,13 +299,31 @@ export async function getPlannedDays(childId?: string): Promise<PlannedLeaveDay[
|
||||
return apiFetch(`/planned-days${query}`)
|
||||
}
|
||||
|
||||
export async function createPlannedDay(
|
||||
childId: string,
|
||||
payload: { date: string; leaveType: string },
|
||||
): Promise<PlannedLeaveDay> {
|
||||
export interface CreatePlannedDayPayload {
|
||||
workspace_id: string
|
||||
child_id: string
|
||||
parent_personal_data_uuid: string
|
||||
date: string
|
||||
day_type: 'sjukpenning' | 'lagsta' | 'vacation'
|
||||
is_dubbeldag?: boolean
|
||||
}
|
||||
|
||||
export async function createPlannedDay(payload: CreatePlannedDayPayload): Promise<PlannedLeaveDay> {
|
||||
return apiFetch(`/planned-days`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ ...payload, child_id: childId }),
|
||||
body: JSON.stringify(payload),
|
||||
})
|
||||
}
|
||||
|
||||
export interface UpdatePlannedDayPayload {
|
||||
day_type?: 'sjukpenning' | 'lagsta' | 'vacation'
|
||||
is_dubbeldag?: boolean
|
||||
}
|
||||
|
||||
export async function updatePlannedDay(id: string, payload: UpdatePlannedDayPayload): Promise<PlannedLeaveDay> {
|
||||
return apiFetch(`/planned-days/${id}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(payload),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user