diff --git a/src/App.tsx b/src/App.tsx
index ed1f42f..cab9f3b 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -108,6 +108,7 @@ const MedPlanAssistant = () => {
chartView={chartView}
showDayTimeOnXAxis={showDayTimeOnXAxis}
showDayReferenceLines={showDayReferenceLines}
+ showTherapeuticRange={uiSettings.showTherapeuticRange ?? true}
therapeuticRange={therapeuticRange}
simulationDays={simulationDays}
displayedDays={displayedDays}
diff --git a/src/components/settings.tsx b/src/components/settings.tsx
index 7da1a1e..dcafe67 100644
--- a/src/components/settings.tsx
+++ b/src/components/settings.tsx
@@ -32,6 +32,7 @@ const Settings = ({
}: any) => {
const { showDayTimeOnXAxis, yAxisMin, yAxisMax, showTemplateDay, simulationDays, displayedDays } = uiSettings;
const showDayReferenceLines = (uiSettings as any).showDayReferenceLines ?? true;
+ const showTherapeuticRange = (uiSettings as any).showTherapeuticRange ?? true;
const [isDiagramExpanded, setIsDiagramExpanded] = React.useState(true);
const [isPharmacokineticExpanded, setIsPharmacokineticExpanded] = React.useState(true);
@@ -94,6 +95,17 @@ const Settings = ({
+
+ onUpdateUiSetting('showTemplateDay', checked)}
+ />
+
+
+
onUpdateUiSetting('showTemplateDay', checked)}
+ id="showTherapeuticRange"
+ checked={showTherapeuticRange}
+ onCheckedChange={checked => onUpdateUiSetting('showTherapeuticRange', checked)}
/>
-
+
+ { /*
{t('therapeuticRange')} */ }
+
+ onUpdateTherapeuticRange('min', val)}
+ increment={0.5}
+ min={0}
+ placeholder={t('min')}
+ required={showTherapeuticRange}
+ disabled={!showTherapeuticRange}
+ errorMessage={t('therapeuticRangeMinRequired') || 'Minimum therapeutic range is required'}
+ />
+ -
+ onUpdateTherapeuticRange('max', val)}
+ increment={0.5}
+ min={0}
+ placeholder={t('max')}
+ unit="ng/ml"
+ required={showTherapeuticRange}
+ disabled={!showTherapeuticRange}
+ errorMessage={t('therapeuticRangeMaxRequired') || 'Maximum therapeutic range is required'}
+ />
+
+
+
{t('simulationDuration')}
-
-
-
{t('therapeuticRange')}
-
- onUpdateTherapeuticRange('min', val)}
- increment={0.5}
- min={0}
- placeholder={t('min')}
- required={true}
- errorMessage={t('therapeuticRangeMinRequired') || 'Minimum therapeutic range is required'}
- />
- -
- onUpdateTherapeuticRange('max', val)}
- increment={0.5}
- min={0}
- placeholder={t('max')}
- unit="ng/ml"
- required={true}
- errorMessage={t('therapeuticRangeMaxRequired') || 'Maximum therapeutic range is required'}
- />
-
-
)}
diff --git a/src/components/simulation-chart.tsx b/src/components/simulation-chart.tsx
index 1b25095..bf0aac0 100644
--- a/src/components/simulation-chart.tsx
+++ b/src/components/simulation-chart.tsx
@@ -41,6 +41,7 @@ const SimulationChart = ({
chartView,
showDayTimeOnXAxis,
showDayReferenceLines,
+ showTherapeuticRange,
therapeuticRange,
simulationDays,
displayedDays,
@@ -396,7 +397,7 @@ const SimulationChart = ({
yAxisId="concentration"
/>
))}
- {(chartView === 'damph' || chartView === 'both') && (
+ {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && (
)}
- {(chartView === 'damph' || chartView === 'both') && (
+ {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && (
({
yAxisMax: '13',
simulationDays: '5',
displayedDays: '2',
+ showTherapeuticRange: true,
}
});
diff --git a/src/locales/de.ts b/src/locales/de.ts
index efd992b..dc8897c 100644
--- a/src/locales/de.ts
+++ b/src/locales/de.ts
@@ -64,7 +64,9 @@ export const de = {
xAxisFormat12h: "Tageszeit (12h AM/PM)",
xAxisFormat12hDesc: "Wiederholend 12h Zyklus im AM/PM Format",
showTemplateDayInChart: "Regulären Plan einblenden (nur bei abweichenden Tagen)",
- showDayReferenceLines: "Tagestrenner anzeigen (Referenzlinien und Status)",
+
+ showDayReferenceLines: "Tagestrenner anzeigen (Vertikale Referenzlinien und Status)",
+ showTherapeuticRangeLines: "Therapeutischen Bereich anzeigen (Horizontale Min/MaxReferenzlinien)",
simulationDuration: "Simulationsdauer",
displayedDays: "Sichtbare Tage (im Fokus)",
yAxisRange: "Y-Achsen-Bereich (Zoom)",
diff --git a/src/locales/en.ts b/src/locales/en.ts
index 776dad9..ab15f93 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -63,7 +63,8 @@ export const en = {
xAxisFormat12h: "Time of Day (12h AM/PM)",
xAxisFormat12hDesc: "Repeating 12h cycle in AM/PM format",
showTemplateDayInChart: "Show Regular Plan (Only for Deviating Days)",
- showDayReferenceLines: "Show Day Separators (Reference Lines and Status)",
+ showDayReferenceLines: "Show Day Separators (Vertical Reference Lines and Status)",
+ showTherapeuticRangeLines: "Show Therapeutic Range (Horizontal Min/Max Reference Lines)",
simulationDuration: "Simulation Duration",
displayedDays: "Visible Days (in Focus)",
yAxisRange: "Y-Axis Range (Zoom)",