| | |
| | | notify('common.response.success'); |
| | | }; |
| | | |
| | | const handleError = async (data) => { |
| | | notify('common.response.fail'); |
| | | const handleError = async (error) => { |
| | | notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } }); |
| | | }; |
| | | |
| | | return ( |
| | |
| | | <DialogContent> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.funcSta.uuid" |
| | | source="uuid" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="zoneId" |
| | | reference="zone" |
| | |
| | | label="table.field.funcSta.zoneId" |
| | | optionText="name" |
| | | filterToQuery={(val) => ({ name: val })} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="agvId" |
| | | reference="agv" |
| | |
| | | filterToQuery={(val) => ({ uuid: val })} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.funcSta.name" |
| | |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.funcSta.type" |
| | | source="type" |
| | | label="table.field.funcSta.uuid" |
| | | source="uuid" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <SelectInput |
| | | source="type" |
| | | label="table.field.funcSta.type" |
| | | choices={[ |
| | | { id: 'CHARGE', name: 'page.funcSta.enums.type.charge' }, |
| | | { id: 'STANDBY', name: 'page.funcSta.enums.type.standby' }, |
| | | ]} |
| | | parse={v => v} |
| | | required |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.funcSta.state" |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <SelectInput |
| | | source="state" |
| | | label="table.field.funcSta.state" |
| | | choices={[ |
| | | { id: 'IDLE', name: 'page.funcSta.enums.state.idle' }, |
| | | { id: 'OCCUPIED', name: 'page.funcSta.enums.state.occupied' }, |
| | | ]} |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | </Grid> */} |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <StatusSelectInput /> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item xs={12} display="flex" gap={1}> |
| | | <Stack direction="column" spacing={1} width={'100%'}> |
| | | <MemoInput /> |