@nuskin/ns-product-lib 2.13.0-cx24-5107.11 → 2.13.0-cx24-5107.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/graph-ql/product.js +7 -3
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [2.13.0-cx24-5107.12](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-5107.11...v2.13.0-cx24-5107.12) (2023-10-10)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
5
|
+
|
6
|
+
* circular json structure ([7b24b0c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/7b24b0c32cb0a5458a3481a3b9f7ecd5003cae9a))
|
7
|
+
|
1
8
|
# [2.13.0-cx24-5107.11](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.13.0-cx24-5107.10...v2.13.0-cx24-5107.11) (2023-10-10)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/graph-ql/product.js
CHANGED
@@ -161,7 +161,9 @@ function mapProduct(product, market, locale, config) {
|
|
161
161
|
"equinoxProductId": product.id,
|
162
162
|
"inventory": defaultVariant.status.isBackordered ? 'BACKORDER' : 'IN STOCK',
|
163
163
|
"properties": {
|
164
|
-
|
164
|
+
isBackOrdered : defaultVariant.status.isBackordered,
|
165
|
+
inventoryStatus: defaultVariant.status.isBackordered ? 'BACKORDER' : 'IN STOCK',
|
166
|
+
productStatus: mapProductStatus(defaultVariant.status.status)
|
165
167
|
}
|
166
168
|
|
167
169
|
}
|
@@ -265,9 +267,11 @@ function mapVariants(product) {
|
|
265
267
|
"searchScore": 0,
|
266
268
|
"isExclusive": variant.isExclusive || false,
|
267
269
|
"equinoxProductId": product.id,
|
268
|
-
"inventory": variant.status.isBackordered ? 'BACKORDER' : 'IN STOCK',
|
270
|
+
"inventory": variant.status.isBackordered ? 'BACKORDER' : 'IN STOCK', //@todo deprecate this since we can set properties.isBackOrdered
|
269
271
|
"properties": {
|
270
|
-
|
272
|
+
isBackOrdered : variant.status.isBackordered,
|
273
|
+
inventoryStatus: variant.status.isBackordered ? 'BACKORDER' : 'IN STOCK',
|
274
|
+
productStatus: mapProductStatus(variant.status.status)
|
271
275
|
}
|
272
276
|
}
|
273
277
|
});
|