thm-p3-configurator 0.0.232 → 0.0.233

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.
@@ -29,6 +29,7 @@ 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"));
32
33
  function _interopRequireDefault(e) {
33
34
  return e && e.__esModule ? e : {
34
35
  default: e
@@ -247,7 +248,8 @@ const InternalBranchSelectorModal = () => {
247
248
  }, [branchTypes, authSession]);
248
249
  const [{
249
250
  selectedBranch,
250
- existingDossierId
251
+ existingDossierId,
252
+ orderType
251
253
  }, dispatch] = (0, _OrderSessionContext.useOrderSession)();
252
254
  const {
253
255
  myBranches,
@@ -265,15 +267,20 @@ const InternalBranchSelectorModal = () => {
265
267
  }
266
268
  });
267
269
  };
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;
270
+ const shouldShowModalForSingleOrder = APP_CONFIG.internal && !selectedBranch && !existingDossierId && isSingleOrderPage;
271
+ const shouldShowModalForOtherPages = APP_CONFIG.internal && !selectedBranch && !existingDossierId && !isSingleOrderPage && !isTMGOrganization && !shouldAutoSelect && !isLoadingMyBranches;
270
272
  if (isLoadingBranchTypes || isLoadingMyBranches) {
271
273
  return /*#__PURE__*/_react.default.createElement("div", {
272
274
  className: "thm-configurator-wrapper--offset"
273
275
  }, /*#__PURE__*/_react.default.createElement(_FullPageSpinner.default, null));
274
276
  }
277
+ if ((shouldShowModalForSingleOrder || shouldShowModalForOtherPages) && isTMGOrganization && formula === _constants__.CONFIGURATOR_FORMULAS.TMG && !orderType) {
278
+ return /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorModal.default, {
279
+ isOpen: true
280
+ });
281
+ }
275
282
  return /*#__PURE__*/_react.default.createElement(_Modal.default, {
276
- isOpen: shouldShowModalForSingleOrder || shouldShowModalForOtherPages,
283
+ isOpen: (shouldShowModalForSingleOrder || shouldShowModalForOtherPages) && !(isTMGOrganization && orderType === _OrderTypeSelectorModal.ORDER_TYPES.ONLINE),
277
284
  title: 'Kies een vestiging:',
278
285
  size: "wide",
279
286
  hasSecondaryButton: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.232",
3
+ "version": "0.0.233",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",