Simpl-Resultat/src/components/settings
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
..
AccountCard.tsx fix: tighten CSP img-src, show initials instead of external avatar 2026-04-10 15:24:52 -04:00
CategoriesCard.tsx feat(categories): add restore backup banner and permanent restore action (#122) 2026-04-20 21:47:43 -04:00
CategoriesMigrationBackupBanner.tsx feat(categories): add restore backup banner and permanent restore action (#122) 2026-04-20 21:47:43 -04:00
CategoriesMigrationRestoreModal.tsx feat(categories): add restore backup banner and permanent restore action (#122) 2026-04-20 21:47:43 -04:00
ChangelogContent.tsx refactor(settings): split monolithic Settings page into 3 sub-pages (#190) 2026-05-03 09:50:02 -04:00
DataManagementCard.tsx feat: add data export/import with optional AES-256-GCM encryption (#3) 2026-02-15 11:40:28 +00:00
DocsContent.tsx docs(gating): ADR 0017 + architecture + user guide + CHANGELOG 2026-07-20 22:48:55 -04:00
FeedbackConsentDialog.tsx feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
FeedbackDialog.tsx feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
ImportConfirmModal.tsx fix(export): preserve import sources and templates across data export/import 2026-08-14 10:58:52 -04:00
LicenseCard.tsx fix(gating): keep key-validation errors out of the load lifecycle (#297) 2026-07-20 21:21:18 -04:00
LogViewerCard.tsx feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
PriceFetchConsentToggle.test.tsx feat(prices): Settings revocation toggle for price_fetching_consent 2026-04-27 08:41:15 -04:00
PriceFetchConsentToggle.tsx feat(prices): Settings revocation toggle for price_fetching_consent 2026-04-27 08:41:15 -04:00
TokenStoreFallbackBanner.tsx feat: dismissable banner with session-storage memory (#81) 2026-04-14 08:20:20 -04:00
UpdateCard.tsx refactor(settings): split monolithic Settings page into 3 sub-pages (#190) 2026-05-03 09:50:02 -04:00