Rework balances around per-parent days left and deduce the partner from FK
Manual entry now takes one parent's sjukpenningnivå, lägstanivå and dubbeldagar left (plus optional reserved days) and derives the rest in build_snapshot, shared with the scraper. The scraper also reads the family panel and exposes a partner deduction; with two parents it is saved as a 'deduced' snapshot (migration 002). Parent count is the single source of entitlement: one member gets 480 days and 96 savable at age 4, two get 240 and 48 each. Workspaces are capped at two parents. Also lands the in-flight squash of migrations 002–011 into the initial schema and the removal of planning_mode. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -353,6 +353,7 @@ async def planning_service(
|
||||
parental_leave_repo: SQLiteParentalLeaveRepository,
|
||||
vacation_repo: SQLiteVacationDaysRepository,
|
||||
planning_engine_service: PlanningEngineService,
|
||||
leave_wish_repo: SQLiteLeaveWishRepository,
|
||||
) -> PlanningService:
|
||||
return PlanningService(
|
||||
planned_leave_repo,
|
||||
@@ -360,6 +361,7 @@ async def planning_service(
|
||||
parental_leave_repo,
|
||||
vacation_repo,
|
||||
planning_engine_service,
|
||||
leave_wish_repo=leave_wish_repo,
|
||||
)
|
||||
|
||||
|
||||
@@ -385,6 +387,7 @@ async def planning_service_with_uow(
|
||||
parental_leave_repo: SQLiteParentalLeaveRepository,
|
||||
vacation_repo: SQLiteVacationDaysRepository,
|
||||
planning_engine_service: PlanningEngineService,
|
||||
leave_wish_repo: SQLiteLeaveWishRepository,
|
||||
sqlite_uow: SQLiteUnitOfWork,
|
||||
) -> PlanningService:
|
||||
return PlanningService(
|
||||
@@ -393,6 +396,7 @@ async def planning_service_with_uow(
|
||||
parental_leave_repo,
|
||||
vacation_repo,
|
||||
planning_engine_service,
|
||||
leave_wish_repo=leave_wish_repo,
|
||||
uow=sqlite_uow,
|
||||
)
|
||||
|
||||
@@ -417,7 +421,6 @@ async def tips_service(
|
||||
personal_data_repo: SQLitePersonalDataRepository,
|
||||
vacation_repo: SQLiteVacationDaysRepository,
|
||||
leave_wish_repo: SQLiteLeaveWishRepository,
|
||||
workspace_repo: SQLiteWorkspaceRepository,
|
||||
tip_dismissal_repo: SQLiteTipDismissalRepository,
|
||||
) -> TipsService:
|
||||
return TipsService(
|
||||
@@ -427,6 +430,5 @@ async def tips_service(
|
||||
personal_data_repo,
|
||||
vacation_repo,
|
||||
leave_wish_repo,
|
||||
workspace_repo,
|
||||
tip_dismissal_repo,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user