| | |
| | | const handleChange = (event, newValue) => { |
| | | setValue(newValue); |
| | | }; |
| | | const validateForm = (values) => { |
| | | const errors = {}; |
| | | if (!values.shipperId) { |
| | | errors.shipperId = translate('form.matnr.shipper'); |
| | | } |
| | | if (!values.groupId) { |
| | | errors.groupId = translate('form.matnr.groupId'); |
| | | } |
| | | return errors; |
| | | }; |
| | | return ( |
| | | <Edit |
| | | redirect="list" |
| | |
| | | toolbar={<FormToolbar />} |
| | | mode="onTouched" |
| | | defaultValues={{}} |
| | | validate={validateForm} |
| | | // validate={(values) => { }} |
| | | > |
| | | <Grid container width={{ xs: '20%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> |
| | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="rglarId" |
| | | reference="rglarId" |
| | | reference="batchRegular" |
| | | perPage={REFERENCE_INPUT_PAGESIZE} |
| | | > |
| | | <AutocompleteInput |
| | |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.matnr.erpCode" |
| | | source="erpCode" |
| | | label="table.field.matnr.platCode" |
| | | source="platCode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |