@nuskin/product-components 3.17.11 → 3.17.12-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/.releaserc +1 -1
- package/docs/CHANGELOG.md +1 -1
- package/gl-sbom-npm-yarn.cdx.json +2 -2
- package/mixins/NsProductMixin.js +17 -3
- package/package.json +1 -1
package/.releaserc
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.17.
|
|
1
|
+
## [3.17.12-brw-4218.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.12-brw-4218.1...v3.17.12-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:d73a15c1-eeb7-41e9-8e79-335f98aa0060",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "2024-08-
|
|
7
|
+
"timestamp": "2024-08-27T18:49:43Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "GitLab",
|
package/mixins/NsProductMixin.js
CHANGED
|
@@ -662,6 +662,7 @@ const NsProductMixin = {
|
|
|
662
662
|
);
|
|
663
663
|
})
|
|
664
664
|
.catch(error => {
|
|
665
|
+
this.maxQuantity = shopProduct.maxQuantity;
|
|
665
666
|
console.error("Failed to retrieve add to cart quantity.", error);
|
|
666
667
|
})
|
|
667
668
|
.finally(() => {
|
|
@@ -706,9 +707,14 @@ const NsProductMixin = {
|
|
|
706
707
|
let backOrderDate = new Date(this.product.backOrderDate);
|
|
707
708
|
let today = new Date();
|
|
708
709
|
if (backOrderDate < today) {
|
|
709
|
-
this.
|
|
710
|
-
|
|
711
|
-
|
|
710
|
+
if (this.product.availableQuantity > 0) {
|
|
711
|
+
this.statusMessage = "";
|
|
712
|
+
this.statusMessageKey = "releasedForSale";
|
|
713
|
+
} else {
|
|
714
|
+
this.statusMessage = this.localTranslations.outOfStock;
|
|
715
|
+
this.statusMessageKey = "outOfStock";
|
|
716
|
+
this.disable();
|
|
717
|
+
}
|
|
712
718
|
}
|
|
713
719
|
}
|
|
714
720
|
} else {
|
|
@@ -1118,6 +1124,14 @@ const NsProductMixin = {
|
|
|
1118
1124
|
productToAdd.equinoxProductId = productIdentifier;
|
|
1119
1125
|
//productToAdd.properties = productData.products[0].properties
|
|
1120
1126
|
}
|
|
1127
|
+
if (
|
|
1128
|
+
productToAdd.backOrderDate &&
|
|
1129
|
+
new Date(productToAdd.backOrderDate) > new Date()
|
|
1130
|
+
) {
|
|
1131
|
+
productToAdd.inventory = "BACKORDER";
|
|
1132
|
+
productToAdd.properties.isBackOrdered = true;
|
|
1133
|
+
productToAdd.properties.inventoryStatus = "BACKORDER";
|
|
1134
|
+
}
|
|
1121
1135
|
options.product = new ShopProduct(productToAdd);
|
|
1122
1136
|
options.add = {
|
|
1123
1137
|
item: {
|