@nuskin/product-components 3.17.11-brw-4218.1 → 3.17.11-brw-4218.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/docs/CHANGELOG.md +1 -1
- package/gl-sbom-npm-yarn.cdx.json +2 -2
- package/mixins/NsProductMixin.js +16 -33
- package/package.json +2 -2
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.17.11-brw-4218.
|
|
1
|
+
## [3.17.11-brw-4218.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.11-brw-4218.1...v3.17.11-brw-4218.2) (2024-08-27)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.4",
|
|
4
|
-
"serialNumber": "urn:uuid:
|
|
4
|
+
"serialNumber": "urn:uuid:5f05f728-db21-492e-9540-f36c1753fca5",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "2024-08-
|
|
7
|
+
"timestamp": "2024-08-27T15:41:10Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "GitLab",
|
package/mixins/NsProductMixin.js
CHANGED
|
@@ -706,9 +706,14 @@ const NsProductMixin = {
|
|
|
706
706
|
let backOrderDate = new Date(this.product.backOrderDate);
|
|
707
707
|
let today = new Date();
|
|
708
708
|
if (backOrderDate < today) {
|
|
709
|
-
this.
|
|
710
|
-
|
|
711
|
-
|
|
709
|
+
if (this.product.availableQuantity > 0) {
|
|
710
|
+
this.statusMessage = "";
|
|
711
|
+
this.statusMessageKey = "releasedForSale";
|
|
712
|
+
} else {
|
|
713
|
+
this.statusMessage = this.localTranslations.outOfStock;
|
|
714
|
+
this.statusMessageKey = "outOfStock";
|
|
715
|
+
this.disable();
|
|
716
|
+
}
|
|
712
717
|
}
|
|
713
718
|
}
|
|
714
719
|
} else {
|
|
@@ -822,22 +827,8 @@ const NsProductMixin = {
|
|
|
822
827
|
* Set product pricing
|
|
823
828
|
*/
|
|
824
829
|
setStandardPricing() {
|
|
825
|
-
const equinoxMarketsConfig = getCachedConfiguration("Equinox_Markets");
|
|
826
|
-
const isGraphQLActive = equinoxMarketsConfig.MySite_graphql_active;
|
|
827
|
-
|
|
828
830
|
// set price and points
|
|
829
831
|
this.originalPrice = this.product.getPricing(PriceType.WRTL);
|
|
830
|
-
|
|
831
|
-
//graphQL adjustments
|
|
832
|
-
if (isGraphQLActive) {
|
|
833
|
-
this.originalPrice =
|
|
834
|
-
this.product.childSkus &&
|
|
835
|
-
this.product.childSkus.length &&
|
|
836
|
-
this.getPriceType() === PriceType.WWHL
|
|
837
|
-
? this.product.getPricing(PriceType.WHL)
|
|
838
|
-
: this.product.getPricing(PriceType.RTL);
|
|
839
|
-
}
|
|
840
|
-
|
|
841
832
|
this.priceType = this.getPriceType();
|
|
842
833
|
this.price = this.product.getPricing(this.priceType);
|
|
843
834
|
this.points = this.product.getPvFixed();
|
|
@@ -889,23 +880,15 @@ const NsProductMixin = {
|
|
|
889
880
|
// set sales event pricing and points
|
|
890
881
|
this.originalPriceType = this.product.priceType;
|
|
891
882
|
|
|
892
|
-
this.originalPrice = isGraphQLActive
|
|
893
|
-
? this.product.getPricing(PriceType.WRTL)
|
|
894
|
-
: this.product.getOriginalPrice();
|
|
895
|
-
|
|
896
|
-
//workaround for graphQL active to show original price
|
|
897
883
|
if (isGraphQLActive) {
|
|
898
|
-
this.originalPrice =
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
? this.product.getPricing(PriceType.WHL)
|
|
903
|
-
: this.product.getPricing(PriceType.RTL);
|
|
884
|
+
this.originalPrice = this.product.getPricing(this.originalPriceType);
|
|
885
|
+
this.product.priceType = `${this.eventName}-${this.originalPriceType}`;
|
|
886
|
+
} else {
|
|
887
|
+
this.product.getOriginalPrice();
|
|
904
888
|
}
|
|
905
889
|
|
|
906
890
|
this.priceType = this.product.priceType;
|
|
907
|
-
|
|
908
|
-
this.price = this.product.getPrice();
|
|
891
|
+
this.price = this.product.getPricing(this.priceType);
|
|
909
892
|
|
|
910
893
|
//If EQ market, always show the discounted price if product has promotion
|
|
911
894
|
//Hence, we set the price to member(wholesale / PriceType.WADW) if the price type PriceType.WADR (retail)
|
|
@@ -919,9 +902,9 @@ const NsProductMixin = {
|
|
|
919
902
|
//for product that has promotion
|
|
920
903
|
//set the price to WWHL if this.getPriceType() === WRTL
|
|
921
904
|
//promotion price is set in product.js setPriceAndPvFromType function
|
|
922
|
-
if (isGraphQLActive && this.getPriceType() == PriceType.WRTL) {
|
|
923
|
-
|
|
924
|
-
}
|
|
905
|
+
// if (isGraphQLActive && this.getPriceType() == PriceType.WRTL) {
|
|
906
|
+
// this.price = this.product.getPricing(PriceType.WWHL);
|
|
907
|
+
// }
|
|
925
908
|
|
|
926
909
|
if (this.user && this.isDistributor) {
|
|
927
910
|
this.points = this.product.getPvFixed();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/product-components",
|
|
3
|
-
"version": "3.17.11-brw-4218.
|
|
3
|
+
"version": "3.17.11-brw-4218.2",
|
|
4
4
|
"description": "Nu Skin Product Components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@nuskin/ns-core-styles": "2.11.2",
|
|
30
30
|
"@nuskin/ns-icon": "^2.12.0",
|
|
31
31
|
"@nuskin/ns-loyalty-web": "1.5.6",
|
|
32
|
-
"@nuskin/ns-product-lib": "2.
|
|
32
|
+
"@nuskin/ns-product-lib": "2.19.0",
|
|
33
33
|
"@nuskin/ns-shop": "7.0.8",
|
|
34
34
|
"@nuskin/product-recommendation": "2.0.1",
|
|
35
35
|
"axios": "1.6.7",
|