| | |
| | | }; |
| | | |
| | | const handleSaveBasic = async () => { |
| | | const areaId = sprite?.data?.id; |
| | | if (!areaId) { |
| | | const id = sprite?.data?.id; |
| | | if (!id) { |
| | | return; |
| | | } |
| | | const payload = { |
| | | areaId, |
| | | id, |
| | | name, |
| | | agvIds: agvList.map(getAgvOptionId), |
| | | }; |
| | |
| | | name, |
| | | agvIds: payload.agvIds, |
| | | }); |
| | | fetchAreaInfo(areaId); |
| | | fetchAreaInfo(id); |
| | | } |
| | | }; |
| | | |
| | | const handleDeleteArea = async () => { |
| | | const areaId = sprite?.data?.id; |
| | | if (!areaId) { |
| | | const id = sprite?.data?.id; |
| | | if (!id) { |
| | | return; |
| | | } |
| | | const success = await removeArea(areaId); |
| | | const success = await removeArea(id); |
| | | if (success) { |
| | | onCancel?.(); |
| | | } |