Bugfixes in dashboard and calendar

This commit is contained in:
2026-06-14 19:02:20 +02:00
parent 566595984f
commit d556ce0f6f
6 changed files with 699 additions and 31 deletions
+22
View File
@@ -91,3 +91,25 @@ class PlanningService:
if entity is None:
raise NotFoundError(f"PlannedLeaveDay {planned_leave_day_id} not found")
return entity
async def list_by_child(self, child_id: UUID) -> list[PlannedLeaveDay]:
"""Get all planned days for a child across workspaces."""
return await self._repo.list(child_id=child_id)
async def update(
self,
planned_leave_day_id: UUID,
day_type: str | None = None,
is_dubbeldag: bool | None = None,
) -> PlannedLeaveDay:
"""Update a planned day (partial update)."""
entity = await self._repo.get_by_id(planned_leave_day_id)
if entity is None:
raise NotFoundError(f"PlannedLeaveDay {planned_leave_day_id} not found")
if day_type is not None:
entity.day_type = day_type
if is_dubbeldag is not None:
entity.is_dubbeldag = is_dubbeldag
return await self._repo.update(planned_leave_day_id, entity)