thm-p3-configurator 0.0.124 → 0.0.126

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.
@@ -124,6 +124,7 @@ function _toPrimitive(t, r) {
124
124
  return ("string" === r ? String : Number)(t);
125
125
  }
126
126
  const ProductCartTable = () => {
127
+ var _marketCorrection$con, _marketCorrection$con2;
127
128
  const formula = (0, _FormulaContext.useFormula)();
128
129
  const [isToggled, setIsToggled] = (0, _react.useState)(false);
129
130
  const [{
@@ -333,14 +334,14 @@ const ProductCartTable = () => {
333
334
  text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalMontageExclVat),
334
335
  className: 'cart__table-price text-end'
335
336
  }] : [{}, {}, {
336
- text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.montagePriceInclVat),
337
+ text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.montagePricePlusMarketCorrectionInclVat),
337
338
  className: 'cart__table-price text-end'
338
339
  }])]
339
340
  }), isToggled && marketCorrection && /*#__PURE__*/_react.default.createElement(_ProductTableStaticRow.default, {
340
341
  productTitle: 'Marktcorrectie',
341
342
  productImage: _montagePlaceholder.default,
342
343
  extraCells: [{}, {}, {}, ...(isToggled ? [{
343
- text: (marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.locationTotal) > 0 ? "".concat((0, _helpers__.formatPrice)(marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.locationTotal), " (").concat(Math.round(((marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.consumerTotal) - (marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.locationTotal)) / (marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.locationTotal) * 100 * 100) / 100, "%)") : 'N.v.t.',
344
+ text: (marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.locationTotal) > 0 ? "".concat((0, _helpers__.formatPrice)(((_marketCorrection$con = marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.consumerTotal) !== null && _marketCorrection$con !== void 0 ? _marketCorrection$con : 0) / 1.21 - marketCorrection.locationTotal), " (").concat(Math.round((((_marketCorrection$con2 = marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.consumerTotal) !== null && _marketCorrection$con2 !== void 0 ? _marketCorrection$con2 : 0) / 1.21 - marketCorrection.locationTotal) / marketCorrection.locationTotal * 10000) / 100, "%)") : 'N.v.t.',
344
345
  className: 'cart__table-price text-end'
345
346
  }, {
346
347
  text: (marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.locationTotal) > 0 ? (0, _helpers__.formatPrice)(marketCorrection === null || marketCorrection === void 0 ? void 0 : marketCorrection.locationTotal) : 'N.v.t.',
@@ -375,7 +376,7 @@ const ProductCartTable = () => {
375
376
  text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.subtotalMontageExclVat),
376
377
  className: 'fw-bold text-end pb-2'
377
378
  }] : [{
378
- text: (0, _helpers__.formatPrice)((totals === null || totals === void 0 ? void 0 : totals.subtotalMontageInclVat) - (totals === null || totals === void 0 ? void 0 : totals.totalMarketCorrectionInclVat)),
379
+ text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.subtotalMontageInclVat),
379
380
  className: 'fw-bold text-end pb-2'
380
381
  }])]
381
382
  })), accessoireProducts.length > 0 && /*#__PURE__*/_react.default.createElement(_ProductTableSection.default, {
@@ -571,41 +571,6 @@ const InternalAppointmentForm = _ref => {
571
571
  isRequired: true,
572
572
  label: "Telefoonnummer:",
573
573
  errorMessage: errors === null || errors === void 0 ? void 0 : errors['phoneNumber']
574
- }), /*#__PURE__*/_react.default.createElement(_TextInput.default, {
575
- placeholder: "",
576
- initialValue: customer.city,
577
- name: "city",
578
- onChange: value => dispatch({
579
- type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_CITY,
580
- payload: {
581
- city: value
582
- }
583
- }),
584
- key: "city",
585
- isRequired: true,
586
- label: "Stad:",
587
- errorMessage: errors === null || errors === void 0 ? void 0 : errors['city']
588
- }), /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
589
- options: countryOptions,
590
- name: "country",
591
- label: "Land:",
592
- isRequired: false,
593
- isLoading: isLoadingCountries,
594
- noOptionsMessage: "Geen landen beschikbaar",
595
- placeholder: "Selecteer een land",
596
- errorMessage: errors === null || errors === void 0 ? void 0 : errors['countryId'],
597
- initialValue: initialCountry,
598
- onChange: _ref5 => {
599
- let {
600
- value
601
- } = _ref5;
602
- return dispatch({
603
- type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_COUNTRY_ID,
604
- payload: {
605
- countryId: value
606
- }
607
- });
608
- }
609
574
  })) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_TextInput.default, {
610
575
  placeholder: "",
611
576
  initialValue: customer.firstName,
@@ -795,10 +760,10 @@ const InternalAppointmentForm = _ref => {
795
760
  placeholder: "Selecteer een land",
796
761
  errorMessage: errors === null || errors === void 0 ? void 0 : errors['countryId'],
797
762
  initialValue: initialCountry,
798
- onChange: _ref6 => {
763
+ onChange: _ref5 => {
799
764
  let {
800
765
  value
801
- } = _ref6;
766
+ } = _ref5;
802
767
  return dispatch({
803
768
  type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_COUNTRY_ID,
804
769
  payload: {
@@ -899,10 +864,10 @@ const InternalAppointmentForm = _ref => {
899
864
  placeholder: "Selecteer een land",
900
865
  errorMessage: errors === null || errors === void 0 ? void 0 : errors['countryId'],
901
866
  initialValue: initialCountry,
902
- onChange: _ref7 => {
867
+ onChange: _ref6 => {
903
868
  let {
904
869
  value
905
- } = _ref7;
870
+ } = _ref6;
906
871
  return dispatch({
907
872
  type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_COUNTRY_ID,
908
873
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.124",
3
+ "version": "0.0.126",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",