feat(export): direct download of the complete archive from the Exportera tab (#1632)

The full-archive ZIP endpoint (SIE + reports + all documents) has existed
since the settings/backup page, but lost its UI when that page became a
redirect: the BackupDownloadForm component was orphaned and the download
was API-only. Resurface it the way the export tab already works: a
"Komplett arkiv" ImportRow (owner/admin only, matching the route's role
gate) opening a small centered dialog like the SIE export next to it,
with scope choice, fiscal-year picker, include-documents toggle, live
size estimate, 413 handling, and a #full-archive deep link.

The orphaned form and its dead settings_backup_download i18n namespace
are deleted; its logic lives on in components/import/FullArchiveDialog.
Over-limit copy now points at the existing cloud sync instead of
promising it "in a later version".

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-08-17 09:49:13 +02:00
committed by GitHub
co-authored by Jakob Wennberg Claude Fable 5
parent c897a906df
commit 44c3116357
6 changed files with 342 additions and 494 deletions
+23 -33
View File
@@ -2409,39 +2409,6 @@
"fyllnadsinbetalning_label": "Extra preliminary tax payment (fyllnadsinbetalning)",
"fyllnadsinbetalning_help": "Extra preliminary tax payment to avoid interest on back taxes. Amounts over 30,000 kr by the 12th of the second month after the fiscal year, the rest by the 3rd of the fifth month."
},
"settings_backup_download": {
"create_backup_title": "Create backup",
"scope_label": "Scope",
"scope_all_label": "Full history",
"scope_all_desc": "All fiscal years and vouchers",
"scope_period_label": "Single period",
"scope_period_desc": "Pick a specific fiscal year",
"recommended": "Recommended",
"fiscal_year_label": "Fiscal year",
"no_fiscal_years": "No fiscal years",
"include_docs_label": "Include receipts and supporting documents",
"include_docs_help": "Voucher attachments (receipts, invoices, PDFs) are packed in the ZIP. Turn off for a smaller backup with bookkeeping data only.",
"calculating_size": "Calculating size…",
"estimated_size": "Estimated size:",
"attachment_singular": "attachment",
"attachment_plural": "attachments",
"size_will_calculate": "Size is calculated when scope is selected.",
"over_limit_message": "The archive is larger than {limit} and cannot be downloaded directly. Pick a single period or disable attachments for now: automatic cloud sync is coming in a later version.",
"creating_backup": "Creating backup…",
"create_and_download": "Create and download",
"last_download": "Last download",
"toast_too_large_title": "Archive too large for direct download",
"toast_too_large_with_size": "Your archive is about {size} MB. Export one period at a time for now: automatic cloud sync is coming in a later version.",
"toast_too_large_generic": "Export one period at a time for now: automatic cloud sync is coming in a later version.",
"error_create_archive": "Could not create the archive",
"toast_backup_created": "Backup created",
"toast_backup_failed": "Could not create backup",
"toast_try_again": "Please try again.",
"cloud_sync_title": "Cloud sync",
"cloud_sync_disabled_help": "Enable the \"Cloud sync\" extension to connect Google Drive and upload your backup with one click.",
"periods_load_failed": "The fiscal years could not be loaded, so a single period cannot be selected right now. The full history can still be downloaded.",
"periods_load_retry": "Try again"
},
"settings_api_keys": {
"title": "API keys",
"description": "Manage keys for MCP clients (Claude, Cursor) and other integrations.",
@@ -7081,6 +7048,29 @@
"export_sie_dialog_description": "Download your bookkeeping as a SIE4 file for your accountant or for moving to another system.",
"cloud_row_title": "Cloud sync",
"cloud_row_description": "Continuous backup of the archive to Google Drive",
"export_archive_title": "Complete archive",
"export_archive_description": "Your entire bookkeeping as a ZIP: SIE, reports and all supporting documents",
"archive_dialog_description": "Download a complete archive to your computer, with SIE files, reports and all supporting documents organized per voucher.",
"archive_scope_label": "Scope",
"archive_scope_all": "Full history",
"archive_scope_period": "Single fiscal year",
"archive_include_docs_label": "Include receipts and supporting documents",
"archive_include_docs_help": "Voucher attachments (receipts, invoices, PDFs) are packed into the ZIP. Turn off for a smaller archive with bookkeeping data only.",
"archive_calculating_size": "Calculating size…",
"archive_estimated_size": "Estimated size:",
"archive_attachment_singular": "attachment",
"archive_attachment_plural": "attachments",
"archive_size_pending": "Size is calculated when scope is selected.",
"archive_over_limit": "The archive is larger than {limit} and cannot be downloaded directly. Pick a single fiscal year, turn off attachments, or use Cloud sync which handles larger archives.",
"archive_download_button": "Create and download",
"archive_creating": "Creating archive…",
"archive_last_download": "Last download",
"archive_toast_too_large_title": "Archive too large for direct download",
"archive_toast_too_large_with_size": "Your archive is about {size} MB. Download one fiscal year at a time, or use Cloud sync which handles larger archives.",
"archive_toast_too_large_generic": "Download one fiscal year at a time, or use Cloud sync which handles larger archives.",
"archive_toast_created": "Archive downloaded",
"archive_toast_failed": "Could not create the archive",
"archive_error_fallback": "Please try again.",
"help_text": "Every way in and out lives here: bank connections, file imports and migrations from other systems, plus SIE export and backups. Every import is reviewed before anything is booked.",
"pgnote": "Every import goes through the same steps: upload, map columns, review, result. Nothing is booked without you seeing it first.",
"sie_history_title": "Previous SIE imports",