Skip to content

Commit

Permalink
Merge Make Schicht Qualitaet Nullable #27
Browse files Browse the repository at this point in the history
Closes #266
  • Loading branch information
MiraGeowerkstatt authored Aug 9, 2022
2 parents eb2667c + e7e3178 commit 06d865b
Show file tree
Hide file tree
Showing 5 changed files with 740 additions and 13 deletions.
13 changes: 2 additions & 11 deletions src/ClientApp/src/components/SchichtForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ export default function SchichtForm(props) {
name="qualitaetId"
control={control}
defaultValue={currentSchicht?.qualitaetId}
rules={{ required: true }}
render={({ field, fieldState: { error } }) => (
render={({ field }) => (
<Autocomplete
{...field}
options={qualitaetCodes.sort((a, b) => a.kurztext.localeCompare(b.kurztext)).map((c) => c.id)}
Expand All @@ -185,15 +184,7 @@ export default function SchichtForm(props) {
sx={{ width: "47%" }}
autoHighlight
renderInput={(params) => (
<TextField
{...params}
margin="normal"
label="Qualität"
type="text"
variant="standard"
error={error !== undefined}
helperText={error ? "Wählen Sie eine Qualitätsangabe aus" : ""}
/>
<TextField {...params} margin="normal" label="Qualität" type="text" variant="standard" />
)}
/>
)}
Expand Down
Loading

0 comments on commit 06d865b

Please sign in to comment.