fix(admin-ui): Hide inventory quantity field in variant stock form if SL module enabled (#3592)
* Hide inventory stock field if stock locations module enabled * Create purple-cats-brake.md --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
1 parent
95c9fbfdd5
commit
455c56c4b3
2 files changed
+7
-1
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/admin-ui": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(admin-ui): Hide inventory quantity field in variant stock form if SL module enabled
|
||||||
+2
-1
@@ -17,7 +17,6 @@ import { useAdminStockLocations } from "medusa-react"
|
|||||||
import { useFeatureFlag } from "../../../../../providers/feature-flag-provider"
|
import { useFeatureFlag } from "../../../../../providers/feature-flag-provider"
|
||||||
// import { InventoryLevelDTO, StockLocationDTO } from "@medusajs/medusa"
|
// import { InventoryLevelDTO, StockLocationDTO } from "@medusajs/medusa"
|
||||||
|
|
||||||
|
|
||||||
export type VariantStockFormType = {
|
export type VariantStockFormType = {
|
||||||
manage_inventory?: boolean
|
manage_inventory?: boolean
|
||||||
allow_backorder: boolean
|
allow_backorder: boolean
|
||||||
@@ -108,6 +107,7 @@ const VariantStockForm = ({ form }: Props) => {
|
|||||||
placeholder="SUN-G, JK1234..."
|
placeholder="SUN-G, JK1234..."
|
||||||
{...register(path("sku"))}
|
{...register(path("sku"))}
|
||||||
/>
|
/>
|
||||||
|
{!stockLocationEnabled && (
|
||||||
<InputField
|
<InputField
|
||||||
label="Quantity in stock"
|
label="Quantity in stock"
|
||||||
type="number"
|
type="number"
|
||||||
@@ -117,6 +117,7 @@ const VariantStockForm = ({ form }: Props) => {
|
|||||||
valueAsNumber: true,
|
valueAsNumber: true,
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<InputField
|
<InputField
|
||||||
label="EAN (Barcode)"
|
label="EAN (Barcode)"
|
||||||
placeholder="123456789102..."
|
placeholder="123456789102..."
|
||||||
|
|||||||
Reference in new issue
Block a user