thm-p3-configurator 0.0.220 → 0.0.223

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.
@@ -199,7 +199,8 @@ const ProductCartTable = () => {
199
199
  salesPrice: 0,
200
200
  salesPriceInclVat: 0,
201
201
  margin: 0,
202
- marginPercentage: 0
202
+ marginPercentage: 0,
203
+ hasLocationTotal: false
203
204
  };
204
205
  }
205
206
  if (!product) {
@@ -207,16 +208,18 @@ const ProductCartTable = () => {
207
208
  purchasePrice: 0,
208
209
  salesPrice: 0,
209
210
  margin: 0,
210
- marginPercentage: 0
211
+ marginPercentage: 0,
212
+ hasLocationTotal: false
211
213
  };
212
214
  }
213
215
  let purchasePrice = 0;
214
216
  let salesPrice = 0;
217
+ const hasLocationTotal = (cartItem === null || cartItem === void 0 ? void 0 : cartItem.locationTotal) !== undefined && (cartItem === null || cartItem === void 0 ? void 0 : cartItem.locationTotal) !== null;
215
218
 
216
219
  // Get prices directly from product objects
217
220
  if (APP_CONFIG.internal) {
218
221
  purchasePrice = cartItem !== null && cartItem !== void 0 && cartItem.locationTotal ? cartItem.locationTotal : (cartItem === null || cartItem === void 0 ? void 0 : cartItem.consumerTotal) || 0;
219
- salesPrice = isToggled ? (cartItem === null || cartItem === void 0 ? void 0 : cartItem.consumerTotal) / 1.21 : (cartItem === null || cartItem === void 0 ? void 0 : cartItem.consumerTotal) || 0;
222
+ salesPrice = isToggled ? (cartItem === null || cartItem === void 0 ? void 0 : cartItem.consumerTotal) / 1.21 : cartItem !== null && cartItem !== void 0 && cartItem.locationTotal ? cartItem.locationTotal : (cartItem === null || cartItem === void 0 ? void 0 : cartItem.consumerTotal) || 0;
220
223
  } else {
221
224
  purchasePrice = (product === null || product === void 0 ? void 0 : product.price) || 0;
222
225
  salesPrice = (product === null || product === void 0 ? void 0 : product.price) || 0;
@@ -225,7 +228,8 @@ const ProductCartTable = () => {
225
228
  return {
226
229
  purchasePrice,
227
230
  salesPrice,
228
- margin
231
+ margin,
232
+ hasLocationTotal
229
233
  };
230
234
  };
231
235
  if (products) {
@@ -300,7 +304,8 @@ const ProductCartTable = () => {
300
304
  purchasePrice,
301
305
  salesPrice,
302
306
  margin,
303
- marginPercentage
307
+ marginPercentage,
308
+ hasLocationTotal
304
309
  } = product.priceInfo;
305
310
  return /*#__PURE__*/_react.default.createElement(_ProductTableStaticRow.default, {
306
311
  key: product.articleNumber,
@@ -309,10 +314,10 @@ const ProductCartTable = () => {
309
314
  imageId: (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2[0]
310
315
  }) : _logoPrimary.default,
311
316
  extraCells: [{}, {}, {}, ...(isToggled ? [{
312
- text: (0, _helpers__.formatPrice)(margin),
317
+ text: hasLocationTotal ? (0, _helpers__.formatPrice)(margin) : 'N.v.t.',
313
318
  className: 'cart__table-price text-end'
314
319
  }, {
315
- text: (0, _helpers__.formatPrice)(purchasePrice),
320
+ text: hasLocationTotal ? (0, _helpers__.formatPrice)(purchasePrice) : 'N.v.t.',
316
321
  className: 'cart__table-price text-end'
317
322
  }, {
318
323
  text: (0, _helpers__.formatPrice)(salesPrice),
@@ -389,7 +394,8 @@ const ProductCartTable = () => {
389
394
  purchasePrice,
390
395
  salesPrice,
391
396
  margin,
392
- marginPercentage
397
+ marginPercentage,
398
+ hasLocationTotal
393
399
  } = product.priceInfo;
394
400
  let canProductBeAltered = canAlterQuantity;
395
401
  if (!canAlterQuantity && !(allArticleNumbers !== null && allArticleNumbers !== void 0 && allArticleNumbers.includes(product.articleNumber))) {
@@ -403,10 +409,10 @@ const ProductCartTable = () => {
403
409
  imageId: (_product$images4 = product.images) === null || _product$images4 === void 0 ? void 0 : _product$images4[0]
404
410
  }) : _logoPrimary.default,
405
411
  extraCells: [{}, {}, {}, ...(isToggled ? [{
406
- text: (0, _helpers__.formatPrice)(margin),
412
+ text: hasLocationTotal ? (0, _helpers__.formatPrice)(margin) : 'N.v.t.',
407
413
  className: 'cart__table-price text-end'
408
414
  }, {
409
- text: (0, _helpers__.formatPrice)(purchasePrice),
415
+ text: hasLocationTotal ? (0, _helpers__.formatPrice)(purchasePrice) : 'N.v.t.',
410
416
  className: 'cart__table-price text-end'
411
417
  }, {
412
418
  text: (0, _helpers__.formatPrice)(salesPrice),
@@ -1585,7 +1585,7 @@ const InternalAppointmentForm = _ref => {
1585
1585
  errorMessage: errors === null || errors === void 0 ? void 0 : errors['chassisNumber']
1586
1586
  }), /*#__PURE__*/_react.default.createElement("div", {
1587
1587
  className: (0, _helpers__.withStyle)('my-2 fw-bold')
1588
- }, "Opties aanwezig:"), productSpecifications !== null && productSpecifications !== void 0 && productSpecifications.length ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement("ul", null, productSpecifications === null || productSpecifications === void 0 ? void 0 : productSpecifications.map(specification => /*#__PURE__*/_react.default.createElement("li", {
1588
+ }, "Extra toelichting:"), productSpecifications !== null && productSpecifications !== void 0 && productSpecifications.length ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement("ul", null, productSpecifications === null || productSpecifications === void 0 ? void 0 : productSpecifications.map(specification => /*#__PURE__*/_react.default.createElement("li", {
1589
1589
  key: specification
1590
1590
  }, specification))), /*#__PURE__*/_react.default.createElement(_CheckboxInput.default, {
1591
1591
  isRequired: true,
@@ -1598,7 +1598,7 @@ const InternalAppointmentForm = _ref => {
1598
1598
  }
1599
1599
  }),
1600
1600
  errorMessage: errors === null || errors === void 0 ? void 0 : errors['customerAgreed'],
1601
- label: /*#__PURE__*/_react.default.createElement("strong", null, "Klant gaat akkoord met bovenstaande")
1601
+ label: /*#__PURE__*/_react.default.createElement("strong", null, "Bovenstaande gecommuniceerd naar en akkoord bevonden door klant")
1602
1602
  })) : /*#__PURE__*/_react.default.createElement("div", {
1603
1603
  className: (0, _helpers__.withStyle)('text-muted my-2')
1604
1604
  }, "Geen opties gevonden..."))), ' ')), /*#__PURE__*/_react.default.createElement("div", {
@@ -1673,7 +1673,7 @@ const InternalAppointmentForm = _ref => {
1673
1673
  handleSubmit(_constants__.DOSSIER_TYPES.AppointmentRequest);
1674
1674
  },
1675
1675
  isDisabled: isLoading,
1676
- label: 'Afspraak aanvraag maken'
1676
+ label: 'Afspraakaanvraag maken'
1677
1677
  })), /*#__PURE__*/_react.default.createElement("div", {
1678
1678
  className: (0, _helpers__.withStyle)('ml-3')
1679
1679
  }, /*#__PURE__*/_react.default.createElement(_PrimaryButton.default, {
@@ -1691,7 +1691,7 @@ const InternalAppointmentForm = _ref => {
1691
1691
  handleSubmit(_constants__.DOSSIER_TYPES.AppointmentRequest);
1692
1692
  },
1693
1693
  isDisabled: isLoading,
1694
- label: 'Afspraak aanvraag wijzigen'
1694
+ label: 'Afspraakaanvraag wijzigen'
1695
1695
  })) : existingDossierType === _constants__.DOSSIER_TYPES.PlannedAppointment ? /*#__PURE__*/_react.default.createElement("div", {
1696
1696
  className: (0, _helpers__.withStyle)('me-1')
1697
1697
  }, /*#__PURE__*/_react.default.createElement(_PrimaryButton.default, {
@@ -92,7 +92,7 @@ const InternalAppointmentSuccessModal = _ref => {
92
92
  };
93
93
  return /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement(_Modal.default, {
94
94
  isOpen: isOpen,
95
- title: isAppointmentRequest ? 'De afspraak aanvraag is gemaakt!' : 'De afspraak is gemaakt!',
95
+ title: isAppointmentRequest ? 'De afspraakaanvraag is gemaakt!' : 'De afspraak is gemaakt!',
96
96
  size: "wide",
97
97
  primaryButtonText: isAppointmentRequest ? 'Naar aanvragen overzicht' : 'Naar afspraken overzicht',
98
98
  secondaryButtonText: 'Naar dashboard',
@@ -931,7 +931,7 @@ const InternalQuotationForm = _ref => {
931
931
  errorMessage: errors === null || errors === void 0 ? void 0 : errors['chassisNumber']
932
932
  }), /*#__PURE__*/_react.default.createElement("div", {
933
933
  className: (0, _helpers__.withStyle)('my-2 fw-bold')
934
- }, "Opties aanwezig:"), productSpecifications !== null && productSpecifications !== void 0 && productSpecifications.length ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("ul", null, productSpecifications === null || productSpecifications === void 0 ? void 0 : productSpecifications.map(specification => /*#__PURE__*/_react.default.createElement("li", {
934
+ }, "Extra toelichting:"), productSpecifications !== null && productSpecifications !== void 0 && productSpecifications.length ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("ul", null, productSpecifications === null || productSpecifications === void 0 ? void 0 : productSpecifications.map(specification => /*#__PURE__*/_react.default.createElement("li", {
935
935
  key: specification
936
936
  }, specification)))) : /*#__PURE__*/_react.default.createElement("div", {
937
937
  className: (0, _helpers__.withStyle)('text-muted my-2')
@@ -74,7 +74,7 @@ const QuotationThanksPage = () => {
74
74
  className: (0, _helpers__.withStyle)('thm-configurator-modal-form modal d-block'),
75
75
  tabIndex: "-1"
76
76
  }, /*#__PURE__*/_react.default.createElement(_Card.default, {
77
- title: 'Bedankt voor uw offerte aanvraag',
77
+ title: 'Bedankt voor uw offerteaanvraag',
78
78
  isCentered: true,
79
79
  isScrollable: true
80
80
  }, /*#__PURE__*/_react.default.createElement("p", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.220",
3
+ "version": "0.0.223",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",