thm-p3-configurator 0.0.43 → 0.0.45
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.
- package/dist/src/shared/__containers__/AppointmentForm.js +3 -2
- package/dist/src/shared/__containers__/ExitIntentModal.js +3 -2
- package/dist/src/shared/__containers__/internal/InternalAppointmentForm.js +11 -11
- package/dist/src/shared/__containers__/internal/InternalAppointmentSuccessModal.js +4 -10
- package/dist/src/shared/__containers__/internal/InternalQuotationForm.js +11 -11
- package/dist/src/shared/__containers__/internal/InternalQuotationSuccessModal.js +4 -10
- package/dist/src/shared/__helpers__/dossier.js +5 -5
- package/package.json +1 -1
|
@@ -146,6 +146,7 @@ const AppointmentForm = () => {
|
|
|
146
146
|
const history = (0, _reactRouter.useHistory)();
|
|
147
147
|
const handleSubmit = async () => {
|
|
148
148
|
try {
|
|
149
|
+
var _customer$firstName, _customer$lastName;
|
|
149
150
|
setErrors(null);
|
|
150
151
|
appointmentFormSchema.validateSync(_objectSpread(_objectSpread({}, customer), {}, {
|
|
151
152
|
termsAndConditions: isTermsAccepted
|
|
@@ -162,8 +163,8 @@ const AppointmentForm = () => {
|
|
|
162
163
|
execution2: executionAnswer2
|
|
163
164
|
}),
|
|
164
165
|
customer: (0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({}, customer), {}, {
|
|
165
|
-
firstName: (customer === null || customer === void 0 ? void 0 : customer.firstName)
|
|
166
|
-
lastName: (customer === null || customer === void 0 ? void 0 : customer.lastName)
|
|
166
|
+
firstName: (_customer$firstName = customer === null || customer === void 0 ? void 0 : customer.firstName) !== null && _customer$firstName !== void 0 ? _customer$firstName : undefined,
|
|
167
|
+
lastName: (_customer$lastName = customer === null || customer === void 0 ? void 0 : customer.lastName) !== null && _customer$lastName !== void 0 ? _customer$lastName : undefined
|
|
167
168
|
})),
|
|
168
169
|
formula,
|
|
169
170
|
branchId: selectedBranch,
|
|
@@ -160,6 +160,7 @@ const ExitIntentModal = () => {
|
|
|
160
160
|
};
|
|
161
161
|
const handleSubmit = async () => {
|
|
162
162
|
try {
|
|
163
|
+
var _customer$firstName, _customer$lastName;
|
|
163
164
|
setErrors(null);
|
|
164
165
|
exitIntentFormSchema.validateSync({
|
|
165
166
|
phoneNumber: customer.phoneNumber,
|
|
@@ -182,8 +183,8 @@ const ExitIntentModal = () => {
|
|
|
182
183
|
code: discountCode
|
|
183
184
|
} : null,
|
|
184
185
|
customer: _objectSpread(_objectSpread({}, customer), {}, {
|
|
185
|
-
firstName: (customer === null || customer === void 0 ? void 0 : customer.firstName)
|
|
186
|
-
lastName: (customer === null || customer === void 0 ? void 0 : customer.lastName)
|
|
186
|
+
firstName: (_customer$firstName = customer === null || customer === void 0 ? void 0 : customer.firstName) !== null && _customer$firstName !== void 0 ? _customer$firstName : undefined,
|
|
187
|
+
lastName: (_customer$lastName = customer === null || customer === void 0 ? void 0 : customer.lastName) !== null && _customer$lastName !== void 0 ? _customer$lastName : undefined
|
|
187
188
|
}),
|
|
188
189
|
branchId: selectedBranch,
|
|
189
190
|
selectBoardComputerUpdate: selectedBoardComputer != null,
|
|
@@ -224,7 +224,7 @@ const InternalAppointmentForm = _ref => {
|
|
|
224
224
|
};
|
|
225
225
|
const handleSubmit = async () => {
|
|
226
226
|
try {
|
|
227
|
-
var _ref2;
|
|
227
|
+
var _customer$firstName, _customer$lastName, _customer$phoneNumber, _customer$houseNumber, _customer$streetName, _customer$countryId, _customer$city, _customer$email, _customer$note, _customer$zipCode, _ref2;
|
|
228
228
|
setErrors([]);
|
|
229
229
|
|
|
230
230
|
// Note: this does not throw on error.
|
|
@@ -253,16 +253,16 @@ const InternalAppointmentForm = _ref => {
|
|
|
253
253
|
await onSubmit((0, _helpers__.removeNullishProps)({
|
|
254
254
|
vehicle,
|
|
255
255
|
customer: _objectSpread(_objectSpread({}, customer), {}, {
|
|
256
|
-
firstName: (customer === null || customer === void 0 ? void 0 : customer.firstName)
|
|
257
|
-
lastName: (customer === null || customer === void 0 ? void 0 : customer.lastName)
|
|
258
|
-
phoneNumber: (customer === null || customer === void 0 ? void 0 : customer.phoneNumber)
|
|
259
|
-
houseNumber: (customer === null || customer === void 0 ? void 0 : customer.houseNumber)
|
|
260
|
-
streetName: (customer === null || customer === void 0 ? void 0 : customer.streetName)
|
|
261
|
-
countryId: (customer === null || customer === void 0 ? void 0 : customer.countryId)
|
|
262
|
-
city: (customer === null || customer === void 0 ? void 0 : customer.city)
|
|
263
|
-
email: (customer === null || customer === void 0 ? void 0 : customer.email)
|
|
264
|
-
note: (customer === null || customer === void 0 ? void 0 : customer.note)
|
|
265
|
-
zipCode: (customer === null || customer === void 0 ? void 0 : customer.zipCode)
|
|
256
|
+
firstName: (_customer$firstName = customer === null || customer === void 0 ? void 0 : customer.firstName) !== null && _customer$firstName !== void 0 ? _customer$firstName : undefined,
|
|
257
|
+
lastName: (_customer$lastName = customer === null || customer === void 0 ? void 0 : customer.lastName) !== null && _customer$lastName !== void 0 ? _customer$lastName : undefined,
|
|
258
|
+
phoneNumber: (_customer$phoneNumber = customer === null || customer === void 0 ? void 0 : customer.phoneNumber) !== null && _customer$phoneNumber !== void 0 ? _customer$phoneNumber : undefined,
|
|
259
|
+
houseNumber: (_customer$houseNumber = customer === null || customer === void 0 ? void 0 : customer.houseNumber) !== null && _customer$houseNumber !== void 0 ? _customer$houseNumber : undefined,
|
|
260
|
+
streetName: (_customer$streetName = customer === null || customer === void 0 ? void 0 : customer.streetName) !== null && _customer$streetName !== void 0 ? _customer$streetName : undefined,
|
|
261
|
+
countryId: (_customer$countryId = customer === null || customer === void 0 ? void 0 : customer.countryId) !== null && _customer$countryId !== void 0 ? _customer$countryId : undefined,
|
|
262
|
+
city: (_customer$city = customer === null || customer === void 0 ? void 0 : customer.city) !== null && _customer$city !== void 0 ? _customer$city : undefined,
|
|
263
|
+
email: (_customer$email = customer === null || customer === void 0 ? void 0 : customer.email) !== null && _customer$email !== void 0 ? _customer$email : undefined,
|
|
264
|
+
note: (_customer$note = customer === null || customer === void 0 ? void 0 : customer.note) !== null && _customer$note !== void 0 ? _customer$note : undefined,
|
|
265
|
+
zipCode: (_customer$zipCode = customer === null || customer === void 0 ? void 0 : customer.zipCode) !== null && _customer$zipCode !== void 0 ? _customer$zipCode : undefined
|
|
266
266
|
}),
|
|
267
267
|
customerAgreed,
|
|
268
268
|
appointment,
|
|
@@ -59,20 +59,14 @@ const InternalAppointmentSuccessModal = _ref => {
|
|
|
59
59
|
} = (0, _mutations.useCreatePrivateAppointmentMutation)();
|
|
60
60
|
(0, _react.useEffect)(() => {
|
|
61
61
|
resetPlannedAppointmentCreation();
|
|
62
|
-
queryClient.invalidateQueries(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
queryClient.invalidateQueries({
|
|
66
|
-
queryKey: ['appointment-requests']
|
|
67
|
-
});
|
|
68
|
-
queryClient.invalidateQueries({
|
|
69
|
-
queryKey: ['quotations']
|
|
70
|
-
});
|
|
62
|
+
queryClient.invalidateQueries('appointments');
|
|
63
|
+
queryClient.invalidateQueries('appointment-requests');
|
|
64
|
+
queryClient.invalidateQueries('quotations');
|
|
71
65
|
if (typeof window !== 'undefined') {
|
|
72
66
|
const appEl = window.document.getElementsByTagName('main');
|
|
73
67
|
setAnchorEl(appEl === null || appEl === void 0 ? void 0 : appEl[0]);
|
|
74
68
|
}
|
|
75
|
-
}, []);
|
|
69
|
+
}, [isOpen]);
|
|
76
70
|
if (!anchorEl) {
|
|
77
71
|
return null;
|
|
78
72
|
}
|
|
@@ -189,7 +189,7 @@ const InternalQuotationForm = _ref => {
|
|
|
189
189
|
*/
|
|
190
190
|
const handleSubmit = async () => {
|
|
191
191
|
try {
|
|
192
|
-
var _ref2;
|
|
192
|
+
var _customer$firstName, _customer$lastName, _customer$phoneNumber, _customer$houseNumber, _customer$streetName, _customer$countryId, _customer$city, _customer$email, _customer$note, _customer$zipCode, _ref2;
|
|
193
193
|
setErrors(null);
|
|
194
194
|
|
|
195
195
|
// Note: this does not throw on error.
|
|
@@ -215,16 +215,16 @@ const InternalQuotationForm = _ref => {
|
|
|
215
215
|
await onSubmit((0, _helpers__.removeNullishProps)({
|
|
216
216
|
vehicle,
|
|
217
217
|
customer: _objectSpread(_objectSpread({}, customer), {}, {
|
|
218
|
-
firstName: (customer === null || customer === void 0 ? void 0 : customer.firstName)
|
|
219
|
-
lastName: (customer === null || customer === void 0 ? void 0 : customer.lastName)
|
|
220
|
-
phoneNumber: (customer === null || customer === void 0 ? void 0 : customer.phoneNumber)
|
|
221
|
-
houseNumber: (customer === null || customer === void 0 ? void 0 : customer.houseNumber)
|
|
222
|
-
streetName: (customer === null || customer === void 0 ? void 0 : customer.streetName)
|
|
223
|
-
countryId: (customer === null || customer === void 0 ? void 0 : customer.countryId)
|
|
224
|
-
city: (customer === null || customer === void 0 ? void 0 : customer.city)
|
|
225
|
-
email: (customer === null || customer === void 0 ? void 0 : customer.email)
|
|
226
|
-
note: (customer === null || customer === void 0 ? void 0 : customer.note)
|
|
227
|
-
zipCode: (customer === null || customer === void 0 ? void 0 : customer.zipCode)
|
|
218
|
+
firstName: (_customer$firstName = customer === null || customer === void 0 ? void 0 : customer.firstName) !== null && _customer$firstName !== void 0 ? _customer$firstName : undefined,
|
|
219
|
+
lastName: (_customer$lastName = customer === null || customer === void 0 ? void 0 : customer.lastName) !== null && _customer$lastName !== void 0 ? _customer$lastName : undefined,
|
|
220
|
+
phoneNumber: (_customer$phoneNumber = customer === null || customer === void 0 ? void 0 : customer.phoneNumber) !== null && _customer$phoneNumber !== void 0 ? _customer$phoneNumber : undefined,
|
|
221
|
+
houseNumber: (_customer$houseNumber = customer === null || customer === void 0 ? void 0 : customer.houseNumber) !== null && _customer$houseNumber !== void 0 ? _customer$houseNumber : undefined,
|
|
222
|
+
streetName: (_customer$streetName = customer === null || customer === void 0 ? void 0 : customer.streetName) !== null && _customer$streetName !== void 0 ? _customer$streetName : undefined,
|
|
223
|
+
countryId: (_customer$countryId = customer === null || customer === void 0 ? void 0 : customer.countryId) !== null && _customer$countryId !== void 0 ? _customer$countryId : undefined,
|
|
224
|
+
city: (_customer$city = customer === null || customer === void 0 ? void 0 : customer.city) !== null && _customer$city !== void 0 ? _customer$city : undefined,
|
|
225
|
+
email: (_customer$email = customer === null || customer === void 0 ? void 0 : customer.email) !== null && _customer$email !== void 0 ? _customer$email : undefined,
|
|
226
|
+
note: (_customer$note = customer === null || customer === void 0 ? void 0 : customer.note) !== null && _customer$note !== void 0 ? _customer$note : undefined,
|
|
227
|
+
zipCode: (_customer$zipCode = customer === null || customer === void 0 ? void 0 : customer.zipCode) !== null && _customer$zipCode !== void 0 ? _customer$zipCode : undefined
|
|
228
228
|
}),
|
|
229
229
|
channel,
|
|
230
230
|
licensePlate: (_ref2 = licensePlate || _licensePlate) === null || _ref2 === void 0 ? void 0 : _ref2.replace(/-/g, ''),
|
|
@@ -60,20 +60,14 @@ const InternalQuotationSuccessModal = _ref => {
|
|
|
60
60
|
} = (0, _mutations.useCreatePrivateQuotationMutation)();
|
|
61
61
|
(0, _react.useEffect)(() => {
|
|
62
62
|
resetQuotationCreation();
|
|
63
|
-
queryClient.invalidateQueries(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
queryClient.invalidateQueries({
|
|
67
|
-
queryKey: ['appointment-requests']
|
|
68
|
-
});
|
|
69
|
-
queryClient.invalidateQueries({
|
|
70
|
-
queryKey: ['quotations']
|
|
71
|
-
});
|
|
63
|
+
queryClient.invalidateQueries('appointments');
|
|
64
|
+
queryClient.invalidateQueries('appointment-requests');
|
|
65
|
+
queryClient.invalidateQueries('quotations');
|
|
72
66
|
if (typeof window !== 'undefined') {
|
|
73
67
|
const appEl = window.document.getElementsByTagName('main');
|
|
74
68
|
setAnchorEl(appEl === null || appEl === void 0 ? void 0 : appEl[0]);
|
|
75
69
|
}
|
|
76
|
-
}, []);
|
|
70
|
+
}, [isOpen]);
|
|
77
71
|
if (!anchorEl) {
|
|
78
72
|
return null;
|
|
79
73
|
}
|
|
@@ -67,7 +67,7 @@ function _toPrimitive(t, r) {
|
|
|
67
67
|
* @description Covnerts an existing hyper dossier object into a local order session
|
|
68
68
|
*/
|
|
69
69
|
const parseDossierToOrderSession = exports.parseDossierToOrderSession = function parseDossierToOrderSession() {
|
|
70
|
-
var _dossier$kanaal, _dossier$kanaalPartne, _dossier$kanaalHoofka, _dossier$vestiging, _dossier$typeEigendom, _Date, _dossier$klant, _dossier$klant2, _dossier$klant3, _dossier$klant4, _dossier$klant5, _dossier$klant6, _dossier$klant7, _dossier$klant8, _dossier$klant9;
|
|
70
|
+
var _dossier$kanaal, _dossier$kanaalPartne, _dossier$kanaalHoofka, _dossier$vestiging, _dossier$typeEigendom, _Date, _dossier$klant, _dossier$klant2, _dossier$klant3, _dossier$klant4, _dossier$klant5, _dossier$klant$postal, _dossier$klant6, _dossier$klant$city, _dossier$klant7, _dossier$klant$street, _dossier$klant8, _dossier$klant$huisnu, _dossier$klant9;
|
|
71
71
|
let dossier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
72
72
|
return {
|
|
73
73
|
licensePlate: dossier === null || dossier === void 0 ? void 0 : dossier.kenteken,
|
|
@@ -119,10 +119,10 @@ const parseDossierToOrderSession = exports.parseDossierToOrderSession = function
|
|
|
119
119
|
infix: (dossier === null || dossier === void 0 || (_dossier$klant3 = dossier.klant) === null || _dossier$klant3 === void 0 ? void 0 : _dossier$klant3.tussenvoegsel) || '',
|
|
120
120
|
phoneNumber: (dossier === null || dossier === void 0 || (_dossier$klant4 = dossier.klant) === null || _dossier$klant4 === void 0 ? void 0 : _dossier$klant4.mobilePhoneWork) || '',
|
|
121
121
|
email: dossier === null || dossier === void 0 || (_dossier$klant5 = dossier.klant) === null || _dossier$klant5 === void 0 ? void 0 : _dossier$klant5.emailWork,
|
|
122
|
-
zipCode: (dossier === null || dossier === void 0 || (_dossier$klant6 = dossier.klant) === null || _dossier$klant6 === void 0 ? void 0 : _dossier$klant6.postalCode)
|
|
123
|
-
city: (dossier === null || dossier === void 0 || (_dossier$klant7 = dossier.klant) === null || _dossier$klant7 === void 0 ? void 0 : _dossier$klant7.city)
|
|
124
|
-
streetName: (dossier === null || dossier === void 0 || (_dossier$klant8 = dossier.klant) === null || _dossier$klant8 === void 0 ? void 0 : _dossier$klant8.street)
|
|
125
|
-
houseNumber: (dossier === null || dossier === void 0 || (_dossier$klant9 = dossier.klant) === null || _dossier$klant9 === void 0 ? void 0 : _dossier$klant9.huisnummer)
|
|
122
|
+
zipCode: (_dossier$klant$postal = dossier === null || dossier === void 0 || (_dossier$klant6 = dossier.klant) === null || _dossier$klant6 === void 0 ? void 0 : _dossier$klant6.postalCode) !== null && _dossier$klant$postal !== void 0 ? _dossier$klant$postal : undefined,
|
|
123
|
+
city: (_dossier$klant$city = dossier === null || dossier === void 0 || (_dossier$klant7 = dossier.klant) === null || _dossier$klant7 === void 0 ? void 0 : _dossier$klant7.city) !== null && _dossier$klant$city !== void 0 ? _dossier$klant$city : undefined,
|
|
124
|
+
streetName: (_dossier$klant$street = dossier === null || dossier === void 0 || (_dossier$klant8 = dossier.klant) === null || _dossier$klant8 === void 0 ? void 0 : _dossier$klant8.street) !== null && _dossier$klant$street !== void 0 ? _dossier$klant$street : undefined,
|
|
125
|
+
houseNumber: (_dossier$klant$huisnu = dossier === null || dossier === void 0 || (_dossier$klant9 = dossier.klant) === null || _dossier$klant9 === void 0 ? void 0 : _dossier$klant9.huisnummer) !== null && _dossier$klant$huisnu !== void 0 ? _dossier$klant$huisnu : undefined
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
};
|