@nuskin/product-components 3.17.10 → 3.17.11-brw-4218.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/.releaserc +1 -1
- package/docs/CHANGELOG.md +1 -1
- package/gl-sbom-npm-yarn.cdx.json +2 -2
- package/mixins/NsProductMixin.js +5 -15
- package/package.json +1 -1
- package/services/EQPromotionService.js +2 -0
package/.releaserc
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.17.
|
|
1
|
+
## [3.17.11-brw-4218.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.10...v3.17.11-brw-4218.1) (2024-08-21)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.4",
|
|
4
|
-
"serialNumber": "urn:uuid:
|
|
4
|
+
"serialNumber": "urn:uuid:f33d6487-1a84-4b69-a58a-a789b7fe167b",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "2024-08-
|
|
7
|
+
"timestamp": "2024-08-21T19:56:10Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "GitLab",
|
package/mixins/NsProductMixin.js
CHANGED
|
@@ -662,7 +662,6 @@ const NsProductMixin = {
|
|
|
662
662
|
);
|
|
663
663
|
})
|
|
664
664
|
.catch(error => {
|
|
665
|
-
this.maxQuantity = 0;
|
|
666
665
|
console.error("Failed to retrieve add to cart quantity.", error);
|
|
667
666
|
})
|
|
668
667
|
.finally(() => {
|
|
@@ -890,10 +889,9 @@ const NsProductMixin = {
|
|
|
890
889
|
// set sales event pricing and points
|
|
891
890
|
this.originalPriceType = this.product.priceType;
|
|
892
891
|
|
|
893
|
-
this.originalPrice =
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
: this.product.getOriginalPrice();
|
|
892
|
+
this.originalPrice = isGraphQLActive
|
|
893
|
+
? this.product.getPricing(PriceType.WRTL)
|
|
894
|
+
: this.product.getOriginalPrice();
|
|
897
895
|
|
|
898
896
|
//workaround for graphQL active to show original price
|
|
899
897
|
if (isGraphQLActive) {
|
|
@@ -912,11 +910,7 @@ const NsProductMixin = {
|
|
|
912
910
|
//If EQ market, always show the discounted price if product has promotion
|
|
913
911
|
//Hence, we set the price to member(wholesale / PriceType.WADW) if the price type PriceType.WADR (retail)
|
|
914
912
|
//this is inline with the change in business rules to always show the discounted prices
|
|
915
|
-
if (
|
|
916
|
-
isEquinoxEnabled &&
|
|
917
|
-
!isGraphQLActive &&
|
|
918
|
-
this.getAdrPriceType() == PriceType.WADR
|
|
919
|
-
) {
|
|
913
|
+
if (isGraphQLActive && this.getAdrPriceType() == PriceType.WADR) {
|
|
920
914
|
this.adrPrice = this.product.getPricing(PriceType.WADW);
|
|
921
915
|
}
|
|
922
916
|
|
|
@@ -925,11 +919,7 @@ const NsProductMixin = {
|
|
|
925
919
|
//for product that has promotion
|
|
926
920
|
//set the price to WWHL if this.getPriceType() === WRTL
|
|
927
921
|
//promotion price is set in product.js setPriceAndPvFromType function
|
|
928
|
-
if (
|
|
929
|
-
isEquinoxEnabled &&
|
|
930
|
-
!isGraphQLActive &&
|
|
931
|
-
this.getPriceType() == PriceType.WRTL
|
|
932
|
-
) {
|
|
922
|
+
if (isGraphQLActive && this.getPriceType() == PriceType.WRTL) {
|
|
933
923
|
this.price = this.product.getPricing(PriceType.WWHL);
|
|
934
924
|
}
|
|
935
925
|
|
package/package.json
CHANGED
|
@@ -41,6 +41,8 @@ const buildPayload = product => {
|
|
|
41
41
|
let personalOffer = sessionStorage.getItem("personalOffer");
|
|
42
42
|
if (personalOffer !== null) {
|
|
43
43
|
personalOffer = JSON.parse(personalOffer);
|
|
44
|
+
} else {
|
|
45
|
+
personalOffer = { products: [] };
|
|
44
46
|
}
|
|
45
47
|
const matchedProduct = personalOffer.products.filter(
|
|
46
48
|
offerProduct => offerProduct.sku === product.sku
|