/** * Swedish parental leave rule constants. * * These values mirror backend/app/config.py::LeaveRules and must be kept in sync. * They are the authoritative source for the domain rules governing föräldrapenning, * dubbeldagar, age-4 restrictions, and SGI protection. * * NOTE: These figures are common-case defaults. Children born before 2014, multiples * (tvillingtillägg), and single-custody arrangements differ and should become * configurable when tackled. Update both frontend and backend together. * * @see backend/app/config.py#LeaveRules * @see ARCHITECTURE.md#1 */ export const LEAVE_RULES = { // Total föräldrapenning entitlement and tier breakdown totalDaysPerChild: 480, sjukpenningDays: 390, // income-based tier lagstaNivaDays: 90, // flat low-rate tier // Default joint-custody split (per parent) daysPerParent: 240, reservedDaysPerParent: 90, // non-transferable ("reserverade dagar") // Derived: transferable days per parent (240 - 90) get transferableDaysPerParent(): number { return this.daysPerParent - this.reservedDaysPerParent; }, // Dubbeldagar: both parents taking leave for the same child on the same day maxDubbeldagar: 60, dubbeldagarMonthsLimit: 15, // only within the child's first 15 months // Age-4 rule: max 96 days may be saved after the child's 4th birthday maxSavableDaysAtAge4: 96, hardExpiryAgeYears: 12, // SGI protection and minimum work intensity sgiProtectedFirstMonths: 12, // protected regardless of days taken sgiMinDaysPerWeekAfterAge1: 5, // minimum to maintain SGI after age 1 // Default reserve for preschool planning days ("studiedagar") closures preschoolPlanningDaysPerYear: 6, // Statutory Swedish vacation days vacationDaysPerYear: 25, } as const; /** * Försäkringskassan's BankID login page, carrying a `goto` fragment so the * user lands on the "Min föräldrapenning" e-service after authenticating — * the page that shows "Dagar ni kan föra över" and where a transfer between * parents is actually made. Mirrors the URL shapes in * `backend/app/scrapers/fk_scraper.py` (`LOGIN_URL` / `MIN_FP_URL`); keep in * sync if FK moves the e-service. * * @see backend/app/scrapers/fk_scraper.py#LOGIN_URL */ export const FK_TRANSFER_LOGIN_URL = 'https://www.forsakringskassan.se/privatperson/logga-in' + '#/?goto=%2Fprivatperson%2Fmina-sidor%2Falla-e-tjanster%2Fmin-foraldrapenning';