thm-p3-configurator 0.0.230 → 0.0.232
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/__api__/mutations.js +4 -2
- package/dist/src/shared/__containers__/internal/InternalAppointmentForm.js +18 -3
- package/dist/src/shared/__containers__/internal/InternalBranchSelectorModal.js +4 -11
- package/dist/src/shared/__context__/OrderSessionContext.js +14 -2
- package/package.json +1 -1
|
@@ -236,7 +236,8 @@ const useCreatePrivateAppointmentMutation = () => {
|
|
|
236
236
|
branchId,
|
|
237
237
|
formula,
|
|
238
238
|
discount,
|
|
239
|
-
customerAgreed
|
|
239
|
+
customerAgreed,
|
|
240
|
+
invoicePaymentByLeaseCompany
|
|
240
241
|
} = _ref6;
|
|
241
242
|
return _authenticatedProxyApi.authenticatedProxyApi.postAppointment({
|
|
242
243
|
appointment,
|
|
@@ -252,7 +253,8 @@ const useCreatePrivateAppointmentMutation = () => {
|
|
|
252
253
|
selectBoardComputerUpdate,
|
|
253
254
|
customer: customer,
|
|
254
255
|
branchId,
|
|
255
|
-
customerAgreed
|
|
256
|
+
customerAgreed,
|
|
257
|
+
invoicePaymentByLeaseCompany
|
|
256
258
|
});
|
|
257
259
|
});
|
|
258
260
|
return {
|
|
@@ -204,6 +204,7 @@ const InternalAppointmentForm = _ref => {
|
|
|
204
204
|
executionAnswer2,
|
|
205
205
|
priceCalculationDate,
|
|
206
206
|
selectedExtras,
|
|
207
|
+
invoicePaymentByLeaseCompany,
|
|
207
208
|
webshop
|
|
208
209
|
} = order;
|
|
209
210
|
const [errors, setErrors] = (0, _react.useState)({});
|
|
@@ -355,6 +356,7 @@ const InternalAppointmentForm = _ref => {
|
|
|
355
356
|
vatNumber: (_customer$vatNumber = customer === null || customer === void 0 ? void 0 : customer.vatNumber) !== null && _customer$vatNumber !== void 0 ? _customer$vatNumber : undefined
|
|
356
357
|
})),
|
|
357
358
|
customerAgreed,
|
|
359
|
+
invoicePaymentByLeaseCompany: invoicePaymentByLeaseCompany !== null && invoicePaymentByLeaseCompany !== void 0 ? invoicePaymentByLeaseCompany : undefined,
|
|
358
360
|
appointment,
|
|
359
361
|
appointmentType,
|
|
360
362
|
channel,
|
|
@@ -680,7 +682,7 @@ const InternalAppointmentForm = _ref => {
|
|
|
680
682
|
options: Object.values(_constants__.VEHICLE_OWNERSHIP_TYPE),
|
|
681
683
|
isRequired: true,
|
|
682
684
|
errorMessage: errors === null || errors === void 0 ? void 0 : errors['ownershipType']
|
|
683
|
-
}), (vehicle === null || vehicle === void 0 ? void 0 : vehicle.ownershipType) === _constants__.VEHICLE_OWNERSHIP_TYPE.Leasemaatschappij && /*#__PURE__*/_react.default.createElement("div", {
|
|
685
|
+
}), (vehicle === null || vehicle === void 0 ? void 0 : vehicle.ownershipType) === _constants__.VEHICLE_OWNERSHIP_TYPE.Leasemaatschappij && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
684
686
|
className: (0, _helpers__.withStyle)('company-search-container position-relative mt-2 mb-2')
|
|
685
687
|
}, /*#__PURE__*/_react.default.createElement(_TextInput.default, {
|
|
686
688
|
placeholder: "Zoek leasemaatschappijen...",
|
|
@@ -809,7 +811,20 @@ const InternalAppointmentForm = _ref => {
|
|
|
809
811
|
setCompanySearchTerm('');
|
|
810
812
|
setIsCompanyInputFocused(false);
|
|
811
813
|
}
|
|
812
|
-
}, branch.name))))
|
|
814
|
+
}, branch.name)))), /*#__PURE__*/_react.default.createElement(_CheckboxInput.default, {
|
|
815
|
+
name: "invoicePaymentByLeaseCompany",
|
|
816
|
+
label: "Factuur betaling door Leasemaatschappij",
|
|
817
|
+
initialValue: invoicePaymentByLeaseCompany,
|
|
818
|
+
onChange: val => {
|
|
819
|
+
dispatch({
|
|
820
|
+
type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_INVOICE_PAYMENT_BY_LEASE_COMPANY,
|
|
821
|
+
payload: {
|
|
822
|
+
invoicePaymentByLeaseCompany: val
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
},
|
|
826
|
+
isRequired: false
|
|
827
|
+
}))), /*#__PURE__*/_react.default.createElement("h5", {
|
|
813
828
|
className: (0, _helpers__.withStyle)('my-2')
|
|
814
829
|
}, "Persoonlijke gegevens"), /*#__PURE__*/_react.default.createElement("div", {
|
|
815
830
|
className: (0, _helpers__.withStyle)('col-12 col-md-6 mb-2')
|
|
@@ -1666,7 +1681,7 @@ const InternalAppointmentForm = _ref => {
|
|
|
1666
1681
|
state: {
|
|
1667
1682
|
prevPathName: history.location.pathname
|
|
1668
1683
|
}
|
|
1669
|
-
}), !existingDossierId ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
1684
|
+
}), !existingDossierId ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isTmg && /*#__PURE__*/_react.default.createElement("div", {
|
|
1670
1685
|
className: (0, _helpers__.withStyle)('me-1')
|
|
1671
1686
|
}, /*#__PURE__*/_react.default.createElement(_PrimaryButton.default, {
|
|
1672
1687
|
onClick: () => {
|
|
@@ -29,7 +29,6 @@ var _OrderSessionContext = require("../../__context__/OrderSessionContext");
|
|
|
29
29
|
var _useIsSingleOrder = _interopRequireDefault(require("../../__hooks__/useIsSingleOrder"));
|
|
30
30
|
var _useIsTmg = require("../../__hooks__/useIsTmg");
|
|
31
31
|
var _LocalStorageWorker = require("../../__services__/LocalStorageWorker");
|
|
32
|
-
var _OrderTypeSelectorModal = _interopRequireWildcard(require("./OrderTypeSelectorModal"));
|
|
33
32
|
function _interopRequireDefault(e) {
|
|
34
33
|
return e && e.__esModule ? e : {
|
|
35
34
|
default: e
|
|
@@ -248,8 +247,7 @@ const InternalBranchSelectorModal = () => {
|
|
|
248
247
|
}, [branchTypes, authSession]);
|
|
249
248
|
const [{
|
|
250
249
|
selectedBranch,
|
|
251
|
-
existingDossierId
|
|
252
|
-
orderType
|
|
250
|
+
existingDossierId
|
|
253
251
|
}, dispatch] = (0, _OrderSessionContext.useOrderSession)();
|
|
254
252
|
const {
|
|
255
253
|
myBranches,
|
|
@@ -267,20 +265,15 @@ const InternalBranchSelectorModal = () => {
|
|
|
267
265
|
}
|
|
268
266
|
});
|
|
269
267
|
};
|
|
270
|
-
const shouldShowModalForSingleOrder = APP_CONFIG.internal && !selectedBranch && !existingDossierId && isSingleOrderPage;
|
|
271
|
-
const shouldShowModalForOtherPages = APP_CONFIG.internal && !selectedBranch && !existingDossierId && !isSingleOrderPage && !isTMGOrganization && !shouldAutoSelect && !isLoadingMyBranches;
|
|
268
|
+
const shouldShowModalForSingleOrder = APP_CONFIG.internal && formula === _constants__.CONFIGURATOR_FORMULAS.TMG && !selectedBranch && !existingDossierId && isSingleOrderPage;
|
|
269
|
+
const shouldShowModalForOtherPages = APP_CONFIG.internal && formula === _constants__.CONFIGURATOR_FORMULAS.TMG && !selectedBranch && !existingDossierId && !isSingleOrderPage && !isTMGOrganization && !shouldAutoSelect && !isLoadingMyBranches;
|
|
272
270
|
if (isLoadingBranchTypes || isLoadingMyBranches) {
|
|
273
271
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
274
272
|
className: "thm-configurator-wrapper--offset"
|
|
275
273
|
}, /*#__PURE__*/_react.default.createElement(_FullPageSpinner.default, null));
|
|
276
274
|
}
|
|
277
|
-
if ((shouldShowModalForSingleOrder || shouldShowModalForOtherPages) && isTMGOrganization && !orderType) {
|
|
278
|
-
return /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorModal.default, {
|
|
279
|
-
isOpen: true
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
275
|
return /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
283
|
-
isOpen:
|
|
276
|
+
isOpen: shouldShowModalForSingleOrder || shouldShowModalForOtherPages,
|
|
284
277
|
title: 'Kies een vestiging:',
|
|
285
278
|
size: "wide",
|
|
286
279
|
hasSecondaryButton: false,
|
|
@@ -166,6 +166,7 @@ const INITIAL_ORDER_SESSION_STATE = {
|
|
|
166
166
|
vatNumber: '',
|
|
167
167
|
anwbId: null
|
|
168
168
|
},
|
|
169
|
+
invoicePaymentByLeaseCompany: false,
|
|
169
170
|
orderType: null,
|
|
170
171
|
webshop: null
|
|
171
172
|
};
|
|
@@ -240,7 +241,8 @@ const orderSessionActions = exports.orderSessionActions = {
|
|
|
240
241
|
SET_CUSTOMER_COMPANY_NAME: 'SET_CUSTOMER_COMPANY_NAME',
|
|
241
242
|
SET_CUSTOMER_KVK_NUMBER: 'SET_CUSTOMER_KVK_NUMBER',
|
|
242
243
|
SET_CUSTOMER_VAT_NUMBER: 'SET_CUSTOMER_VAT_NUMBER',
|
|
243
|
-
SET_CUSTOMER_HOUSE_NUMBER_ADDITION: 'SET_CUSTOMER_HOUSE_NUMBER_ADDITION'
|
|
244
|
+
SET_CUSTOMER_HOUSE_NUMBER_ADDITION: 'SET_CUSTOMER_HOUSE_NUMBER_ADDITION',
|
|
245
|
+
SET_CUSTOMER_INVOICE_PAYMENT_BY_LEASE_COMPANY: 'SET_CUSTOMER_INVOICE_PAYMENT_BY_LEASE_COMPANY'
|
|
244
246
|
};
|
|
245
247
|
const orderSessionReducer = (state, action) => {
|
|
246
248
|
switch (action.type) {
|
|
@@ -612,6 +614,15 @@ const orderSessionReducer = (state, action) => {
|
|
|
612
614
|
})
|
|
613
615
|
});
|
|
614
616
|
}
|
|
617
|
+
case orderSessionActions.SET_CUSTOMER_INVOICE_PAYMENT_BY_LEASE_COMPANY:
|
|
618
|
+
{
|
|
619
|
+
const {
|
|
620
|
+
invoicePaymentByLeaseCompany
|
|
621
|
+
} = action.payload;
|
|
622
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
623
|
+
invoicePaymentByLeaseCompany
|
|
624
|
+
});
|
|
625
|
+
}
|
|
615
626
|
case orderSessionActions.SET_CUSTOMER_PHONE_NUMBER:
|
|
616
627
|
{
|
|
617
628
|
const {
|
|
@@ -857,7 +868,8 @@ const orderSessionReducer = (state, action) => {
|
|
|
857
868
|
vehicle: {
|
|
858
869
|
ownershipType,
|
|
859
870
|
leaseNumber: null
|
|
860
|
-
}
|
|
871
|
+
},
|
|
872
|
+
invoicePaymentByLeaseCompany: false
|
|
861
873
|
});
|
|
862
874
|
}
|
|
863
875
|
return _objectSpread(_objectSpread({}, state), {}, {
|