| | |
| | | const checkedIcon = <CheckBoxIcon fontSize="small" />; |
| | | |
| | | const getOptionLabel = (option) => { |
| | | if (option == null) { |
| | | return ''; |
| | | } |
| | | if (typeof option === 'string' || typeof option === 'number') { |
| | | return String(option); |
| | | } |
| | | const label = |
| | | option?.label ?? |
| | | option?.uuid ?? |
| | | option?.name ?? |
| | | option?.agvNo ?? |
| | | option?.value ?? |
| | | option?.id ?? |
| | | ''; |
| | | return label != null ? String(label) : ''; |
| | | return option?.uuid ?? ''; |
| | | }; |
| | | |
| | | const getOptionId = (option) => { |
| | | if (option == null) { |
| | | return ''; |
| | | } |
| | | if (typeof option === 'string' || typeof option === 'number') { |
| | | return String(option); |
| | | } |
| | | const identifier = |
| | | option?.value ?? |
| | | option?.id ?? |
| | | option?.uuid ?? |
| | | option?.agvNo ?? |
| | | option?.code ?? |
| | | option?.name ?? |
| | | ''; |
| | | return identifier != null ? String(identifier) : ''; |
| | | return option?.id; |
| | | }; |
| | | |
| | | return ( |
| | |
| | | }; |
| | | |
| | | const handleSaveBasic = () => { |
| | | // console.log({ |
| | | // name, |
| | | // agvIds: agvList.map(getAgvOptionId), |
| | | // }); |
| | | // placeholder for save logic |
| | | setInitialBasic({ |
| | | name, |