feat(kpi): monthly revenue, expenses and result table under Nyckeltal, toggle in Anpassa (#2433)
The KPI payload has carried income, expenses and net per month since the aggregates RPC, but after the Recharts trend chart was dropped only the net column was rendered (the bars pane). A fiscal year's month-by-month sums were therefore fetched and never shown (#2196). - New components/kpi/KPIMonthsTable.tsx: full-width dry table (Manad, Intakter, Kostnader, Resultat) with the period totals as the last row, rendered between the panes and the cost story. Rows and totals come from the pure helper components/kpi/months-table.ts. - New preference showMonthlyTable (default true) on KPIPreferences: filled by mergeWithDefaults on read, accepted by the preferences route, sent whole by the dialog, required by readPreferencesBody. A boolean, not a KPI_DEFINITIONS id: stored kpiOrder arrays would hide a new id for every existing company. - One Switch row in the Anpassa dialog after the KPI list. - Reuses the orphaned kpi.trend_* keys; adds months_col_month, months_total and the two settings keys in sv and en. - Tests: helper rows/totals/inactive flags, defaults + merge, route accepts false and rejects a string; fixtures updated for the new field. Closes #2196 Claude-Session: https://claude.ai/code/session_0179bdetHyofL6ATfQxB5wP5 Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Jakob Wennberg
Claude Fable 5.1
parent
5e2498bc2f
commit
a7dcaac6ad
@@ -5954,6 +5954,8 @@
|
||||
"trend_legend_income": "Revenue",
|
||||
"trend_legend_expenses": "Expenses",
|
||||
"trend_legend_net": "Net result",
|
||||
"months_col_month": "Month",
|
||||
"months_total": "Total",
|
||||
"expense_mix_title": "Expenses by class",
|
||||
"expense_mix_empty": "No posted expenses yet",
|
||||
"expense_mix_total": "Total",
|
||||
@@ -6010,6 +6012,8 @@
|
||||
"settings_account_hint": "Enter account numbers separated by commas (e.g. {example})",
|
||||
"settings_reset_field": "Reset to default",
|
||||
"settings_reset_all": "Reset all",
|
||||
"settings_monthly_table_label": "Monthly table",
|
||||
"settings_monthly_table_description": "Revenue, expenses and result month by month.",
|
||||
"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",
|
||||
|
||||
@@ -5954,6 +5954,8 @@
|
||||
"trend_legend_income": "Intäkter",
|
||||
"trend_legend_expenses": "Kostnader",
|
||||
"trend_legend_net": "Resultat",
|
||||
"months_col_month": "Månad",
|
||||
"months_total": "Summa",
|
||||
"expense_mix_title": "Kostnader per klass",
|
||||
"expense_mix_empty": "Inga bokförda kostnader ännu",
|
||||
"expense_mix_total": "Totalt",
|
||||
@@ -6010,6 +6012,8 @@
|
||||
"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_monthly_table_label": "Tabell per månad",
|
||||
"settings_monthly_table_description": "Intäkter, kostnader och resultat månad för månad.",
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user