Simpl-Resultat/src/components
le king fu f377d760af
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 1m41s
fix(export): preserve import sources and templates across data export/import
Exporting then re-importing data destroyed every import configuration:
dataExportService serialised only categories, suppliers, keywords and
transactions, then ran DELETE FROM import_sources on restore and replaced
them with a synthetic 'Data Import' source. After restoring a backup, every
source had to be reconfigured by hand.

- Serialise import_sources and import_config_templates into the envelope,
  with an explicit format_version; a file without one is the earlier format
  and its missing arrays are treated as empty.
- Wrap wipe + restore in withTransaction, which the service had nowhere:
  a constraint violation mid-restore used to destroy financial history with
  no rollback.
- Restore templates BEFORE sources (template_id is a foreign key), upserting
  by name and remapping template_id through the resolved ids, so restoring
  into a profile that already has templates no longer hits UNIQUE(name).
- Whitelist amount_mode and sign_convention at the import boundary with a
  readable message rather than an SQLite constraint error.

Resolves #331

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 10:58:52 -04:00
..
adjustments fix(ui): apply WebKitGTK date picker workaround to remaining 7 inputs (#188) 2026-05-03 16:19:20 -04:00
balance Merge PR #251: feat(balance) CSV import of holdings in detailed snapshot (#245) 2026-07-05 17:03:00 -04:00
budget feat(budget): adopt multi-level collapse on the Budget grid 2026-07-15 21:16:01 -04:00
categories refactor(categories): unify both category trees' collapse state onto useCollapsibleGroups 2026-07-15 21:30:17 -04:00
categories-migration feat(categories): merge custom categories into the standard taxonomy (#259) 2026-07-19 19:43:47 +00:00
dashboard feat(dashboard): converge home page on the Cartes report model 2026-07-11 17:13:23 -04:00
import feat(import): recognise known bank layouts and report format drift 2026-08-13 14:54:46 -04:00
layout feat(gating): gate routes and Sidebar for budget, advanced reports, balance 2026-07-20 22:12:51 -04:00
profile feat(gating): multi-profile gate (Base+), non-destructive 2026-07-20 22:24:23 -04:00
reports fix(import): persist the import format and restore it faithfully 2026-08-13 13:16:52 -04:00
settings fix(export): preserve import sources and templates across data export/import 2026-08-14 10:58:52 -04:00
shared feat(gating): multi-profile gate (Base+), non-destructive 2026-07-20 22:24:23 -04:00
transactions fix(ui): apply WebKitGTK date picker workaround to remaining 7 inputs (#188) 2026-05-03 16:19:20 -04:00