Give the analytics overview a per-parent, per-year balance series
Each parent projection now carries one entry per calendar year from birth to the fourth birthday: vacation earned, carried in, planned, left, carried out and expiring under Semesterlagen's 20-day floor and 5-year carry-over, plus parental-leave days used and left at year end with the age-4 clamp applied in the birthday year. The overview sums them into per-year totals. Frontend types, mapper and fixtures follow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XBRLomdLK9jF7wU7a8AA6H
This commit is contained in:
@@ -62,6 +62,12 @@ class LeaveRules(BaseModel):
|
||||
# allocator actually enforces (PLANNING_ENGINE_SPEC.md §9.2).
|
||||
min_vacation_days_per_year: int = 20
|
||||
|
||||
# Semesterlagen: a vacation day saved above the floor (see
|
||||
# `min_vacation_days_per_year`) may be carried forward for this many
|
||||
# years before it expires. Used by `AnalyticsService`'s per-year vacation
|
||||
# carry-forward bank (§ per-parent-per-year balance series).
|
||||
vacation_carry_forward_years: int = 5
|
||||
|
||||
@property
|
||||
def total_days_per_child(self) -> int:
|
||||
return self.sjukpenning_days + self.lagsta_niva_days
|
||||
|
||||
Reference in New Issue
Block a user