thm-p3-configurator 0.0.75 → 0.0.76

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.
@@ -84,6 +84,7 @@ const ProductSpecifications = _ref3 => {
84
84
  const ProductActions = _ref4 => {
85
85
  let {
86
86
  isOutOfStock,
87
+ stock,
87
88
  quantity,
88
89
  productId,
89
90
  handleQuantityChange,
@@ -94,9 +95,11 @@ const ProductActions = _ref4 => {
94
95
  className: (0, _helpers__.withStyle)('d-flex justify-content-end')
95
96
  }, /*#__PURE__*/_react.default.createElement("div", {
96
97
  className: (0, _helpers__.withStyle)('d-flex flex-column align-items-end')
97
- }, isOutOfStock && /*#__PURE__*/_react.default.createElement("div", {
98
+ }, isOutOfStock ? /*#__PURE__*/_react.default.createElement("div", {
98
99
  className: (0, _helpers__.withStyle)('text-danger mb-1')
99
- }, "Niet op voorraad"), /*#__PURE__*/_react.default.createElement("div", {
100
+ }, "Niet op voorraad") : /*#__PURE__*/_react.default.createElement("div", {
101
+ className: (0, _helpers__.withStyle)('text-success mb-1')
102
+ }, stock, " op voorraad"), /*#__PURE__*/_react.default.createElement("div", {
100
103
  className: (0, _helpers__.withStyle)('d-flex align-items-center')
101
104
  }, /*#__PURE__*/_react.default.createElement(_NumericInput.default, {
102
105
  className: (0, _helpers__.withStyle)('me-2 rounded'),
@@ -136,6 +139,7 @@ const SingleOrderProductCard = _ref6 => {
136
139
  let {
137
140
  productId,
138
141
  isSelected,
142
+ stock,
139
143
  isOutOfStock,
140
144
  handleSelected,
141
145
  productImage,
@@ -177,6 +181,7 @@ const SingleOrderProductCard = _ref6 => {
177
181
  specifications: productSpecifications
178
182
  })), /*#__PURE__*/_react.default.createElement(ProductActions, {
179
183
  isOutOfStock: isOutOfStock,
184
+ stock: stock,
180
185
  quantity: quantity,
181
186
  productId: productId,
182
187
  handleQuantityChange: handleQuantityChange,
@@ -124,14 +124,15 @@ const InternalSingleOrderProductOverview = _ref => {
124
124
  message: "Geen producten gevonden.",
125
125
  subMessage: "Probeer een ander filter toe te passen."
126
126
  }), articles && hasActiveFilters && (articles === null || articles === void 0 || (_articles$articles2 = articles.articles) === null || _articles$articles2 === void 0 ? void 0 : _articles$articles2.length) > 0 && (articles === null || articles === void 0 || (_articles$articles3 = articles.articles) === null || _articles$articles3 === void 0 ? void 0 : _articles$articles3.map(article => {
127
- var _cart$find$quantity, _cart$find, _article$locationPric, _article$consumerPric;
127
+ var _cart$find$quantity, _cart$find, _article$locationPric, _article$locationPric2, _article$locationPric3, _article$consumerPric;
128
128
  return /*#__PURE__*/_react.default.createElement(_SingleOrderProductCard.default, {
129
129
  key: article.articleNumber,
130
130
  removeFromCart: () => _removeFromCart(article.articleNumber),
131
131
  productId: article.articleNumber,
132
132
  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,
133
133
  isSelected: false,
134
- 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,
134
+ stock: (_article$locationPric = article === null || article === void 0 || (_article$locationPric2 = article.locationPrices) === null || _article$locationPric2 === void 0 || (_article$locationPric2 = _article$locationPric2.stock) === null || _article$locationPric2 === void 0 ? void 0 : _article$locationPric2.quantity) !== null && _article$locationPric !== void 0 ? _article$locationPric : 0,
135
+ isOutOfStock: (article === null || article === void 0 || (_article$locationPric3 = article.locationPrices) === null || _article$locationPric3 === void 0 || (_article$locationPric3 = _article$locationPric3.stock) === null || _article$locationPric3 === void 0 ? void 0 : _article$locationPric3.status) == _constants__.StockStatus.OutOfStock,
135
136
  handleSelected: () => handleQuantityChange(article.articleNumber, 1),
136
137
  articleNumber: article.articleNumber,
137
138
  handleQuantityChange: handleQuantityChange,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.75",
3
+ "version": "0.0.76",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",