@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "branches": [
3
- "master"
3
+ "master", {"name":"BRW-4218", "channel":"prerelease", "prerelease":"brw-4218"}
4
4
  ],
5
5
  "plugins": [
6
6
  "@semantic-release/release-notes-generator",
package/docs/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- ## [3.17.11](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.10...v3.17.11) (2024-08-22)
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:9cc5144a-9548-4485-b27b-466c1afa6324",
4
+ "serialNumber": "urn:uuid:d73a15c1-eeb7-41e9-8e79-335f98aa0060",
5
5
  "version": 1,
6
6
  "metadata": {
7
- "timestamp": "2024-08-22T19:37:18Z",
7
+ "timestamp": "2024-08-27T18:49:43Z",
8
8
  "tools": [
9
9
  {
10
10
  "vendor": "GitLab",
@@ -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.statusMessage = this.localTranslations.outOfStock;
710
- this.statusMessageKey = "outOfStock";
711
- this.disable();
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.17.11",
3
+ "version": "3.17.12-brw-4218.2",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {