fix(bokslut): unblur the pre-submission warning list on the årsredovisning page (#1415)

* fix(bokslut): revive preflight action links and unblur arsredovisning warnings

Two dead pieces of pre-flight UI wiring:

1. PreflightStep's BlockerRow matched blocker strings with English-only
   regexes (/draft journal entries/, /voucher gap/, /trial balance/,
   /continuity/), but validateYearEndReadiness emits Swedish (the wizard is
   a "stays Swedish" surface). None of the contextual action links ("Visa
   utkast", "Hantera nummerlucka", "Öppna balansrapport", "Granska ingående
   balans") ever rendered. Swedish alternates added, mirroring the MCP
   classifier, plus a link for the unbooked-transactions blocker.

2. The "Innan inlämning till Bolagsverket" warning list on the
   årsredovisning page was rendered inside the blurred/inert coming-soon
   wrapper, so in the default config (direct submission gated) users could
   not read their own pre-submission warnings while the draft-PDF button
   next to them stayed active. The warnings describe problems in the user's
   own report and apply to the paper PDF path too: they now stay sharp;
   only the digital-inlämning explainer remains blurred.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* revert: hand PreflightStep blocker links to #1420 (typed codes)

#1420 solves the same dead-link problem with stable blocker codes instead
of regex string matching, and correctly drops the /bookkeeping/voucher-gaps
branch: that path exists only as an API route (app/api/bookkeeping/
voucher-gaps), so this PR's regex fix would have made a link render that
navigates nowhere. Keeping only the unique arsredovisning warning-list
unblur here so the two PRs stop competing for the same file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-08-05 18:08:38 +02:00
committed by GitHub
co-authored by Claude Fable 5 Jakob Wennberg
parent c0825e9bd2
commit 77d20287b9
@@ -1035,15 +1035,12 @@ export default function ArsredovisningPage() {
</Button>
</span>
</div>
<div
inert={INLAMNING_COMING_SOON}
aria-hidden={INLAMNING_COMING_SOON}
className={
INLAMNING_COMING_SOON
? 'pointer-events-none select-none blur-[3px] opacity-60 space-y-4'
: 'space-y-4'
}
>
{/* The warning list stays SHARP even while direct submission is
gated: the warnings describe problems in the user's own report
(unmapped accounts, resultat vs 2099, AGM dates) and apply to
the paper PDF just as much as to digital inlämning. Blurring
them alongside the coming-soon Bolagsverket parts made the
pre-submission checklist unreadable in the default config. */}
{data.warnings.length > 0 && (
<div className="space-y-1 border-t border-border/60 pt-3 text-xs">
<p className="font-medium">Innan inlämning till Bolagsverket:</p>
@@ -1054,13 +1051,20 @@ export default function ArsredovisningPage() {
</ul>
</div>
)}
<p className="text-xs text-muted-foreground">
<p
inert={INLAMNING_COMING_SOON}
aria-hidden={INLAMNING_COMING_SOON}
className={
INLAMNING_COMING_SOON
? 'pointer-events-none select-none blur-[3px] opacity-60 text-xs text-muted-foreground'
: 'text-xs text-muted-foreground'
}
>
<strong className="text-foreground">Digital inlämning är frivillig.</strong> Den görs som iXBRL genom en
ansluten programvara. Accounteds direktinlämning förblir stängd tills avtal,
certifikat och Bolagsverkets acceptanstest är klara. PDF-flödet ovan är den
separata vägen för pappersinlämning.
</p>
</div>
</div>
</section>