feat(kpi): Nyckeltal as Instrumentbrädan — instrument panes, monthly bars, cost list (#1148)

* feat(kpi): Nyckeltal as Berattelsen (serif month hero + metric rail + quiet cost rows)

The founder-picked concept variant: the month's result as a serif hero
with a +/- delta sentence against the previous month, a single sage net
area chart (income/expenses ride in the hover tooltip), and a hairline
metric rail on the right still driven by the user's KPI preferences
(Anpassa, formula tooltips, all seven definitions supported). The cost
story renders as quiet bar rows: expense classes 4xxx-7xxx and top five
suppliers. Replaces the four-tile + three-Recharts-card layout;
KPIHeroCards, KPITrendChart, KPIExpenseMixChart and KPITopSuppliersChart
are deleted. FyPicker replaces FiscalYearSelector; help behind ?.
No API changes: everything derives from the existing KPIReport.

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

* feat(kpi): switch Nyckeltal to Instrumentbradan (founder pick v2)

Berattelsen replaced by the instrument-pane grid on founder review:
monthly result bars as plain SVG (muted months, latest in sage or
terracotta when negative, compact endpoint label, per-bar tooltips)
plus one bordered pane per visible preference KPI, with the
receivables pane carrying a two-segment not-due/overdue strip. The
cost story rows below are unchanged. Recharts leaves this page
entirely (KPIResultChart deleted). Anpassa, formula tooltips and all
seven KPI definitions still supported.

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

* feat(kpi): concept-true cost list and cash runway note

Founder review against the concept: the report now carries
topExpenseAccounts (top five BAS 4-7 accounts for the period, computed
from the trial-balance rows the route already holds) and the page
renders them as the full-width Storsta kostnaderna rows with account
numbers, exactly like the concept. The Kassa pane derives its 'Tacker
cirka N dagars utgifter' note from the period's daily burn so far.
Class-composition and supplier columns leave the UI (data stays on the
API). Route test extended for the new field.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-07-24 16:43:42 +02:00
committed by GitHub
co-authored by Claude Fable 5
parent 6911f657e9
commit d0fb72dc63
11 changed files with 439 additions and 521 deletions
+8 -1
View File
@@ -4510,7 +4510,14 @@
"settings_customize_accounts": "Customize accounts",
"settings_account_hint": "Enter account numbers separated by commas (e.g. {example})",
"settings_reset_field": "Reset to default",
"settings_reset_all": "Reset all"
"settings_reset_all": "Reset all",
"help_text": "The key figures are computed from the books for the selected fiscal year. You control the panes via Customize; expense classes and suppliers sum the period's spending.",
"costs_title": "Largest expenses",
"bars_title": "Result per month",
"bars_unit": "kr",
"bars_aria": "Result per month; latest {month} at {amount}",
"aging_aria": "Receivables: {ok} not due, {overdue} overdue",
"cash_covers_days": "Covers roughly {days} days of expenses"
},
"company_switcher": {
"company_label": "Company",
+8 -1
View File
@@ -4510,7 +4510,14 @@
"settings_customize_accounts": "Anpassa konton",
"settings_account_hint": "Ange kontonummer separerade med komma (t.ex. {example})",
"settings_reset_field": "Återställ till standard",
"settings_reset_all": "Återställ allt"
"settings_reset_all": "Återställ allt",
"help_text": "Nyckeltalen räknas ur bokföringen för det valda räkenskapsåret. Panelerna styr du själv via Anpassa; kostnadsslag och leverantörer summerar periodens utgifter.",
"costs_title": "Största kostnaderna",
"bars_title": "Resultat per månad",
"bars_unit": "kr",
"bars_aria": "Resultat per månad; senast {month} med {amount}",
"aging_aria": "Kundfordringar: {ok} ej förfallna, {overdue} förfallna",
"cash_covers_days": "Täcker cirka {days} dagars utgifter"
},
"company_switcher": {
"company_label": "Företag",