@nuskin/ns-product-lib 2.7.0-cx24-3682.22 → 2.7.0-cx24-3682.24

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.7.0-cx24-3682.24](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.23...v2.7.0-cx24-3682.24) (2023-03-29)
2
+
3
+
4
+ ### New
5
+
6
+ * MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([90fde8c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/90fde8cf56206c6b2e14831748a8bb91b18e4871)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
7
+
8
+ # [2.7.0-cx24-3682.23](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.22...v2.7.0-cx24-3682.23) (2023-03-29)
9
+
10
+
11
+ ### New
12
+
13
+ * MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([c99dead](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/c99deaddf1461f1d527153b92347b004ec2b6a3b)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
14
+
1
15
  # [2.7.0-cx24-3682.22](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.21...v2.7.0-cx24-3682.22) (2023-03-29)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.7.0-cx24-3682.22",
3
+ "version": "2.7.0-cx24-3682.24",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -24,7 +24,7 @@ function productNotFound(product, market) {
24
24
  isExclusive: 'false',
25
25
  market,
26
26
  name: ` ${product.identifier}`,
27
- productStatus: 'Sellable',
27
+ productStatus: 'preview product',
28
28
  scanQualifiedCount: '0',
29
29
  status: 'active',
30
30
  title: ` ${product.identifier}`
@@ -465,7 +465,7 @@ const ProductData = {
465
465
  "equinoxProductId": productData.identifier,
466
466
  equinox: {
467
467
  sku: {
468
- exists: productData.exists === false ? false : productData.exists
468
+ exists: this.mapEquinoxSKUExists(productData.exists)
469
469
  }
470
470
  }
471
471
  };
@@ -491,6 +491,21 @@ const ProductData = {
491
491
  };
492
492
  },
493
493
 
494
+ mapEquinoxSKUExists: function(exists) {
495
+ // this could be avoided if only we are using response mapper
496
+ // for equinox products that exists.
497
+ // @todo: clean-up
498
+ if (exists === undefined) {
499
+ return null;
500
+ }
501
+
502
+ if (exists === false) {
503
+ return false;
504
+ }
505
+
506
+ return true;
507
+ },
508
+
494
509
  /**
495
510
  * fetchChildSkus make requests to Equinox to get the SKUs of a kit.
496
511
  * @param {*} product