| | |
| | | import { useTranslate } from 'react-admin'; |
| | | |
| | | const AreaBasicTab = ({ |
| | | areaName, |
| | | setAreaName, |
| | | name, |
| | | setName, |
| | | agvOptions, |
| | | selectedAgvs, |
| | | setSelectedAgvs, |
| | | barcodeList, |
| | | agvList, |
| | | setAgvList, |
| | | codeListText, |
| | | onSave, |
| | | disableSave, |
| | | }) => { |
| | | const translate = useTranslate(); |
| | | const icon = <CheckBoxOutlineBlankIcon fontSize="small" />; |
| | |
| | | <TextField |
| | | label={translate('page.map.area.name', { _: '名称' })} |
| | | fullWidth |
| | | value={areaName} |
| | | onChange={(e) => setAreaName(e.target.value)} |
| | | value={name} |
| | | onChange={(e) => setName(e.target.value)} |
| | | /> |
| | | <Button variant="contained" onClick={onSave}> |
| | | {translate('common.action.save', { _: '保存' })} |
| | | </Button> |
| | | </Stack> |
| | | |
| | | <Box> |
| | |
| | | multiple |
| | | disableCloseOnSelect |
| | | options={agvOptions || []} |
| | | value={selectedAgvs || []} |
| | | value={agvList || []} |
| | | getOptionLabel={getOptionLabel} |
| | | isOptionEqualToValue={(option, value) => getOptionId(option) === getOptionId(value)} |
| | | onChange={(event, newValue) => { |
| | | setSelectedAgvs(newValue); |
| | | setAgvList(newValue); |
| | | }} |
| | | renderOption={(props, option, { selected }) => ( |
| | | <li {...props}> |
| | |
| | | multiline |
| | | minRows={6} |
| | | maxRows={10} |
| | | value={barcodeList} |
| | | value={codeListText} |
| | | InputProps={{ readOnly: true }} |
| | | /> |
| | | </Box> |
| | | |
| | | <Box display="flex" justifyContent="flex-start"> |
| | | <Button variant="contained" onClick={onSave} disabled={disableSave}> |
| | | {translate('common.action.save', { _: '保存' })} |
| | | </Button> |
| | | </Box> |
| | | </Stack> |
| | | ); |
| | | }; |