Browse Source

Fix(admin UI): apply useGlobalOutOfStockThreshold correctly (#3993)

Bibiana Sebestianova 1 month ago
parent
commit
55094a2455

+ 1 - 0
packages/dashboard/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts

@@ -92,6 +92,7 @@ export const productVariantDetailDocument = graphql(
                 }
                 trackInventory
                 outOfStockThreshold
+                useGlobalOutOfStockThreshold
                 stockLevels {
                     id
                     stockOnHand

+ 1 - 0
packages/dashboard/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx

@@ -97,6 +97,7 @@ function ProductVariantDetailPage() {
                 prices: entity.prices,
                 trackInventory: entity.trackInventory,
                 outOfStockThreshold: entity.outOfStockThreshold,
+                useGlobalOutOfStockThreshold : entity.useGlobalOutOfStockThreshold,
                 stockLevels: entity.stockLevels.map(stockLevel => ({
                     stockOnHand: stockLevel.stockOnHand,
                     stockLocationId: stockLevel.stockLocation.id,