fix(medusa, admin-ui): List all inventory levels (#3552)
* ensure that all levels are listed * add changeset * remove count from config * update changeset version bump --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Oliver Windall Juhl
parent
cd54c7dca9
commit
0695ff642b
+4
-3
@@ -38,9 +38,6 @@ const EditVariantInventoryModal = ({ onClose, product, variant }: Props) => {
|
||||
refetch,
|
||||
} = useAdminVariantsInventory(variant.id)
|
||||
|
||||
const variantInventoryItem = variantInventory?.inventory[0]
|
||||
const itemId = variantInventoryItem?.id
|
||||
|
||||
const handleClose = () => {
|
||||
onClose()
|
||||
}
|
||||
@@ -50,6 +47,10 @@ const EditVariantInventoryModal = ({ onClose, product, variant }: Props) => {
|
||||
const onSubmit = async (data: EditFlowVariantFormType) => {
|
||||
const locationLevels = data.stock.location_levels || []
|
||||
const manageInventory = data.stock.manage_inventory
|
||||
|
||||
const variantInventoryItem = variantInventory?.inventory?.[0]
|
||||
const itemId = variantInventoryItem?.id
|
||||
|
||||
delete data.stock.manage_inventory
|
||||
delete data.stock.location_levels
|
||||
|
||||
|
||||
Reference in New Issue
Block a user