Просмотр исходного кода

fix(admin-ui): Ensure outOfStockThreshold works when global setting is toggled

Pavan Kumar 1 месяц назад
Родитель
Сommit
b8d5492d60

+ 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,