diff --git a/messages/de.json b/messages/de.json index 968538471..b9b7f4634 100644 --- a/messages/de.json +++ b/messages/de.json @@ -443,20 +443,7 @@ "daysThu": "Do", "daysFri": "Fr", "daysSat": "Sa", - "intakeHistoryTitle": "Einnahme-Verlauf", "back": "Zurück", - "newIntake": "Hinzufügen", - "editIntake": "Einnahme bearbeiten", - "intakeScheduledFor": "Geplant", - "intakeTakenAt": "Eingenommen um", - "intakeStatus": "Status", - "intakeSource": "Quelle", - "intakeStatusTaken": "Eingenommen", - "intakeStatusSkipped": "Übersprungen", - "intakeStatusMissed": "Verpasst", - "intakeDeleteConfirm": "Einnahme-Eintrag löschen?", - "intakeDeleteDescription": "Dieser Einnahme-Eintrag wird unwiderruflich gelöscht.", - "intakeCount": "{count} Einnahmen", "today": "Heute", "yesterday": "Gestern", "tomorrow": "Morgen", @@ -491,7 +478,7 @@ "formUnit": "Einheit", "formSchedule": "Zeitfenster", "formTreatmentClass": "Behandlungsklasse", - "formTreatmentClassHelp": "Wähle „GLP-1-Injektion“ für wöchentliche Spritzen wie Mounjaro, Ozempic, Wegovy, Zepbound. Schaltet die Körperkarte, die Dosis-Historie und den Pen-Bestand unten frei.", + "formTreatmentClassHelp": "Wähle „GLP-1-Injektion“ für wöchentliche Spritzen wie Mounjaro, Ozempic, Wegovy, Zepbound. Schaltet die Körperkarte und das GLP-1-Logbuch frei.", "treatmentClassGeneric": "Standard-Medikament", "treatmentClassGlp1": "GLP-1-Injektion", "glp1WeeklyPresetTitle": "Einmal wöchentlich am …", @@ -505,9 +492,6 @@ "glp1NextInjectionDays": "Nächster Termin: {label} (in {days} Tagen)", "glp1NextInjectionToday": "Nächster Termin: heute", "glp1NextInjectionTomorrow": "Nächster Termin: morgen", - "glp1DoseHistory": "Dosis-Historie", - "glp1DoseHistoryEmpty": "Noch keine Dosis-Änderung erfasst.", - "glp1DoseSince": "seit {date}", "glp1RotationLast": "Letzte Stelle: {site}", "glp1RotationSuggested": "Empfohlen: {site}", "glp1Inventory": "{pens} Pens übrig · ~{weeks} Wochen Reichweite", diff --git a/messages/en.json b/messages/en.json index d877884e6..449c66f8b 100644 --- a/messages/en.json +++ b/messages/en.json @@ -443,20 +443,7 @@ "daysThu": "Thu", "daysFri": "Fri", "daysSat": "Sat", - "intakeHistoryTitle": "Intake History", "back": "Back", - "newIntake": "Add", - "editIntake": "Edit Intake", - "intakeScheduledFor": "Scheduled", - "intakeTakenAt": "Taken at", - "intakeStatus": "Status", - "intakeSource": "Source", - "intakeStatusTaken": "Taken", - "intakeStatusSkipped": "Skipped", - "intakeStatusMissed": "Missed", - "intakeDeleteConfirm": "Delete intake record?", - "intakeDeleteDescription": "This intake record will be permanently deleted.", - "intakeCount": "{count} intakes", "today": "Today", "yesterday": "Yesterday", "tomorrow": "Tomorrow", @@ -491,7 +478,7 @@ "formUnit": "Unit", "formSchedule": "Schedule", "formTreatmentClass": "Treatment class", - "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker, dose-history view, and pen inventory below.", + "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker and the GLP-1 logbook below.", "treatmentClassGeneric": "Standard medication", "treatmentClassGlp1": "GLP-1 injection", "glp1WeeklyPresetTitle": "Once weekly on …", @@ -505,9 +492,6 @@ "glp1NextInjectionDays": "Next: {label} (in {days} days)", "glp1NextInjectionToday": "Next: today", "glp1NextInjectionTomorrow": "Next: tomorrow", - "glp1DoseHistory": "Dose history", - "glp1DoseHistoryEmpty": "No dose changes logged yet.", - "glp1DoseSince": "since {date}", "glp1RotationLast": "Last site: {site}", "glp1RotationSuggested": "Recommended next: {site}", "glp1Inventory": "{pens} pens left · ~{weeks} weeks of supply", diff --git a/messages/es.json b/messages/es.json index ac7d4c25a..c1cf596a7 100644 --- a/messages/es.json +++ b/messages/es.json @@ -443,20 +443,7 @@ "daysThu": "Thu", "daysFri": "Fri", "daysSat": "Sat", - "intakeHistoryTitle": "Intake History", "back": "Atrás", - "newIntake": "Añadir", - "editIntake": "Edit Intake", - "intakeScheduledFor": "Scheduled", - "intakeTakenAt": "Taken at", - "intakeStatus": "Estado", - "intakeSource": "Source", - "intakeStatusTaken": "Tomada", - "intakeStatusSkipped": "Omitida", - "intakeStatusMissed": "Perdida", - "intakeDeleteConfirm": "Delete intake record?", - "intakeDeleteDescription": "This intake record will be permanently deleted.", - "intakeCount": "{count} intakes", "today": "Hoy", "yesterday": "Ayer", "tomorrow": "Mañana", @@ -491,7 +478,7 @@ "formUnit": "Unit", "formSchedule": "Schedule", "formTreatmentClass": "Treatment class", - "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker, dose-history view, and pen inventory below.", + "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker and the GLP-1 logbook below.", "treatmentClassGeneric": "Standard medication", "treatmentClassGlp1": "GLP-1 injection", "glp1WeeklyPresetTitle": "Once weekly on …", @@ -505,9 +492,6 @@ "glp1NextInjectionDays": "Siguiente:{label} (in {days} days)", "glp1NextInjectionToday": "Next: today", "glp1NextInjectionTomorrow": "Next: tomorrow", - "glp1DoseHistory": "Dose history", - "glp1DoseHistoryEmpty": "No dose changes logged yet.", - "glp1DoseSince": "since {date}", "glp1RotationLast": "Last site: {site}", "glp1RotationSuggested": "Recommended next: {site}", "glp1Inventory": "{pens} pens left · ~{weeks} weeks of supply", diff --git a/messages/fr.json b/messages/fr.json index 65b92f416..4069e9223 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -443,20 +443,7 @@ "daysThu": "Thu", "daysFri": "Fri", "daysSat": "Sat", - "intakeHistoryTitle": "Intake History", "back": "Retour", - "newIntake": "Ajouter", - "editIntake": "Edit Intake", - "intakeScheduledFor": "Scheduled", - "intakeTakenAt": "Taken at", - "intakeStatus": "Statut", - "intakeSource": "Source", - "intakeStatusTaken": "Pris", - "intakeStatusSkipped": "Sauté", - "intakeStatusMissed": "Manqué", - "intakeDeleteConfirm": "Delete intake record?", - "intakeDeleteDescription": "This intake record will be permanently deleted.", - "intakeCount": "{count} intakes", "today": "Aujourd'hui", "yesterday": "Hier", "tomorrow": "Demain", @@ -491,7 +478,7 @@ "formUnit": "Unit", "formSchedule": "Schedule", "formTreatmentClass": "Treatment class", - "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker, dose-history view, and pen inventory below.", + "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker and the GLP-1 logbook below.", "treatmentClassGeneric": "Standard medication", "treatmentClassGlp1": "GLP-1 injection", "glp1WeeklyPresetTitle": "Once weekly on …", @@ -505,9 +492,6 @@ "glp1NextInjectionDays": "Suivant:{label} (in {days} days)", "glp1NextInjectionToday": "Next: today", "glp1NextInjectionTomorrow": "Next: tomorrow", - "glp1DoseHistory": "Dose history", - "glp1DoseHistoryEmpty": "No dose changes logged yet.", - "glp1DoseSince": "since {date}", "glp1RotationLast": "Last site: {site}", "glp1RotationSuggested": "Recommended next: {site}", "glp1Inventory": "{pens} pens left · ~{weeks} weeks of supply", diff --git a/messages/it.json b/messages/it.json index 7acbd1cea..6bd5e8b8b 100644 --- a/messages/it.json +++ b/messages/it.json @@ -443,20 +443,7 @@ "daysThu": "Thu", "daysFri": "Fri", "daysSat": "Sat", - "intakeHistoryTitle": "Intake History", "back": "Indietro", - "newIntake": "Aggiungi", - "editIntake": "Edit Intake", - "intakeScheduledFor": "Scheduled", - "intakeTakenAt": "Taken at", - "intakeStatus": "Stato", - "intakeSource": "Source", - "intakeStatusTaken": "Assunta", - "intakeStatusSkipped": "Saltata", - "intakeStatusMissed": "Persa", - "intakeDeleteConfirm": "Delete intake record?", - "intakeDeleteDescription": "This intake record will be permanently deleted.", - "intakeCount": "{count} intakes", "today": "Oggi", "yesterday": "Ieri", "tomorrow": "Domani", @@ -491,7 +478,7 @@ "formUnit": "Unit", "formSchedule": "Schedule", "formTreatmentClass": "Treatment class", - "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker, dose-history view, and pen inventory below.", + "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker and the GLP-1 logbook below.", "treatmentClassGeneric": "Standard medication", "treatmentClassGlp1": "GLP-1 injection", "glp1WeeklyPresetTitle": "Once weekly on …", @@ -505,9 +492,6 @@ "glp1NextInjectionDays": "Avanti:{label} (in {days} days)", "glp1NextInjectionToday": "Next: today", "glp1NextInjectionTomorrow": "Next: tomorrow", - "glp1DoseHistory": "Dose history", - "glp1DoseHistoryEmpty": "No dose changes logged yet.", - "glp1DoseSince": "since {date}", "glp1RotationLast": "Last site: {site}", "glp1RotationSuggested": "Recommended next: {site}", "glp1Inventory": "{pens} pens left · ~{weeks} weeks of supply", diff --git a/messages/pl.json b/messages/pl.json index 0be73af6f..138100ce1 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -443,20 +443,7 @@ "daysThu": "Thu", "daysFri": "Fri", "daysSat": "Sat", - "intakeHistoryTitle": "Intake History", "back": "Wstecz", - "newIntake": "Dodaj", - "editIntake": "Edit Intake", - "intakeScheduledFor": "Scheduled", - "intakeTakenAt": "Taken at", - "intakeStatus": "Status", - "intakeSource": "Source", - "intakeStatusTaken": "Przyjęte", - "intakeStatusSkipped": "Pominięte", - "intakeStatusMissed": "Pominięte", - "intakeDeleteConfirm": "Delete intake record?", - "intakeDeleteDescription": "This intake record will be permanently deleted.", - "intakeCount": "{count} intakes", "today": "Dzisiaj", "yesterday": "Wczoraj", "tomorrow": "Jutro", @@ -491,7 +478,7 @@ "formUnit": "Unit", "formSchedule": "Schedule", "formTreatmentClass": "Treatment class", - "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker, dose-history view, and pen inventory below.", + "formTreatmentClassHelp": "Pick \"GLP-1 injection\" for weekly injectables like Mounjaro, Ozempic, Wegovy, Zepbound. Unlocks the body-map picker and the GLP-1 logbook below.", "treatmentClassGeneric": "Standard medication", "treatmentClassGlp1": "GLP-1 injection", "glp1WeeklyPresetTitle": "Once weekly on …", @@ -505,9 +492,6 @@ "glp1NextInjectionDays": "Dalej:{label} (in {days} days)", "glp1NextInjectionToday": "Next: today", "glp1NextInjectionTomorrow": "Next: tomorrow", - "glp1DoseHistory": "Dose history", - "glp1DoseHistoryEmpty": "No dose changes logged yet.", - "glp1DoseSince": "since {date}", "glp1RotationLast": "Last site: {site}", "glp1RotationSuggested": "Recommended next: {site}", "glp1Inventory": "{pens} pens left · ~{weeks} weeks of supply", diff --git a/src/app/medications/[id]/history/page.tsx b/src/app/medications/[id]/history/page.tsx index 1c495ef65..527a7f1bb 100644 --- a/src/app/medications/[id]/history/page.tsx +++ b/src/app/medications/[id]/history/page.tsx @@ -1,16 +1,15 @@ "use client"; -import { useEffect, use, useState } from "react"; +import { useEffect, use } from "react"; import { useQuery } from "@tanstack/react-query"; import { useAuth } from "@/hooks/use-auth"; import { useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; -import { IntakeHistoryList } from "@/components/medications/intake-history-list"; import { DrugLevelChart } from "@/components/medications/DrugLevelChart"; import { SideEffectsSection } from "@/components/medications/SideEffectsSection"; import { SchedulingSection } from "@/components/medications/SchedulingSection"; import { TitrationSection } from "@/components/medications/TitrationSection"; -import { ArrowLeft, Loader2, Plus } from "lucide-react"; +import { ArrowLeft, Loader2 } from "lucide-react"; import Link from "next/link"; import { useTranslations } from "@/lib/i18n/context"; @@ -23,7 +22,6 @@ export default function IntakeHistoryPage({ const { isAuthenticated, isLoading: authLoading } = useAuth(); const router = useRouter(); const { t } = useTranslations(); - const [createOpen, setCreateOpen] = useState(false); useEffect(() => { if (!authLoading && !isAuthenticated) { @@ -70,22 +68,18 @@ export default function IntakeHistoryPage({ -
- {medication.name} — {medication.dose} + {medication.dose}
- )} +- {t("medications.glp1DoseHistoryEmpty")} -
- )} - {doseChanges - .slice() - .reverse() - .map((change) => ( -