@nuskin/ns-product-lib 2.17.1 → 2.17.2
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/graph-ql/product.js +14 -31
package/package.json
CHANGED
package/src/graph-ql/product.js
CHANGED
@@ -438,43 +438,26 @@ function mapChildSKU(kitBundleProducts) {
|
|
438
438
|
if (!kitBundleProducts || !kitBundleProducts.kitProducts) {
|
439
439
|
return [];
|
440
440
|
}
|
441
|
+
|
441
442
|
return kitBundleProducts.kitProducts.map((kitProduct) => {
|
442
443
|
const { product } = kitProduct;
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
backOrdered: variant.status.isBackordered,
|
455
|
-
backOrderedQty: variant.availableQuantity
|
456
|
-
}
|
457
|
-
}
|
458
|
-
})
|
459
|
-
} else {
|
460
|
-
const defaultVariant = product.variants[0];
|
461
|
-
return {
|
462
|
-
productId: product.id,
|
463
|
-
skuId: defaultVariant.sku,
|
464
|
-
type: 'MANDATORY',
|
465
|
-
skuQuantity: kitProduct.quantity,
|
466
|
-
availableChannels: Array.isArray(kitBundleProducts.availableChannels) ? kitBundleProducts.availableChannels.join(',') : kitBundleProducts.availableChannels,
|
467
|
-
inventory: {
|
468
|
-
atpQty: defaultVariant.availableQuantity,
|
469
|
-
backOrdered: defaultVariant.status.isBackordered,
|
470
|
-
backOrderedQty: defaultVariant.availableQuantity
|
471
|
-
}
|
444
|
+
const defaultVariant = product.variants[0];
|
445
|
+
return {
|
446
|
+
productId: product.id,
|
447
|
+
skuId: defaultVariant.sku,
|
448
|
+
type: 'MANDATORY',
|
449
|
+
skuQuantity: kitProduct.quantity,
|
450
|
+
availableChannels: Array.isArray(kitBundleProducts.availableChannels) ? kitBundleProducts.availableChannels.join(',') : kitBundleProducts.availableChannels,
|
451
|
+
inventory: {
|
452
|
+
atpQty: defaultVariant.availableQuantity,
|
453
|
+
backOrdered: defaultVariant.status.isBackordered,
|
454
|
+
backOrderedQty: defaultVariant.availableQuantity
|
472
455
|
}
|
473
|
-
|
474
456
|
}
|
475
|
-
})
|
457
|
+
});
|
476
458
|
}
|
477
459
|
|
460
|
+
|
478
461
|
/**
|
479
462
|
* map EQ customer types to supported product card customer types
|
480
463
|
* @param {Array<string>} eqCustomerTypes
|