Simpl-Resultat/src/services
le king fu 4c58b8bab8
All checks were successful
PR Check / rust (push) Successful in 23m21s
PR Check / frontend (push) Successful in 2m24s
PR Check / rust (pull_request) Successful in 23m12s
PR Check / frontend (pull_request) Successful in 2m20s
feat(reports/cartes): new KPI dashboard sub-report with sparklines, top movers, budget adherence and seasonality (#97)
New /reports/cartes page surfaces a dashboard-style snapshot of the
reference month:

- 4 KPI cards (income / expenses / net / savings rate) showing MoM and
  YoY deltas simultaneously, each with a 13-month sparkline highlighting
  the reference month
- 12-month income vs expenses overlay chart (bars + net balance line)
- Top 5 category increases + top 5 decreases MoM, clickable through to
  the category zoom report
- Budget adherence card: on-target count + 3 worst overruns with
  progress bars
- Seasonality card: reference month vs same calendar month averaged
  over the two previous years, with deviation indicator

All data is fetched in a single getCartesSnapshot() service call that
runs four queries concurrently (25-month flow, MoM category deltas,
budget-vs-actual, seasonality). Missing months are filled with zeroes
in the sparklines but preserved as null in the MoM/YoY deltas so the UI
can distinguish "no data" from "zero spend".

- Exported pure helpers: shiftMonth, defaultCartesReferencePeriod
- 13 vitest cases covering zero data, MoM/YoY computation, January
  wrap-around, missing-month handling, division by zero for the
  savings rate, seasonality with and without history, top mover sign
  splitting and 5-cap

Note: src/components/reports/CompareReferenceMonthPicker.tsx is a
temporary duplicate — the canonical copy lives on the issue-96 branch
(refactor: compare report). Once both branches merge the content is
identical and git will dedupe. Keeping the local copy here means the
Cartes branch builds cleanly on main without depending on #96.

Closes #97

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:44:58 -04:00
..
adjustmentService.ts feat: add Budget and Adjustments pages with full functionality 2026-02-12 00:58:43 +00:00
authService.ts feat: settings banner when OAuth tokens fall back to file store (#81) 2026-04-14 08:18:41 -04:00
budgetService.ts feat: show actual transactions in budget previous year column 2026-03-10 23:03:26 -04:00
categorizationService.test.ts feat: category zoom + secure AddKeywordDialog with context menu (#74) 2026-04-14 15:09:17 -04:00
categorizationService.ts feat: category zoom + secure AddKeywordDialog with context menu (#74) 2026-04-14 15:09:17 -04:00
categoryService.ts feat: add 3rd level of category hierarchy 2026-02-25 19:54:05 -05:00
dashboardService.ts Bump version to 0.6.0 — Reports enhancements and comment visibility fix 2026-03-04 21:01:13 -05:00
dataExportService.ts feat: make settings data imports visible in Import History 2026-02-15 13:38:51 +00:00
db.ts Fix migration checksum mismatch on startup 2026-03-01 09:17:35 -05:00
importConfigTemplateService.ts feat: persist template selection and add update template button 2026-02-15 13:16:55 +00:00
importedFileService.ts fix: allow duplicate-content files with different names (#1) 2026-02-15 12:40:01 +00:00
importSourceService.ts fix: persist has_header for imports, fix orphan categories, add re-initialize 2026-02-12 11:54:33 +00:00
licenseService.ts feat: Maximus Account OAuth2 PKCE + machine activation + subscription check (#51, #53) 2026-04-10 14:18:51 -04:00
logService.ts Add startup retry logic and persist logs across refresh 2026-02-28 22:12:41 -05:00
profileService.ts fix: address reviewer feedback (#54) 2026-04-09 15:46:27 -04:00
reportService.cartes.test.ts feat(reports/cartes): new KPI dashboard sub-report with sparklines, top movers, budget adherence and seasonality (#97) 2026-04-15 19:44:58 -04:00
reportService.test.ts feat: category zoom + secure AddKeywordDialog with context menu (#74) 2026-04-14 15:09:17 -04:00
reportService.ts feat(reports/cartes): new KPI dashboard sub-report with sparklines, top movers, budget adherence and seasonality (#97) 2026-04-15 19:44:58 -04:00
transactionService.ts feat: show transaction splits on Adjustments page + fix CSV auto-detect 2026-02-17 01:41:08 +00:00
userPreferenceService.ts feat: implement CSV import wizard with folder-based source detection 2026-02-08 03:38:46 +00:00