| | |
| | | } |
| | | |
| | | const ShelfMain = (props) => { |
| | | const { data, curLocNo, setCurLocNo } = props; |
| | | const { curLocNo, curShelfInfo: info, setCurLocNo } = props; |
| | | const translate = useTranslate(); |
| | | const dataProvider = useDataProvider(); |
| | | const containerRef = useRef(); |
| | | const [loading, setLoading] = useState(true); |
| | | const [info, setInfo] = useState(null); |
| | | const [selectedLoc, setSelectedLoc] = useState(null); |
| | | |
| | | useEffect(() => { |
| | | if (data) { |
| | | getLocGroup(data.row, data.bay, (response) => { |
| | | setInfo(response); |
| | | setCurLocNo(response[0]?.locNo); |
| | | setSelectedLoc(response[0]); |
| | | }); |
| | | } |
| | | }, [data]); |
| | | const [selectedLoc, setSelectedLoc] = useState(null); // loc obj |
| | | const [loading, setLoading] = useState(true); |
| | | |
| | | useEffect(() => { |
| | | if (info) { |
| | | setSelectedLoc(info[0]); |
| | | endThree(); |
| | | setLoading(true); |
| | | setTimeout(() => { |