Drop the direct apply path the calendar no longer uses

Applying a plan by itself stopped being something the interface does once
every edit began recomputing and saving in one call. The hook that posted
straight to the apply endpoint had no caller left, nor did its request type
or its fixture.

The response decoder stays, since the sync response embeds the same object,
and the two tests being deleted were the only ones checking how its collision
and rejection fields are renamed — that coverage moved onto the sync test
rather than leaving with the code it happened to live next to.
This commit is contained in:
2026-09-18 01:12:26 +02:00
parent d245390886
commit 9ac67933d4
8 changed files with 30 additions and 309 deletions
-22
View File
@@ -892,28 +892,6 @@ function toPlanApplyResponse(raw: RawPlanApplyResponse): import('@/types').PlanA
}
}
export async function applyPlan(
workspaceId: string,
days: import('@/types').ProposedDayApplyItem[],
replace: boolean,
): Promise<import('@/types').PlanApplyResponse> {
const raw = (await apiFetch('/plan/apply', {
method: 'POST',
body: JSON.stringify({
workspace_id: workspaceId,
days: days.map((d) => ({
date: d.date,
parent_personal_data_uuid: d.parentPersonalDataUuid,
child_id: d.childId,
day_type: d.dayType,
is_dubbeldag: d.isDubbeldag ?? false,
})),
replace,
}),
})) as RawPlanApplyResponse
return toPlanApplyResponse(raw)
}
interface RawPlanChange {
kind: string
date: string