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:
+37
-5
@@ -4,11 +4,16 @@
|
||||
|
||||
This is NOT a real Försäkringskassan page dump — it is a hand-built,
|
||||
minimal HTML fragment that reproduces only the DOM structure and CSS
|
||||
selectors that `app/scrapers/fk_scraper.py::_extract_parental_leave`
|
||||
reads (see `_SEL` in that module). All names, day counts, and amounts
|
||||
below are fictitious (see F1 of the scraper/config/ops security audit —
|
||||
the previous fixture was a real capture containing a developer's
|
||||
family's actual FK balances and was removed from the repo).
|
||||
selectors that `app/scrapers/fk_scraper.py::_extract_parental_leave` and
|
||||
`_extract_family_summary` read (see `_SEL` in that module). All names, day
|
||||
counts, and amounts below are fictitious (see F1 of the scraper/config/ops
|
||||
security audit — the previous fixture was a real capture containing a
|
||||
developer's family's actual FK balances and was removed from the repo).
|
||||
|
||||
The `forDigOchAnnanForalder` ("för dig och annan förälder") panel's
|
||||
`visa-dagar` block below is an ASSUMED structure mirroring `forDig`'s —
|
||||
the real FK markup for this panel has not yet been captured; see the
|
||||
comment on `_SEL.FAMILY*` in `fk_scraper.py`.
|
||||
-->
|
||||
<html lang="sv">
|
||||
<head>
|
||||
@@ -56,6 +61,33 @@
|
||||
<div class="f-panel__header"><h4>Totalt för Testbarn</h4></div>
|
||||
<div class="f-panel__body">
|
||||
<p>Exempel på belopp: 1 234 kronor för 5 dagar.</p>
|
||||
<div class="visa-dagar" data-test="body">
|
||||
<div class="row">
|
||||
<div class="col col--sm-7 col--md-8" data-test="body">
|
||||
<div>
|
||||
<span class="visa-dagar__dagar-kvar">250</span>
|
||||
<span class="visa-dagar__discrete">av 480 dagar kvar efter ansökan</span>
|
||||
</div>
|
||||
<div class="visa-dagar__desktop">
|
||||
<div class="niva-statistik">
|
||||
<span class="niva-statistik__icon color-sjukpenning"></span>
|
||||
<div class="niva-statistik__text">
|
||||
<p>Sjukpenningnivå <span class="niva-statistik__dagar"><span class="">(190 dagar)</span></span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="niva-statistik">
|
||||
<span class="niva-statistik__icon color-lagsta"></span>
|
||||
<div class="niva-statistik__text">
|
||||
<p>Lägstanivå <span class="niva-statistik__dagar"><span class="">(60 dagar)</span></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" data-test="footer">
|
||||
<div class="col col--sm-12 col--md-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user