@nuskin/ns-product-lib 1.5.0-cx24-2103.1 → 1.5.0-cx24-2103.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/productData.js +18 -11
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [1.5.0-cx24-2103.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.5.0-cx24-2103.1...v1.5.0-cx24-2103.2) (2022-09-07)
|
2
|
+
|
3
|
+
|
4
|
+
### Update
|
5
|
+
|
6
|
+
* updating the product data map (#CX24-2103) ([1d30f74](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1d30f74bcca16de1440013c2a00048cace61bfc9)), closes [#CX24-2103](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2103)
|
7
|
+
|
1
8
|
# [1.5.0-cx24-2103.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.4.5...v1.5.0-cx24-2103.1) (2022-09-06)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -165,9 +165,7 @@ const ProductData = {
|
|
165
165
|
"web display": true
|
166
166
|
},
|
167
167
|
"childSkus": [],
|
168
|
-
"custTypes":
|
169
|
-
"10","20"
|
170
|
-
],
|
168
|
+
"custTypes": this.switchCustType(data.properties.customerTypes),
|
171
169
|
"division": data.properties.division,
|
172
170
|
"backOrderDate": null,
|
173
171
|
"locallyProduced": false,
|
@@ -212,14 +210,6 @@ const ProductData = {
|
|
212
210
|
},
|
213
211
|
|
214
212
|
switchStatusFromEquinox: function (status) {
|
215
|
-
/**
|
216
|
-
* Discontinued: 'DISCONTINUED',
|
217
|
-
NotReleasedForSale: 'NOT_RELEASED_FOR_SALE',
|
218
|
-
ReleasedForSale: 'RELEASED_FOR_SALE',
|
219
|
-
NotFound: 'NOT_FOUND',
|
220
|
-
StopStatus: 'STOP_STATUS',
|
221
|
-
|
222
|
-
*/
|
223
213
|
let newStatus = '';
|
224
214
|
switch (status) {
|
225
215
|
case 'Sellable':
|
@@ -242,7 +232,24 @@ const ProductData = {
|
|
242
232
|
break;
|
243
233
|
}
|
244
234
|
return newStatus;
|
235
|
+
},
|
236
|
+
|
237
|
+
/**
|
238
|
+
*
|
239
|
+
* @param {*} custType
|
240
|
+
*
|
241
|
+
*/
|
242
|
+
switchCustType: function (custType) {
|
243
|
+
let newCustType = [];
|
244
|
+
if (custType.includes('Brand Affiliate - Business Entity') || custType.includes('Brand Affiliate - Individual'))
|
245
|
+
newCustType.push(10)
|
246
|
+
if (custType.includes('Retail Customer'))
|
247
|
+
newCustType.push(20)
|
248
|
+
if (custType.includes('Preferred Customer/Member'))
|
249
|
+
newCustType.push(30)
|
250
|
+
return newCustType.toString()
|
245
251
|
}
|
252
|
+
|
246
253
|
}
|
247
254
|
|
248
255
|
module.exports = ProductData;
|