Skip to content

Commit

Permalink
[Fix #496] Fixed radio button for manual failure rate not being displ…
Browse files Browse the repository at this point in the history
…ayed correctly
  • Loading branch information
LaChope committed Jul 2, 2024
1 parent 6329a74 commit 90300f8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ const FaultEventMenu = ({ shapeToolData, onEventUpdated, refreshTree, rootIri }:

const basedFailureRate = shapeToolData?.supertypes?.supertypes?.hasFailureRate?.estimate?.value;
const requiredFailureRate = shapeToolData?.supertypes?.hasFailureRate?.requirement?.upperBound;
const radioStyle = {
color: theme.main.black,
display: snsOperationalFailureRate || snsPredictedFailureRate ? "none" : undefined,
};

const { predictionIri, operationalIri } = getFailureRateIris(shapeToolData?.supertypes?.supertypes);

Expand Down Expand Up @@ -365,9 +361,11 @@ const FaultEventMenu = ({ shapeToolData, onEventUpdated, refreshTree, rootIri }:
<Box display={"flex"} flexDirection={"row"} alignItems="center">
<FormControlLabel
value={RadioButtonType.Manual}
control={<Radio style={radioStyle} />}
control={snsOperationalFailureRate || snsPredictedFailureRate ? <Radio /> : <></>}
label={`${t("faultEventMenu.manuallyDefinedFailureRate")}:`}
className={selectedRadioButton === RadioButtonType.Manual ? classes.selected : classes.notSelected}
// Compensate the removal of the radio button, 16px is the MUI <Box /> default left padding
sx={snsOperationalFailureRate || snsPredictedFailureRate ? {} : { pl: "16px" }}
/>
<TextField
className={classes.numberInput}
Expand Down

0 comments on commit 90300f8

Please sign in to comment.