mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
feat(medications): calmer detail page — one card language, six tabs, a status overview
Every detail section now sits on the card surface with the standard padding instead of a bare border on the page background, the schedule tab loses its duplicated summary header, and the reminder tab folds into the schedule tab next to the times it gates (old deep links redirect). The overview tab becomes a real landing surface — next due dose, reminder state and supply runway with jump links — instead of a lone compliance bar. History rows calm down: settled rows carry a single row menu, actionable rows exactly one visible take button plus the menu, and the quick-mark toast gains undo. The card menu drops the advanced-settings entry and its edit action opens the editor it promises. Schedule-tab controls share one height system, and the injection charts load on demand so the chart library leaves the initial bundle.
This commit is contained in:
1 parent
6f45d72a84
commit
fb6e494f64
19 files changed
+797
-297
No files matched your search
@@ -171,14 +171,15 @@ export default function MedicationsPage() {
|
||||
queryClient.setQueryData(queryKeys.medicationDetail(med.id), med);
|
||||
}
|
||||
|
||||
// v1.15.18 — the card kebab actions now navigate to the full-page
|
||||
// tabbed detail surface on the right tab rather than opening a modal
|
||||
// editor / sheet. Edit lands on Zeitplan (the everyday schedule view +
|
||||
// the hero's "Vollständig bearbeiten" jump into the wizard), History on
|
||||
// Verlauf, Advanced on Erweitert (the dissolved advanced-settings).
|
||||
// v1.15.20 — the kebab's Edit opens the medication wizard directly:
|
||||
// it navigates to the detail page with `?edit=1`, which the tabbed
|
||||
// shell reads synchronously to mount the wizard in edit mode (the same
|
||||
// `editOpen` path the hero's "Vollständig bearbeiten" uses). History
|
||||
// still lands on the Verlauf tab; the former Advanced item is retired —
|
||||
// the Erweitert tab stays reachable through the card body.
|
||||
function openEdit(med: Medication) {
|
||||
seedDetail(med);
|
||||
router.push(`/medications/${med.id}?tab=zeitplan`);
|
||||
router.push(`/medications/${med.id}?edit=1`);
|
||||
}
|
||||
|
||||
function openHistory(med: Medication) {
|
||||
@@ -186,11 +187,6 @@ export default function MedicationsPage() {
|
||||
router.push(`/medications/${med.id}?tab=verlauf`);
|
||||
}
|
||||
|
||||
function openAdvanced(med: Medication) {
|
||||
seedDetail(med);
|
||||
router.push(`/medications/${med.id}?tab=erweitert`);
|
||||
}
|
||||
|
||||
function closeDialog() {
|
||||
setDialogOpen(false);
|
||||
}
|
||||
@@ -327,7 +323,6 @@ export default function MedicationsPage() {
|
||||
medication={med}
|
||||
onEdit={openEdit}
|
||||
onOpenHistory={openHistory}
|
||||
onOpenAdvanced={openAdvanced}
|
||||
/>
|
||||
) : (
|
||||
<MedicationCard
|
||||
@@ -335,7 +330,6 @@ export default function MedicationsPage() {
|
||||
medication={med}
|
||||
onEdit={openEdit}
|
||||
onOpenHistory={openHistory}
|
||||
onOpenAdvanced={openAdvanced}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
@@ -357,7 +351,6 @@ export default function MedicationsPage() {
|
||||
medication={med}
|
||||
onEdit={openEdit}
|
||||
onOpenHistory={openHistory}
|
||||
onOpenAdvanced={openAdvanced}
|
||||
/>
|
||||
) : (
|
||||
<MedicationCard
|
||||
@@ -365,7 +358,6 @@ export default function MedicationsPage() {
|
||||
medication={med}
|
||||
onEdit={openEdit}
|
||||
onOpenHistory={openHistory}
|
||||
onOpenAdvanced={openAdvanced}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user