Skip to content

Commit

Permalink
fix issue with adding new detectors and beamlines
Browse files Browse the repository at this point in the history
  • Loading branch information
tizayi committed May 22, 2024
1 parent 8c2670d commit f338614
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
"no-throw-literal": "off",
"max-len": ["warn", { code: 80 }],
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": { "attributes": false } }],
},
settings: {
react: {
Expand Down
22 changes: 11 additions & 11 deletions src/dialogs/beamlineDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function PresetDialog(props: {
keepMounted
onClose={props.handleClose}
>
<form onSubmit={() => handleSubmit(onSubmit)}>
<form onSubmit={handleSubmit(onSubmit)}>
<DialogTitle sx={{ display: "flex", alignItems: "center" }}>
<Typography variant="h5"> Beamlines </Typography>
<Divider />
Expand Down Expand Up @@ -92,23 +92,23 @@ export default function PresetDialog(props: {
/>
<TextField
type="number"
label="min camera length"
{...register("beamline.minCameraLength", { required: true })}
label="max wavelength "
variant="outlined"
size="small"
{...register("beamline.maxWavelength", { required: true })}
inputProps={{
step: INPUT_PRECISION,
}}
InputProps={{
endAdornment: (
<InputAdornment position="end">m</InputAdornment>
<InputAdornment position="end">nm</InputAdornment>
),
}}
/>
<TextField
type="number"
label="camera length step"
{...register("beamline.cameraLengthStep", { required: true })}
label="min camera length"
{...register("beamline.minCameraLength", { required: true })}
variant="outlined"
size="small"
inputProps={{
Expand All @@ -122,25 +122,25 @@ export default function PresetDialog(props: {
/>
<TextField
type="number"
label="max wavelength "
label="max camera length"
variant="outlined"
size="small"
{...register("beamline.maxWavelength", { required: true })}
{...register("beamline.maxCameraLength", { required: true })}
inputProps={{
step: INPUT_PRECISION,
}}
InputProps={{
endAdornment: (
<InputAdornment position="end">nm</InputAdornment>
<InputAdornment position="end">m</InputAdornment>
),
}}
/>
<TextField
type="number"
label="max camera length"
label="camera length step"
{...register("beamline.cameraLengthStep", { required: true })}
variant="outlined"
size="small"
{...register("beamline.maxCameraLength", { required: true })}
inputProps={{
step: INPUT_PRECISION,
}}
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/detectorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function DetectorDialog(props: {
onClose={props.handleClose}
maxWidth={"xl"}
>
<form onSubmit={() => handleSubmit(onSubmit)}>
<form onSubmit={handleSubmit(onSubmit)}>
<DialogTitle sx={{ display: "flex", alignItems: "center" }}>
<Typography variant="h5"> Detectors </Typography>
<IconButton onClick={props.handleClose} sx={{ ml: "auto" }}>
Expand Down

0 comments on commit f338614

Please sign in to comment.