thm-p3-configurator 0.0.49 → 0.0.50

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.
@@ -81,7 +81,7 @@ const ProductSpecifications = _ref3 => {
81
81
  };
82
82
  const ProductActions = _ref4 => {
83
83
  let {
84
- isDisabled,
84
+ isOutOfStock,
85
85
  quantity,
86
86
  productId,
87
87
  handleQuantityChange,
@@ -92,11 +92,11 @@ const ProductActions = _ref4 => {
92
92
  className: (0, _helpers__.withStyle)('d-flex justify-content-end')
93
93
  }, /*#__PURE__*/_react.default.createElement("div", {
94
94
  className: (0, _helpers__.withStyle)('d-flex flex-column align-items-end')
95
- }, isDisabled && /*#__PURE__*/_react.default.createElement("div", {
95
+ }, isOutOfStock && /*#__PURE__*/_react.default.createElement("div", {
96
96
  className: (0, _helpers__.withStyle)('text-danger mb-1')
97
- }, "Out of stock"), /*#__PURE__*/_react.default.createElement("div", {
97
+ }, "Niet op voorraad"), /*#__PURE__*/_react.default.createElement("div", {
98
98
  className: (0, _helpers__.withStyle)('d-flex align-items-center')
99
- }, !isDisabled && /*#__PURE__*/_react.default.createElement(_NumericInput.default, {
99
+ }, /*#__PURE__*/_react.default.createElement(_NumericInput.default, {
100
100
  className: (0, _helpers__.withStyle)('me-2 rounded'),
101
101
  width: "100px",
102
102
  height: "55px",
@@ -105,7 +105,6 @@ const ProductActions = _ref4 => {
105
105
  buttonTransformY: 40
106
106
  }), quantity === 0 ? /*#__PURE__*/_react.default.createElement(_PrimaryButton.default, {
107
107
  onClick: () => handleSelected(productId, quantity + 1),
108
- isDisabled: isDisabled,
109
108
  label: "Toevoegen"
110
109
  }) : /*#__PURE__*/_react.default.createElement(_OutlinedButton.default, {
111
110
  onClick: () => removeFromCart(productId),
@@ -116,7 +115,7 @@ const SingleOrderProductCard = _ref5 => {
116
115
  let {
117
116
  productId,
118
117
  isSelected,
119
- isDisabled,
118
+ isOutOfStock,
120
119
  handleSelected,
121
120
  productImage,
122
121
  productTitle,
@@ -129,8 +128,7 @@ const SingleOrderProductCard = _ref5 => {
129
128
  } = _ref5;
130
129
  return /*#__PURE__*/_react.default.createElement("div", {
131
130
  key: productId + "-".concat(Date.now()),
132
- className: (0, _helpers__.withStyle)("card card__horizontal card__link ".concat(isSelected ? 'active' : '', " container-fluid p-0 my-3")),
133
- disabled: isDisabled
131
+ className: (0, _helpers__.withStyle)("card card__horizontal card__link ".concat(isSelected ? 'active' : '', " container-fluid p-0 my-3"))
134
132
  }, /*#__PURE__*/_react.default.createElement("div", {
135
133
  className: (0, _helpers__.withStyle)('row g-0')
136
134
  }, /*#__PURE__*/_react.default.createElement(ProductImage, {
@@ -148,7 +146,7 @@ const SingleOrderProductCard = _ref5 => {
148
146
  }), /*#__PURE__*/_react.default.createElement(ProductSpecifications, {
149
147
  specifications: productSpecifications
150
148
  })), /*#__PURE__*/_react.default.createElement(ProductActions, {
151
- isDisabled: isDisabled,
149
+ isOutOfStock: isOutOfStock,
152
150
  quantity: quantity,
153
151
  productId: productId,
154
152
  handleQuantityChange: handleQuantityChange,
@@ -26,11 +26,11 @@ var _queries = require("../../__api__/queries");
26
26
  var _constants__ = require("../../__constants__");
27
27
  var _OrderSessionContext = require("../../__context__/OrderSessionContext");
28
28
  var _helpers__ = require("../../__helpers__");
29
- var _LinkButton = _interopRequireDefault(require("../Buttons/LinkButton"));
30
29
  var _LocalStorageWorker = require("../../__services__/LocalStorageWorker");
30
+ var _LinkButton = _interopRequireDefault(require("../Buttons/LinkButton"));
31
31
  var _CardWide = _interopRequireDefault(require("../Cards/CardWide"));
32
- var _TextInput = _interopRequireDefault(require("../Form/TextInput"));
33
32
  var _DropdownInput = _interopRequireDefault(require("../Form/DropdownInput"));
33
+ var _TextInput = _interopRequireDefault(require("../Form/TextInput"));
34
34
  function _interopRequireDefault(e) {
35
35
  return e && e.__esModule ? e : {
36
36
  default: e
@@ -117,7 +117,7 @@ const InternalSingleOrderProductOverview = _ref => {
117
117
  productId: article.articleNumber,
118
118
  quantity: (_cart$find$quantity = (_cart$find = cart.find(product => product.articleNumber === article.articleNumber)) === null || _cart$find === void 0 ? void 0 : _cart$find.quantity) !== null && _cart$find$quantity !== void 0 ? _cart$find$quantity : 0,
119
119
  isSelected: false,
120
- isDisabled: (article === null || article === void 0 || (_article$locationPric = article.locationPrices) === null || _article$locationPric === void 0 || (_article$locationPric = _article$locationPric.stock) === null || _article$locationPric === void 0 ? void 0 : _article$locationPric.status) == _constants__.StockStatus.OutOfStock,
120
+ isOutOfStock: (article === null || article === void 0 || (_article$locationPric = article.locationPrices) === null || _article$locationPric === void 0 || (_article$locationPric = _article$locationPric.stock) === null || _article$locationPric === void 0 ? void 0 : _article$locationPric.status) == _constants__.StockStatus.OutOfStock,
121
121
  handleSelected: () => handleQuantityChange(article.articleNumber, 1),
122
122
  handleQuantityChange: handleQuantityChange,
123
123
  productSpecifications: article === null || article === void 0 ? void 0 : article.specifications,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",