@nuskin/cs-product-lib 1.7.0 → 1.7.1
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/package.json +1 -1
- package/src/formatKit.js +3 -3
- package/src/helpers.js +9 -7
package/package.json
CHANGED
package/src/formatKit.js
CHANGED
|
@@ -21,9 +21,9 @@ const parsePrice = (product = [], status = {}) => {
|
|
|
21
21
|
sb: kitStatus?.pricing?.wholesale?.webAdr?.sb || 0
|
|
22
22
|
},
|
|
23
23
|
wholesale: {
|
|
24
|
-
cv: kitStatus?.pricing?.wholesale?.
|
|
25
|
-
pv: kitStatus?.pricing?.wholesale?.
|
|
26
|
-
sb: kitStatus?.pricing?.wholesale?.
|
|
24
|
+
cv: kitStatus?.pricing?.wholesale?.order?.cv || kitStatus?.pricing?.wholesale?.webOrder?.cv || 0,
|
|
25
|
+
pv: kitStatus?.pricing?.wholesale?.order?.pv || kitStatus?.pricing?.wholesale?.webOrder?.pv || 0,
|
|
26
|
+
sb: kitStatus?.pricing?.wholesale?.order?.sb || kitStatus?.pricing?.wholesale?.webOrder?.sb || 0
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
package/src/helpers.js
CHANGED
|
@@ -420,36 +420,36 @@ function mapPoints(parent) {
|
|
|
420
420
|
_.get(parent, 'points.wholesale.cv', null) ||
|
|
421
421
|
_.get(
|
|
422
422
|
parent,
|
|
423
|
-
'defaults.status.pricing.wholesale.
|
|
423
|
+
'defaults.status.pricing.wholesale.order.cv',
|
|
424
424
|
null
|
|
425
425
|
) ||
|
|
426
426
|
_.get(
|
|
427
427
|
parent,
|
|
428
|
-
'defaults.status.pricing.wholesale.
|
|
428
|
+
'defaults.status.pricing.wholesale.webOrder.cv',
|
|
429
429
|
null
|
|
430
430
|
),
|
|
431
431
|
pv:
|
|
432
432
|
_.get(parent, 'points.wholesale.pv', null) ||
|
|
433
433
|
_.get(
|
|
434
434
|
parent,
|
|
435
|
-
'defaults.status.pricing.wholesale.
|
|
435
|
+
'defaults.status.pricing.wholesale.order.pv',
|
|
436
436
|
null
|
|
437
437
|
) ||
|
|
438
438
|
_.get(
|
|
439
439
|
parent,
|
|
440
|
-
'defaults.status.pricing.wholesale.
|
|
440
|
+
'defaults.status.pricing.wholesale.webOrder.pv',
|
|
441
441
|
null
|
|
442
442
|
),
|
|
443
443
|
sb:
|
|
444
444
|
_.get(parent, 'points.wholesale.SB', null) ||
|
|
445
445
|
_.get(
|
|
446
446
|
parent,
|
|
447
|
-
'defaults.status.pricing.wholesale.
|
|
447
|
+
'defaults.status.pricing.wholesale.order.SB',
|
|
448
448
|
null
|
|
449
449
|
) ||
|
|
450
450
|
_.get(
|
|
451
451
|
parent,
|
|
452
|
-
'defaults.status.pricing.wholesale.
|
|
452
|
+
'defaults.status.pricing.wholesale.webOrder.SB',
|
|
453
453
|
null
|
|
454
454
|
),
|
|
455
455
|
grp: pricing.retail - pricing.wholesale
|
|
@@ -1200,7 +1200,9 @@ function parsePrysmBadge(badge) {
|
|
|
1200
1200
|
icon: mapImage(badge?.icon, true, 80, 80, 95, null, true)?.url,
|
|
1201
1201
|
label: badge?.label,
|
|
1202
1202
|
link: badge?.link?.href,
|
|
1203
|
-
type: badge?.type
|
|
1203
|
+
type: badge?.type,
|
|
1204
|
+
level: badge?.level,
|
|
1205
|
+
guarantee: badge?.guarantee
|
|
1204
1206
|
}
|
|
1205
1207
|
}
|
|
1206
1208
|
return null;
|