diff --git a/src/app/WardrobePage/support/AllItemLayersSupportModal.js b/src/app/WardrobePage/support/AllItemLayersSupportModal.js index 38ce452..bfd7500 100644 --- a/src/app/WardrobePage/support/AllItemLayersSupportModal.js +++ b/src/app/WardrobePage/support/AllItemLayersSupportModal.js @@ -11,13 +11,13 @@ import { ModalContent, ModalHeader, ModalOverlay, - Select, Tooltip, Wrap, WrapItem, } from "@chakra-ui/react"; import { gql, useQuery } from "@apollo/client"; import { + appearanceLayerFragment, itemAppearanceFragment, petAppearanceFragment, } from "../../components/useOutfitAppearance"; @@ -25,7 +25,6 @@ import HangerSpinner from "../../components/HangerSpinner"; import { ErrorMessage, useCommonStyles } from "../../util"; import ItemSupportAppearanceLayer from "./ItemSupportAppearanceLayer"; import { EditIcon } from "@chakra-ui/icons"; -import cachedZones from "../../cached-data/zones.json"; function AllItemLayersSupportModal({ item, isOpen, onClose }) { const [bulkAddProposal, setBulkAddProposal] = React.useState(null); @@ -46,19 +45,15 @@ function AllItemLayersSupportModal({ item, isOpen, onClose }) { - + - {bulkAddProposal ? ( - <> - TODO: Show assets {bulkAddProposal.minAssetId}– - {Number(bulkAddProposal.minAssetId) + 53}, tenatively applied to - zone {bulkAddProposal.zoneId} - - ) : ( - "" - )} - - + @@ -66,14 +61,11 @@ function AllItemLayersSupportModal({ item, isOpen, onClose }) { ); } -function BulkAddBodySpecificAssetsForm({ onSubmit }) { - const zones = [...cachedZones].sort((a, b) => - `${a.label}-${a.id}`.localeCompare(`${b.label}-${b.id}`) +function BulkAddBodySpecificAssetsForm({ bulkAddProposal, onSubmit }) { + const [minAssetId, setMinAssetId] = React.useState( + bulkAddProposal?.minAssetId ); - const [minAssetId, setMinAssetId] = React.useState(null); - const [zoneId, setZoneId] = React.useState(zones[0].id); - return ( { e.preventDefault(); - onSubmit({ minAssetId, zoneId }); + onSubmit({ minAssetId }); }} > - setMinAssetId(e.target.value ? Number(e.target.value) - 53 : null) + setMinAssetId(e.target.value ? Number(e.target.value) - 54 : null) } /> - - , assigned to - -