@nuskin/ns-product-lib 2.3.0-cx24-2186.1 → 2.3.0-cx24-2186.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2 -2
- package/package.json +1 -1
- package/src/product.js +0 -6
- package/src/productData.js +5 -7
package/CHANGELOG.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
# [2.3.0-cx24-2186.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.2.0...v2.3.0-cx24-2186.1) (2022-10-
|
1
|
+
# [2.3.0-cx24-2186.2.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.2.0...v2.3.0-cx24-2186.2.1) (2022-10-18)
|
2
2
|
|
3
3
|
|
4
4
|
### New
|
5
5
|
|
6
|
-
* added inventory label
|
6
|
+
* added support for inventory label (#CX24-2186) ([469e309](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/469e3090e98cf2ff7fb199fbc4c2d85e42e04819)), closes [#CX24-2186](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2186)
|
7
7
|
|
8
8
|
# [2.2.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.1.0...v2.2.0) (2022-10-13)
|
9
9
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -72,11 +72,6 @@ const Product = function(productData) {
|
|
72
72
|
// agelocme stuff
|
73
73
|
this.agelocme = null; // object containing agelocme information (like code, label, name)
|
74
74
|
|
75
|
-
//equinox API inventory label
|
76
|
-
//@example "IN STOCK"
|
77
|
-
//@string inventoryLabel
|
78
|
-
this.inventoryLabel = "";
|
79
|
-
|
80
75
|
this.setMarketAttributes = function(productStatus) {
|
81
76
|
if (productStatus.marketAttributes) {
|
82
77
|
this.marketAttributes = productStatus.marketAttributes;
|
@@ -631,7 +626,6 @@ const Product = function(productData) {
|
|
631
626
|
this.marketAttributes = productData.marketAttributes;
|
632
627
|
this.addOns = productData.addOns || [];
|
633
628
|
this.restrictedMarkets = productData.restrictedMarkets || [];
|
634
|
-
this.inventoryLabel = productData.inventoryLabel || "";
|
635
629
|
|
636
630
|
if (data.priceType) {
|
637
631
|
this.addPricing(data.priceType, data.price);
|
package/src/productData.js
CHANGED
@@ -92,8 +92,6 @@ const ProductData = {
|
|
92
92
|
|
93
93
|
eqProductMapper: function (productDataResponse) {
|
94
94
|
let prod = [];
|
95
|
-
|
96
|
-
//sku[0] is equal to base sku
|
97
95
|
let count = 0;
|
98
96
|
|
99
97
|
let prodArr = productDataResponse.map((data) => {
|
@@ -210,17 +208,17 @@ const ProductData = {
|
|
210
208
|
},
|
211
209
|
"restrictedMarkets": [],
|
212
210
|
"addOns": [],
|
213
|
-
inventoryLabel: data.sku[count].inventory || ""
|
214
|
-
};
|
211
|
+
"inventoryLabel": data.sku[count].inventory || ""
|
215
212
|
|
216
|
-
|
217
|
-
|
213
|
+
};
|
214
|
+
let newProduct = new Product(prod);
|
215
|
+
return newProduct
|
216
|
+
})
|
218
217
|
|
219
218
|
let data = {
|
220
219
|
products: prodArr,
|
221
220
|
count: productDataResponse.length
|
222
221
|
};
|
223
|
-
|
224
222
|
return {
|
225
223
|
data: {
|
226
224
|
"status": 200,
|