Skip to content

Commit 1cb92df

Browse files
committed
fix: Fix settings for volumetric target and pressure
Fixes #270, #275
1 parent 2eeacb8 commit 1cb92df

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

web/src/pages/ProfileEdit/StandardProfileForm.jsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function Phase({ phase, onChange, onRemove }) {
137137
});
138138
};
139139
const onVolumetricTargetChange = (value) => {
140-
if (value === 0) {
140+
if (value == 0) {
141141
onChange({
142142
...phase,
143143
targets: null
@@ -155,7 +155,7 @@ function Phase({ phase, onChange, onRemove }) {
155155
});
156156
};
157157
const onPumpPressureSetting = (value) => {
158-
if (value === 0) {
158+
if (value == 0) {
159159
onChange({
160160
...phase,
161161
pump: 100,
@@ -243,20 +243,18 @@ function Phase({ phase, onChange, onRemove }) {
243243
<span className="input-addition">s</span>
244244
</div>
245245
</div>
246-
{
247-
phase.phase === 'brew' && <div className="col-span-12 flex flex-col">
248-
<label className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300">Volumetric Target</label>
249-
<div className="flex">
250-
<input
251-
className="input-field"
252-
type="number"
253-
value={targetWeight}
254-
onChange={(e) => onVolumetricTargetChange(e.target.value)}
255-
/>
256-
<span className="input-addition">g</span>
257-
</div>
246+
<div className="col-span-12 flex flex-col">
247+
<label className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300">Volumetric Target</label>
248+
<div className="flex">
249+
<input
250+
className="input-field"
251+
type="number"
252+
value={targetWeight}
253+
onChange={(e) => onVolumetricTargetChange(e.target.value)}
254+
/>
255+
<span className="input-addition">g</span>
258256
</div>
259-
}
257+
</div>
260258
{
261259
!!phase.pump && capabilities.value.pressure && (
262260
<div className="col-span-12 flex flex-col">

0 commit comments

Comments
 (0)