feat(mileage): surface Körjournal in the nav behind a settings toggle (#1540)

* feat(mileage): surface Körjournal in the nav behind a settings toggle

The /mileage page shipped hidden: the route works but no nav row points at
it. Add company_settings.mileage_enabled (mirroring dimensions_enabled) with
a switch in Fönster -> Bokföring, and show the Arbeta nav row when the toggle
is on OR the company already has mileage_trips rows, the same hybrid gate as
webshop orders, so trips created via API/MCP can never become invisible
underlag. UI visibility only, never load-bearing for correctness.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(migrations): move mileage_enabled migration after already-applied 20260812153208

origin/main merged in 20260812153208 which prod has already applied; a new
file sorting before it risks an out-of-order db push abort.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mattsson
2026-08-12 21:48:01 +02:00
committed by GitHub
co-authored by Claude Fable 5
parent 67febd5097
commit 45d7f1be4e
12 changed files with 191 additions and 6 deletions
+6 -1
View File
@@ -7032,6 +7032,11 @@
"booking": "Booking...",
"book_error": "The mileage allowance could not be booked",
"booked_title": "Voucher {voucher} booked",
"booked_description": "{count} trips, total {amount}"
"booked_description": "{count} trips, total {amount}",
"settings_heading": "Driving log",
"settings_toggle_label": "Enable the driving log",
"settings_toggle_help": "Shows the driving log in the menu. There you log business trips and book tax-free mileage allowance at the statutory rate.",
"settings_save_failed_title": "Could not save the setting",
"settings_open_page": "Open the driving log"
}
}
+6 -1
View File
@@ -7032,6 +7032,11 @@
"booking": "Bokför...",
"book_error": "Milersättningen kunde inte bokföras",
"booked_title": "Verifikat {voucher} bokfört",
"booked_description": "{count} resor, totalt {amount}"
"booked_description": "{count} resor, totalt {amount}",
"settings_heading": "Körjournal",
"settings_toggle_label": "Aktivera körjournal",
"settings_toggle_help": "Visar körjournalen i menyn. Där loggar du tjänsteresor och bokför milersättning skattefritt enligt schablon.",
"settings_save_failed_title": "Kunde inte spara inställningen",
"settings_open_page": "Öppna körjournalen"
}
}