thm-p3-configurator 0.0.111 → 0.0.112

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.
@@ -228,18 +228,20 @@ const InternalAppointmentForm = _ref => {
228
228
 
229
229
  // Otherwise, default to Nederland
230
230
  const defaultCountry = countryOptions.find(option => option.label === 'NEDERLAND');
231
-
232
- // If found, automatically set this as the customer's country
233
- if (defaultCountry) {
234
- dispatch({
235
- type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_COUNTRY_ID,
236
- payload: {
237
- countryId: defaultCountry.value
238
- }
239
- });
240
- return defaultCountry;
231
+ return defaultCountry || null;
232
+ }, [customer === null || customer === void 0 ? void 0 : customer.countryId, countryOptions]);
233
+ (0, _react.useEffect)(() => {
234
+ if (!(customer !== null && customer !== void 0 && customer.countryId) && countryOptions !== null && countryOptions !== void 0 && countryOptions.length) {
235
+ const defaultCountry = countryOptions.find(option => option.label === 'NEDERLAND');
236
+ if (defaultCountry) {
237
+ dispatch({
238
+ type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_COUNTRY_ID,
239
+ payload: {
240
+ countryId: defaultCountry.value
241
+ }
242
+ });
243
+ }
241
244
  }
242
- return null;
243
245
  }, [customer === null || customer === void 0 ? void 0 : customer.countryId, countryOptions, dispatch]);
244
246
  const {
245
247
  branchById
@@ -315,7 +317,10 @@ const InternalAppointmentForm = _ref => {
315
317
  customerAgreed: productSpecifications !== null && productSpecifications !== void 0 && productSpecifications.length ? customerAgreed : true // Note: this skips validation if no productSpecifications are found
316
318
  }), {
317
319
  strict: false,
318
- abortEarly: false
320
+ abortEarly: false,
321
+ context: {
322
+ existingDossierId: existingDossierId
323
+ }
319
324
  });
320
325
  await onSubmit((0, _helpers__.removeNullishProps)({
321
326
  vehicle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.111",
3
+ "version": "0.0.112",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",