fix(admin-ui): Create fulfillment (#3607)

* fix for create-fulfillment

* remove ff check

* add changeset

* Disable Create fulfillment button if no quantities fulfilled

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Rares Capilnar <rares.capilnar@gmail.com>
This commit is contained in:
Philip Korsholm
2023-03-28 19:04:35 +02:00
committed by GitHub
co-authored by Oliver Windall Juhl Rares Capilnar
parent bca1f80dd5
commit d1a6aa5a90
9 changed files with 52 additions and 11 deletions
@@ -15,7 +15,6 @@ import clsx from "clsx"
import { sum } from "lodash"
import { useAdminStockLocations } from "medusa-react"
import { useFeatureFlag } from "../../../../../providers/feature-flag-provider"
// import { InventoryLevelDTO, StockLocationDTO } from "@medusajs/medusa"
export type VariantStockFormType = {
manage_inventory?: boolean
@@ -38,7 +38,7 @@ const VariantStockForm = ({ form, locationLevels }: Props) => {
const { stock_locations: locations, isLoading } = useAdminStockLocations()
const locationsMap = useMemo(() => {
if (isLoading) {
if (isLoading || !locations) {
return new Map()
}