thm-p3-configurator 0.0.230 → 0.0.231

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.
@@ -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))))), /*#__PURE__*/_react.default.createElement("h5", {
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: () => {
@@ -267,8 +267,8 @@ const InternalBranchSelectorModal = () => {
267
267
  }
268
268
  });
269
269
  };
270
- const shouldShowModalForSingleOrder = APP_CONFIG.internal && !selectedBranch && !existingDossierId && isSingleOrderPage;
271
- const shouldShowModalForOtherPages = APP_CONFIG.internal && !selectedBranch && !existingDossierId && !isSingleOrderPage && !isTMGOrganization && !shouldAutoSelect && !isLoadingMyBranches;
270
+ const shouldShowModalForSingleOrder = APP_CONFIG.internal && formula === _constants__.CONFIGURATOR_FORMULAS.TMG && !selectedBranch && !existingDossierId && isSingleOrderPage;
271
+ const shouldShowModalForOtherPages = APP_CONFIG.internal && formula === _constants__.CONFIGURATOR_FORMULAS.TMG && !selectedBranch && !existingDossierId && !isSingleOrderPage && !isTMGOrganization && !shouldAutoSelect && !isLoadingMyBranches;
272
272
  if (isLoadingBranchTypes || isLoadingMyBranches) {
273
273
  return /*#__PURE__*/_react.default.createElement("div", {
274
274
  className: "thm-configurator-wrapper--offset"
@@ -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), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.230",
3
+ "version": "0.0.231",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",