| | |
| | | } |
| | | }; |
| | | |
| | | const handleDeleteArea = async () => { |
| | | const id = sprite?.data?.id; |
| | | if (!id) { |
| | | return; |
| | | } |
| | | const success = await removeArea(id); |
| | | if (success) { |
| | | if (sprite) { |
| | | Tool.removeAreaSprite(sprite); |
| | | } |
| | | onCancel?.(); |
| | | } |
| | | }; |
| | | |
| | | const handleSaveAdvanced = async () => { |
| | | const id = sprite?.data?.id; |
| | | if (!id) { |
| | |
| | | } |
| | | const payload = { |
| | | id, |
| | | name, |
| | | agvIds: agvList.map(getAgvOptionId), |
| | | code, |
| | | maxCount, |
| | | speedLimit, |
| | |
| | | } |
| | | }; |
| | | |
| | | const handleDeleteArea = async () => { |
| | | const id = sprite?.data?.id; |
| | | if (!id) { |
| | | return; |
| | | } |
| | | const success = await removeArea(id); |
| | | if (success) { |
| | | if (sprite) { |
| | | Tool.removeAreaSprite(sprite); |
| | | } |
| | | onCancel?.(); |
| | | } |
| | | }; |
| | | |
| | | const basicDirty = name !== initialBasic.name |
| | | || !areAgvSelectionsEqual( |
| | | agvList.map(getAgvOptionId), |