Let a household choose to be paid for the red days

Asking for a full week off never spent anything on the Saturday, the
Sunday or a holiday, and a test now says so outright rather than leaving
it to be rediscovered. Those days are free because vacation cannot be
taken on a day that is not a working day.

Parental benefit is a payment rather than a schedule, though, so it can
be drawn on a red day to turn an unpaid day off into a paid one — at the
cost of a day the family would otherwise keep. That is now a workspace
setting, off by default, and it never reaches for a vacation day. With it
off the planner behaves exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ei7gCZzdd751uZtPzb1Pep
This commit is contained in:
2026-09-19 14:28:38 +02:00
parent 1837154225
commit b87ad0e7ad
18 changed files with 511 additions and 10 deletions
@@ -69,6 +69,30 @@ class TestWorkspaceUpdate:
with pytest.raises(NotFoundError):
await workspace_service.update_workspace(uuid4(), name="Whatever")
async def test_take_pl_on_red_days_defaults_to_false(
self,
workspace_service: WorkspaceService,
) -> None:
ws = await workspace_service.create_workspace("New Workspace")
assert ws.take_pl_on_red_days is False
async def test_update_take_pl_on_red_days(
self,
workspace_service: WorkspaceService,
) -> None:
ws = await workspace_service.create_workspace("Workspace")
updated = await workspace_service.update_workspace(ws.id, take_pl_on_red_days=True)
assert updated.take_pl_on_red_days is True
# Persisted, not just returned in-memory -- re-fetch to be sure.
refetched = await workspace_service.get_workspace(ws.id)
assert refetched.take_pl_on_red_days is True
# `None` (the default) means "leave unchanged", mirroring `name`'s
# omit-to-keep convention.
unchanged = await workspace_service.update_workspace(ws.id, name="Renamed")
assert unchanged.take_pl_on_red_days is True
class TestRenameMember:
"""Rename a workspace member's display name (placeholder or self)."""