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
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
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,
|