Update therapeutic range min/max values no longer mandatory
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
<span className="text-muted-foreground">-</span>
|
||||
<FormNumericInput
|
||||
@@ -409,11 +410,12 @@ const Settings = ({
|
||||
max={500}
|
||||
placeholder={t('max')}
|
||||
unit="ng/ml"
|
||||
required={true}
|
||||
error={!!therapeuticRangeError || !therapeuticRange.max}
|
||||
errorMessage={formatText(therapeuticRangeError || t('errorTherapeuticRangeMaxRequired') || 'Maximum therapeutic range is required')}
|
||||
required={false}
|
||||
error={!!therapeuticRangeError}
|
||||
errorMessage={formatText(therapeuticRangeError)}
|
||||
showResetButton={true}
|
||||
defaultValue={defaultsForT.therapeuticRangeMax}
|
||||
allowEmpty={true}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -638,20 +638,20 @@ const SimulationChart = React.memo(({
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && (
|
||||
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.min && !isNaN(parseFloat(therapeuticRange.min)) && (
|
||||
<ReferenceLine
|
||||
y={parseFloat(therapeuticRange.min) || 0}
|
||||
label={{ value: t('refLineMin'), position: 'insideTopLeft' }}
|
||||
y={parseFloat(therapeuticRange.min)}
|
||||
label={{ value: t('refLineMin'), position: 'insideBottomLeft', style: { fontSize: '0.75rem', fontStyle: 'italic', fill: CHART_COLORS.therapeuticMin } }}
|
||||
stroke={CHART_COLORS.therapeuticMin}
|
||||
strokeDasharray="3 3"
|
||||
xAxisId="hours"
|
||||
yAxisId="concentration"
|
||||
/>
|
||||
)}
|
||||
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && (
|
||||
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.max && !isNaN(parseFloat(therapeuticRange.max)) && (
|
||||
<ReferenceLine
|
||||
y={parseFloat(therapeuticRange.max) || 0}
|
||||
label={{ value: t('refLineMax'), position: 'insideTopLeft' }}
|
||||
y={parseFloat(therapeuticRange.max)}
|
||||
label={{ value: t('refLineMax'), position: 'insideTopLeft', style: { fontSize: '0.75rem', fontStyle: 'italic', fill: CHART_COLORS.therapeuticMax } }}
|
||||
stroke={CHART_COLORS.therapeuticMax}
|
||||
strokeDasharray="3 3"
|
||||
xAxisId="hours"
|
||||
|
||||
Reference in New Issue
Block a user