From fbba3d6122e524f84b01fe9350e4eedabbc46008 Mon Sep 17 00:00:00 2001 From: Andreas Weyer Date: Tue, 10 Feb 2026 19:52:25 +0000 Subject: [PATCH] Update therapeutic range min/max values no longer mandatory --- src/components/settings.tsx | 14 ++++++++------ src/components/simulation-chart.tsx | 12 ++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/components/settings.tsx b/src/components/settings.tsx index 07b567d..8348c8c 100644 --- a/src/components/settings.tsx +++ b/src/components/settings.tsx @@ -394,11 +394,12 @@ const Settings = ({ min={0} max={500} placeholder={t('min')} - required={true} - error={!!therapeuticRangeError || !therapeuticRange.min} - errorMessage={formatText(therapeuticRangeError || t('errorTherapeuticRangeMinRequired') || 'Minimum therapeutic range is required')} + required={false} + error={!!therapeuticRangeError} + errorMessage={formatText(therapeuticRangeError)} showResetButton={true} defaultValue={defaultsForT.therapeuticRangeMin} + allowEmpty={true} /> - diff --git a/src/components/simulation-chart.tsx b/src/components/simulation-chart.tsx index d6983c7..94eee0a 100644 --- a/src/components/simulation-chart.tsx +++ b/src/components/simulation-chart.tsx @@ -638,20 +638,20 @@ const SimulationChart = React.memo(({ /> ); })} - {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && ( + {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.min && !isNaN(parseFloat(therapeuticRange.min)) && ( )} - {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && ( + {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.max && !isNaN(parseFloat(therapeuticRange.max)) && (