@nuskin/product-components 3.17.3-version-downgrade.1 → 3.17.4

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", {"name":"CX24-version-downgrade", "channel":"prerelease", "prerelease":"version-downgrade"}
3
+ "master"
4
4
  ],
5
5
  "plugins": [
6
6
  "@semantic-release/release-notes-generator",
@@ -772,7 +772,13 @@ export default {
772
772
  : this.products[sku].availableQuantity || 0;
773
773
  const selectedQuantity = this.products[sku].availability
774
774
  .selectedQuantity;
775
-
775
+ if (
776
+ this.products[sku].invalid ||
777
+ this.products[sku].data.availableQuantity <= 0 ||
778
+ !this.products[sku].availability.addToCart
779
+ ) {
780
+ return undefined;
781
+ }
776
782
  if (!this.products[sku].invalid && availableQuantity >= 1) {
777
783
  selectedQuantityArr[
778
784
  this.products[sku].activeSku
@@ -906,6 +912,7 @@ export default {
906
912
 
907
913
  if (
908
914
  availability &&
915
+ availability.addToCart &&
909
916
  Object.keys(this.products[sku].data).length >= 1 &&
910
917
  availableQuantity >= 1
911
918
  ) {
package/docs/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- ## [3.17.3-version-downgrade.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.2...v3.17.3-version-downgrade.1) (2024-06-18)
1
+ ## [3.17.4](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.3...v3.17.4) (2024-07-02)
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "bomFormat": "CycloneDX",
3
3
  "specVersion": "1.4",
4
- "serialNumber": "urn:uuid:ee471e23-b48e-4b44-bfa7-0c00013dce65",
4
+ "serialNumber": "urn:uuid:5af7027a-2634-4d64-8e74-48e730c110c5",
5
5
  "version": 1,
6
6
  "metadata": {
7
- "timestamp": "2024-06-18T04:34:46Z",
7
+ "timestamp": "2024-07-02T09:29:13Z",
8
8
  "tools": [
9
9
  {
10
10
  "vendor": "GitLab",
@@ -703,6 +703,14 @@ const NsProductMixin = {
703
703
  )
704
704
  );
705
705
  this.statusMessageKey = "backOrderedWithDate";
706
+
707
+ let backOrderDate = new Date(this.product.backOrderDate);
708
+ let today = new Date();
709
+ if (backOrderDate < today) {
710
+ this.statusMessage = this.localTranslations.outOfStock;
711
+ this.statusMessageKey = "outOfStock";
712
+ this.disable();
713
+ }
706
714
  }
707
715
  } else {
708
716
  this.disable();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.17.3-version-downgrade.1",
3
+ "version": "3.17.4",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {