diff --git a/src/app/WardrobePage/support/AllItemLayersSupportModal.js b/src/app/WardrobePage/support/AllItemLayersSupportModal.js index c073ac3..cee7b69 100644 --- a/src/app/WardrobePage/support/AllItemLayersSupportModal.js +++ b/src/app/WardrobePage/support/AllItemLayersSupportModal.js @@ -28,6 +28,8 @@ import { EditIcon } from "@chakra-ui/icons"; import cachedZones from "../../cached-data/zones.json"; function AllItemLayersSupportModal({ item, isOpen, onClose }) { + const [bulkAddProposal, setBulkAddProposal] = React.useState(null); + const { bodyBackground } = useCommonStyles(); return ( @@ -44,7 +46,17 @@ function AllItemLayersSupportModal({ item, isOpen, onClose }) { - + + + {bulkAddProposal ? ( + <> + TODO: Show assets {bulkAddProposal.minAssetId}– + {Number(bulkAddProposal.minAssetId) + 53}, tenatively applied to + zone {bulkAddProposal.zoneId} + + ) : ( + "" + )} @@ -54,13 +66,13 @@ function AllItemLayersSupportModal({ item, isOpen, onClose }) { ); } -function BulkAddBodySpecificAssetsForm() { +function BulkAddBodySpecificAssetsForm({ onSubmit }) { const zones = [...cachedZones].sort((a, b) => `${a.label} (${a.id})`.localeCompare(`${b.label} (${b.id})`) ); const [minAssetId, setMinAssetId] = React.useState(null); - const [selectedZoneId, setSelectedZoneId] = React.useState(zones[0].id); + const [zoneId, setZoneId] = React.useState(zones[0].id); return ( { e.preventDefault(); - alert("TODO!"); + onSubmit({ minAssetId, zoneId }); }} > setSelectedZoneId(e.target.value)} + value={zoneId} + onChange={(e) => setZoneId(e.target.value)} > {zones.map((zone) => (