mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 08:12:52 +00:00
fix(medications): English tab slugs in the URL, old links still open
The medication detail tabs put German words into the address for every language (`?tab=verlauf`, `?tab=bestand`). They are overview, effect, schedule, supply, history, injection and advanced now. Every old slug maps to its tab, so a bookmark, a link in an old report or a low-stock notification sent before the change opens where it did. The low-stock push, the list card and the efficacy summary link with the new slugs. The slug vocabulary moves into its own module with a test.
This commit is contained in:
1 parent
2a68b39a85
commit
6be88e777a
17 files changed
+160
-81
No files matched your search
@@ -21,7 +21,7 @@ export default function IntakeHistoryRedirectPage({
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
router.replace(`/medications/${id}?tab=verlauf`);
|
||||
router.replace(`/medications/${id}?tab=history`);
|
||||
}, [id, router]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -435,7 +435,7 @@ export default function MedicationsPageClient() {
|
||||
|
||||
function openHistory(med: Medication) {
|
||||
seedDetail(med);
|
||||
router.push(`/medications/${med.id}?tab=verlauf`);
|
||||
router.push(`/medications/${med.id}?tab=history`);
|
||||
}
|
||||
|
||||
function closeDialog() {
|
||||
|
||||
Reference in new issue
Block a user