thm-p3-configurator 0.0.360 → 0.0.361

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.
@@ -90,7 +90,8 @@ const VehicleData = _ref => {
90
90
  durationAnswer,
91
91
  discountCode,
92
92
  priceCalculationDate,
93
- singleOrderFormulaCode
93
+ singleOrderFormulaCode,
94
+ buildYear: sessionBuildYear
94
95
  }] = (0, _OrderSessionContext.useOrderSession)();
95
96
  const isTmg = (0, _useIsTmg.useIsTmg)();
96
97
  let formula = (0, _FormulaContext.useFormula)();
@@ -110,7 +111,8 @@ const VehicleData = _ref => {
110
111
  discountCode,
111
112
  priceCalculationDate
112
113
  });
113
- const buildYear = new Date(orderData === null || orderData === void 0 || (_orderData$vehicleInf = orderData.vehicleInfo) === null || _orderData$vehicleInf === void 0 || (_orderData$vehicleInf = _orderData$vehicleInf.vehicle) === null || _orderData$vehicleInf === void 0 ? void 0 : _orderData$vehicleInf.constructionDate).getFullYear();
114
+ const constructionDateYear = new Date(orderData === null || orderData === void 0 || (_orderData$vehicleInf = orderData.vehicleInfo) === null || _orderData$vehicleInf === void 0 || (_orderData$vehicleInf = _orderData$vehicleInf.vehicle) === null || _orderData$vehicleInf === void 0 ? void 0 : _orderData$vehicleInf.constructionDate).getFullYear();
115
+ const buildYear = Number.isFinite(constructionDateYear) ? constructionDateYear : sessionBuildYear !== null && sessionBuildYear !== void 0 ? sessionBuildYear : null;
114
116
  const vehicleLogo = orderData === null || orderData === void 0 || (_orderData$vehicleInf2 = orderData.vehicleInfo) === null || _orderData$vehicleInf2 === void 0 || (_orderData$vehicleInf2 = _orderData$vehicleInf2.make) === null || _orderData$vehicleInf2 === void 0 ? void 0 : _orderData$vehicleInf2.logo;
115
117
  const vehicleDetails = _objectSpread(_objectSpread(_objectSpread({
116
118
  merk: orderData === null || orderData === void 0 || (_orderData$vehicleInf3 = orderData.vehicleInfo) === null || _orderData$vehicleInf3 === void 0 || (_orderData$vehicleInf3 = _orderData$vehicleInf3.make) === null || _orderData$vehicleInf3 === void 0 ? void 0 : _orderData$vehicleInf3.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.360",
3
+ "version": "0.0.361",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",