thm-p3-configurator 0.0.86 → 0.0.88

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.
@@ -107,7 +107,8 @@ const DropdownInput = _ref => {
107
107
  form,
108
108
  initialValue = '',
109
109
  errorMessage = '',
110
- isClearable = false
110
+ isClearable = false,
111
+ isDisabled = false
111
112
  } = _ref;
112
113
  const [value, setValue] = (0, _react.useState)(() => {
113
114
  if (!initialValue || !(options !== null && options !== void 0 && options.length)) return null;
@@ -152,6 +153,7 @@ const DropdownInput = _ref => {
152
153
  classNamePrefix: (0, _helpers__.withStyle)('form-select'),
153
154
  onChange: option => handleChange(option),
154
155
  isLoading: isLoading,
156
+ isDisabled: isDisabled,
155
157
  styles: {
156
158
  menuList: base => _objectSpread(_objectSpread({}, base), {}, {
157
159
  maxHeight: lgSize ? '20vh' : xxlSize ? '10vh' : '18vh'
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.VEHICLE_OWNERSHIP_TYPE = exports.USER_GEOLOCATION_KEY = exports.TMG_ORGANIZATION_TYPE = exports.StockStatus = exports.PRODUCT_CATEGORIES = exports.PRIVATE_SINGLE_ORDER_SESSION_KEY = exports.ORDER_SESSION_KEY = exports.NAVIGATION_STEPS_INTERNAL = exports.NAVIGATION_STEPS_EXTERNAL = exports.NAVIGATION_BUTTONS = exports.MOUSE_EXIT_INTENT_THROTTLE = exports.MOUSE_EXIT_INTENT_OFFSET = exports.LOCATION_TYPE = exports.LOCATION_CHANGE_BUTTON_LABEL = exports.LOCALE = exports.FORM_ERROR_MESSAGES = exports.DOSSIER_TYPES = exports.DISCOUNT_TYPES = exports.DEFAULT_MAP_LONGITUDE = exports.DEFAULT_MAP_LATITUDE = exports.DEFAULT_ARTICLE_BRAND = exports.CONFIGURATOR_FORMULAS = exports.BOARD_COMPUTER_DISABLED_KEY = exports.AUTH_SESSION_KEY = exports.ARTICLES_SYSTEM_FIELDS = exports.API_ERROR_CODES = exports.ANWB_DISCOUNT_CODE = exports.ALL_EXPERIMENTS = exports.ACTIVE_VARIANTS = void 0;
6
+ exports.VESTIGING_TYPE_ID = exports.VEHICLE_OWNERSHIP_TYPE = exports.USER_GEOLOCATION_KEY = exports.TMG_ORGANIZATION_TYPE = exports.StockStatus = exports.PRODUCT_CATEGORIES = exports.PRIVATE_SINGLE_ORDER_SESSION_KEY = exports.ORDER_SESSION_KEY = exports.NAVIGATION_STEPS_INTERNAL = exports.NAVIGATION_STEPS_EXTERNAL = exports.NAVIGATION_BUTTONS = exports.MOUSE_EXIT_INTENT_THROTTLE = exports.MOUSE_EXIT_INTENT_OFFSET = exports.LOCATION_TYPE = exports.LOCATION_CHANGE_BUTTON_LABEL = exports.LOCALE = exports.FORM_ERROR_MESSAGES = exports.DOSSIER_TYPES = exports.DISCOUNT_TYPES = exports.DEFAULT_MAP_LONGITUDE = exports.DEFAULT_MAP_LATITUDE = exports.DEFAULT_ARTICLE_BRAND = exports.CONFIGURATOR_FORMULAS = exports.BOARD_COMPUTER_DISABLED_KEY = exports.AUTH_SESSION_KEY = exports.ARTICLES_SYSTEM_FIELDS = exports.API_ERROR_CODES = exports.ANWB_DISCOUNT_CODE = exports.ALL_EXPERIMENTS = exports.ACTIVE_VARIANTS = void 0;
7
7
  const DOSSIER_TYPES = exports.DOSSIER_TYPES = {
8
8
  Quotation: 'quotation',
9
9
  AppointmentRequest: 'appointment-request',
@@ -18,6 +18,7 @@ const FORM_ERROR_MESSAGES = exports.FORM_ERROR_MESSAGES = {
18
18
  licensePlateMin: 'Kenteken moet minimaal 6 characters bevatten',
19
19
  licensePlateMax: 'Kenteken mag maximaal 8 characters bevatten'
20
20
  };
21
+ const VESTIGING_TYPE_ID = exports.VESTIGING_TYPE_ID = 'kyDouClQsfmXWWloLdwzG';
21
22
  const NAVIGATION_STEPS_INTERNAL = exports.NAVIGATION_STEPS_INTERNAL = [{
22
23
  to: '/configurator/trekhaakpakket',
23
24
  title: '1. Trekhaakpakket',
@@ -84,7 +84,7 @@ const ButtonByType = _ref => {
84
84
  }
85
85
  };
86
86
  const BottomNavigationBar = () => {
87
- var _history$location, _history$location2;
87
+ var _history$location, _history$location2, _history$location3;
88
88
  const history = (0, _reactRouterDom.useHistory)();
89
89
  const buttons = _constants__.NAVIGATION_BUTTONS === null || _constants__.NAVIGATION_BUTTONS === void 0 ? void 0 : _constants__.NAVIGATION_BUTTONS[history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 ? void 0 : _history$location.pathname];
90
90
  let [{
@@ -93,6 +93,7 @@ const BottomNavigationBar = () => {
93
93
  selectedCombiset,
94
94
  selectedBranch,
95
95
  existingDossierType,
96
+ existingDossierId,
96
97
  allowLocationChange,
97
98
  currentDossierType
98
99
  }, dispatch] = (0, _OrderSessionContext.useOrderSession)();
@@ -111,10 +112,14 @@ const BottomNavigationBar = () => {
111
112
  className: (0, _helpers__.withStyle)('container justify-content-center')
112
113
  }, /*#__PURE__*/_react.default.createElement("div", {
113
114
  className: (0, _helpers__.withStyle)('row justify-content-center')
114
- }, APP_CONFIG.internal && /*#__PURE__*/_react.default.createElement("div", {
115
- className: (0, _helpers__.withStyle)('col-12 mt-2 mb-1')
116
- }, /*#__PURE__*/_react.default.createElement(_InternalPriceCalculationSelector.default, null)), buttons.map(_ref2 => {
117
- var _history$location3, _history$location4;
115
+ }, APP_CONFIG.internal && (history === null || history === void 0 || (_history$location3 = history.location) === null || _history$location3 === void 0 ? void 0 : _history$location3.pathname) === '/configurator/trekhaakpakket' && /*#__PURE__*/_react.default.createElement("div", {
116
+ className: (0, _helpers__.withStyle)('col-7 mt-2 mb-1')
117
+ }, /*#__PURE__*/_react.default.createElement(_InternalPriceCalculationSelector.default, null)), /*#__PURE__*/_react.default.createElement("div", {
118
+ className: (0, _helpers__.withStyle)('col-12')
119
+ }, /*#__PURE__*/_react.default.createElement("div", {
120
+ className: (0, _helpers__.withStyle)('row justify-content-center')
121
+ }, buttons.map(_ref2 => {
122
+ var _history$location4;
118
123
  let {
119
124
  to,
120
125
  label,
@@ -154,8 +159,8 @@ const BottomNavigationBar = () => {
154
159
  state: {
155
160
  prevPathName: history.location.pathname
156
161
  },
157
- isDisabled: !(existingDossierType === _constants__.DOSSIER_TYPES.Quotation && (history === null || history === void 0 || (_history$location3 = history.location) === null || _history$location3 === void 0 ? void 0 : _history$location3.pathname) === '/configurator/montagelocatie') && ((!selectedCableset || !selectedTowbar) && !selectedCombiset && type === 'next' || type === 'next' && (history === null || history === void 0 || (_history$location4 = history.location) === null || _history$location4 === void 0 ? void 0 : _history$location4.pathname) === '/configurator/montagelocatie' && !selectedBranch)
162
+ isDisabled: (!selectedCableset || !selectedTowbar) && !selectedCombiset && type === 'next' || type === 'next' && (history === null || history === void 0 || (_history$location4 = history.location) === null || _history$location4 === void 0 ? void 0 : _history$location4.pathname) === '/configurator/montagelocatie' && !selectedBranch
158
163
  })));
159
- })))));
164
+ })))))));
160
165
  };
161
166
  var _default = exports.default = BottomNavigationBar;
@@ -26,6 +26,8 @@ var _OrderSessionContext = require("../__context__/OrderSessionContext");
26
26
  var _helpers__ = require("../__helpers__");
27
27
  var _image = require("../__helpers__/image");
28
28
  var _product = require("../__helpers__/product");
29
+ var _useIsTmg = require("../__hooks__/useIsTmg");
30
+ var _CheckboxInput = _interopRequireDefault(require("../__components__/Form/CheckboxInput"));
29
31
  function _interopRequireDefault(e) {
30
32
  return e && e.__esModule ? e : {
31
33
  default: e
@@ -60,6 +62,8 @@ const ExtraProductsOverview = () => {
60
62
  var _products$Extras;
61
63
  const isProductsInitialLoad = (0, _react.useRef)(true);
62
64
  const formula = (0, _FormulaContext.useFormula)();
65
+ const isTmg = (0, _useIsTmg.useIsTmg)();
66
+ const [skipFilters, setSkipFilters] = (0, _react.useState)(false);
63
67
  const [{
64
68
  licensePlate,
65
69
  model,
@@ -102,7 +106,8 @@ const ExtraProductsOverview = () => {
102
106
  selectBoardComputerUpdate: selectedBoardComputer != null,
103
107
  cart: cartInput ? JSON.stringify(cartInput) : undefined,
104
108
  formula,
105
- discountCode
109
+ discountCode,
110
+ skipFilters
106
111
  });
107
112
  if (isLoadingProducts && isProductsInitialLoad.current === true) {
108
113
  isProductsInitialLoad.current = false;
@@ -142,7 +147,14 @@ const ExtraProductsOverview = () => {
142
147
  delete products[_constants__.PRODUCT_CATEGORIES.CABLESET];
143
148
  delete products[_constants__.PRODUCT_CATEGORIES.COMBISET];
144
149
  delete products[_constants__.PRODUCT_CATEGORIES.BOARD_COMPUTER];
145
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Object.entries(products).map((_ref3, index) => {
150
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isTmg && /*#__PURE__*/_react.default.createElement(_CheckboxInput.default, {
151
+ name: 'skipFilters',
152
+ initialValue: skipFilters,
153
+ onChange: value => {
154
+ setSkipFilters(value);
155
+ },
156
+ label: "Toon alle artikelen"
157
+ }), Object.entries(products).map((_ref3, index) => {
146
158
  let [productCategory, productsPerCategory] = _ref3;
147
159
  if (!productsPerCategory.length || productCategory !== _constants__.PRODUCT_CATEGORIES.EXTRAS) {
148
160
  return null;
@@ -32,11 +32,13 @@ var _ProductCard = _interopRequireDefault(require("../__components__/ProductCard
32
32
  var _FullPageSpinner = _interopRequireDefault(require("../__components__/Spinners/FullPageSpinner"));
33
33
  var _constants__ = require("../__constants__");
34
34
  var _FormulaContext = require("../__context__/FormulaContext");
35
+ var _useIsTmg = require("../__hooks__/useIsTmg");
35
36
  var _OrderSessionContext = require("../__context__/OrderSessionContext");
36
37
  var _helpers__ = require("../__helpers__");
37
38
  var _image = require("../__helpers__/image");
38
39
  var _product = require("../__helpers__/product");
39
40
  var _BoardComputerCard = _interopRequireDefault(require("./BoardComputerCard"));
41
+ var _CheckboxInput = _interopRequireDefault(require("../__components__/Form/CheckboxInput"));
40
42
  function _interopRequireDefault(e) {
41
43
  return e && e.__esModule ? e : {
42
44
  default: e
@@ -71,6 +73,8 @@ const ProductsOverview = () => {
71
73
  var _products$Trekhaak, _products$Kabelset, _products$Combiset;
72
74
  const isProductsInitialLoad = (0, _react.useRef)(true);
73
75
  const formula = (0, _FormulaContext.useFormula)();
76
+ const isTmg = (0, _useIsTmg.useIsTmg)();
77
+ const [skipFilters, setSkipFilters] = (0, _react.useState)(false);
74
78
  const [{
75
79
  licensePlate,
76
80
  model,
@@ -116,7 +120,8 @@ const ProductsOverview = () => {
116
120
  cart: cartInput ? JSON.stringify(cartInput) : undefined,
117
121
  formula,
118
122
  discountCode,
119
- priceCalculationDate
123
+ priceCalculationDate,
124
+ skipFilters
120
125
  });
121
126
  if (isLoadingProducts && isProductsInitialLoad.current === true) {
122
127
  isProductsInitialLoad.current = false;
@@ -183,7 +188,14 @@ const ProductsOverview = () => {
183
188
 
184
189
  // Filter out Extras category from products object
185
190
  delete products[_constants__.PRODUCT_CATEGORIES.EXTRAS];
186
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Object.entries(products).map((_ref3, index) => {
191
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isTmg && /*#__PURE__*/_react.default.createElement(_CheckboxInput.default, {
192
+ name: 'skipFilters',
193
+ initialValue: skipFilters,
194
+ onChange: value => {
195
+ setSkipFilters(value);
196
+ },
197
+ label: "Toon alle artikelen"
198
+ }), Object.entries(products).map((_ref3, index) => {
187
199
  let [productCategory, productsPerCategory] = _ref3;
188
200
  if (!productsPerCategory.length) {
189
201
  return null;
@@ -164,6 +164,7 @@ const InternalAppointmentForm = _ref => {
164
164
  channel,
165
165
  durationAnswer,
166
166
  allowLocationChange,
167
+ existingDossierId,
167
168
  selectedBoardComputer,
168
169
  selectedCableset,
169
170
  selectedCombiset,
@@ -395,7 +396,8 @@ const InternalAppointmentForm = _ref => {
395
396
  }
396
397
  }
397
398
  });
398
- }
399
+ },
400
+ isDisabled: !!existingDossierId
399
401
  }), /*#__PURE__*/_react.default.createElement(_RadioButtons.default, {
400
402
  name: "ownershipType",
401
403
  label: "Type:",
@@ -3,6 +3,7 @@
3
3
  require("core-js/modules/es.json.stringify.js");
4
4
  require("core-js/modules/es.weak-map.js");
5
5
  require("core-js/modules/esnext.iterator.constructor.js");
6
+ require("core-js/modules/esnext.iterator.filter.js");
6
7
  require("core-js/modules/esnext.iterator.for-each.js");
7
8
  require("core-js/modules/esnext.iterator.map.js");
8
9
  require("core-js/modules/web.dom-collections.iterator.js");
@@ -13,6 +14,7 @@ Object.defineProperty(exports, "__esModule", {
13
14
  exports.default = void 0;
14
15
  require("core-js/modules/es.json.stringify.js");
15
16
  require("core-js/modules/esnext.iterator.constructor.js");
17
+ require("core-js/modules/esnext.iterator.filter.js");
16
18
  require("core-js/modules/esnext.iterator.for-each.js");
17
19
  require("core-js/modules/esnext.iterator.map.js");
18
20
  require("core-js/modules/web.dom-collections.iterator.js");
@@ -63,11 +65,11 @@ const NormalPageModalContent = _ref => {
63
65
  isLocation,
64
66
  selectedBranch,
65
67
  existingDossierId,
68
+ formula,
66
69
  dispatch
67
70
  } = _ref;
68
71
  const [_selectedBranchId, _setSelectedBranchId] = (0, _react.useState)();
69
72
  const [_branches, _setBranches] = (0, _react.useState)([]);
70
- const formula = (0, _FormulaContext.useFormula)();
71
73
  const {
72
74
  myBranches,
73
75
  isLoadingMyBranches
@@ -132,7 +134,8 @@ const SingleOrderModalContent = _ref3 => {
132
134
  authSession,
133
135
  selectedBranch,
134
136
  dispatch,
135
- isTMGOrganization
137
+ isTMGOrganization,
138
+ formula
136
139
  } = _ref3;
137
140
  const [singleOrderBranchType, setSingleOrderBranchType] = (0, _react.useState)();
138
141
  const [selectedBranchId, setLocalBranchId] = (0, _react.useState)();
@@ -144,14 +147,25 @@ const SingleOrderModalContent = _ref3 => {
144
147
  singleOrderBranches,
145
148
  isLoadingSingleOrderBranches
146
149
  } = (0, _queries.useSingleOrderBranchesQuery)({
147
- branchTypeId: singleOrderBranchType,
150
+ branchTypeId: formula === _constants__.CONFIGURATOR_FORMULAS.TMG ? singleOrderBranchType : _constants__.VESTIGING_TYPE_ID,
148
151
  limit: 500,
149
152
  offset: 0
150
153
  });
154
+
155
+ // Filter branches based on formula if not TMG
156
+ const filteredBranches = _react.default.useMemo(() => {
157
+ if (formula === _constants__.CONFIGURATOR_FORMULAS.TMG || !singleOrderBranches) {
158
+ return singleOrderBranches;
159
+ }
160
+ return singleOrderBranches.filter(branch => {
161
+ var _branch$formule;
162
+ return (branch === null || branch === void 0 || (_branch$formule = branch.formule) === null || _branch$formule === void 0 ? void 0 : _branch$formule.code) === formula;
163
+ });
164
+ }, [singleOrderBranches, formula]);
151
165
  const branchIdWithFormulaCode = new Map();
152
- singleOrderBranches === null || singleOrderBranches === void 0 || singleOrderBranches.forEach(branch => {
153
- var _branch$formule$code, _branch$formule;
154
- branchIdWithFormulaCode.set(branch === null || branch === void 0 ? void 0 : branch.entityId, (_branch$formule$code = branch === null || branch === void 0 || (_branch$formule = branch.formule) === null || _branch$formule === void 0 ? void 0 : _branch$formule.code) !== null && _branch$formule$code !== void 0 ? _branch$formule$code : _constants__.CONFIGURATOR_FORMULAS.THC);
166
+ filteredBranches === null || filteredBranches === void 0 || filteredBranches.forEach(branch => {
167
+ var _branch$formule$code, _branch$formule2;
168
+ branchIdWithFormulaCode.set(branch === null || branch === void 0 ? void 0 : branch.entityId, (_branch$formule$code = branch === null || branch === void 0 || (_branch$formule2 = branch.formule) === null || _branch$formule2 === void 0 ? void 0 : _branch$formule2.code) !== null && _branch$formule$code !== void 0 ? _branch$formule$code : _constants__.CONFIGURATOR_FORMULAS.THC);
155
169
  });
156
170
  (0, _react.useEffect)(() => {
157
171
  if (isLocation && !selectedBranch && !isTMGOrganization) {
@@ -164,7 +178,7 @@ const SingleOrderModalContent = _ref3 => {
164
178
  });
165
179
  }
166
180
  }, [dispatch, isLocation, authSession, selectedBranch, isTMGOrganization]);
167
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
181
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formula === _constants__.CONFIGURATOR_FORMULAS.TMG && /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
168
182
  options: singleOrderBranchTypes === null || singleOrderBranchTypes === void 0 ? void 0 : singleOrderBranchTypes.map(branchType => ({
169
183
  label: branchType === null || branchType === void 0 ? void 0 : branchType.title,
170
184
  value: branchType === null || branchType === void 0 ? void 0 : branchType.entityId
@@ -185,8 +199,8 @@ const SingleOrderModalContent = _ref3 => {
185
199
  setSelectedBranchId(undefined);
186
200
  setLocalBranchId(undefined);
187
201
  }
188
- }), singleOrderBranchType && /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
189
- options: singleOrderBranches === null || singleOrderBranches === void 0 ? void 0 : singleOrderBranches.map(branch => ({
202
+ }), (formula === _constants__.CONFIGURATOR_FORMULAS.TMG ? singleOrderBranchType : true) && /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
203
+ options: filteredBranches === null || filteredBranches === void 0 ? void 0 : filteredBranches.map(branch => ({
190
204
  label: branch === null || branch === void 0 ? void 0 : branch.name,
191
205
  value: branch === null || branch === void 0 ? void 0 : branch.entityId
192
206
  })),
@@ -221,6 +235,7 @@ const InternalBranchSelectorModal = () => {
221
235
  const [_selectedBranchId, _setSelectedBranchId] = (0, _react.useState)();
222
236
  const authSession = _LocalStorageWorker.lsw.getJson(_constants__.AUTH_SESSION_KEY);
223
237
  const isSingleOrderPage = (0, _useIsSingleOrder.default)();
238
+ const formula = (0, _FormulaContext.useFormula)();
224
239
  const isTMGOrganization = _react.default.useMemo(() => {
225
240
  var _branchTypes$byId$aut, _authSession$branch2;
226
241
  return (branchTypes === null || branchTypes === void 0 || (_branchTypes$byId$aut = branchTypes.byId[authSession === null || authSession === void 0 || (_authSession$branch2 = authSession.branch) === null || _authSession$branch2 === void 0 || (_authSession$branch2 = _authSession$branch2.organisatietype) === null || _authSession$branch2 === void 0 ? void 0 : _authSession$branch2[0]]) === null || _branchTypes$byId$aut === void 0 ? void 0 : _branchTypes$byId$aut.title) === _constants__.TMG_ORGANIZATION_TYPE;
@@ -262,7 +277,8 @@ const InternalBranchSelectorModal = () => {
262
277
  authSession: authSession,
263
278
  selectedBranch: selectedBranch,
264
279
  dispatch: dispatch,
265
- isTMGOrganization: isTMGOrganization
280
+ isTMGOrganization: isTMGOrganization,
281
+ formula: formula
266
282
  }) : /*#__PURE__*/_react.default.createElement(NormalPageModalContent, {
267
283
  setSelectedBranchId: _setSelectedBranchId,
268
284
  isTMGOrganization: isTMGOrganization,
@@ -270,7 +286,8 @@ const InternalBranchSelectorModal = () => {
270
286
  authSession: authSession,
271
287
  selectedBranch: selectedBranch,
272
288
  existingDossierId: existingDossierId,
273
- dispatch: dispatch
289
+ dispatch: dispatch,
290
+ formula: formula
274
291
  }));
275
292
  };
276
293
  var _default = exports.default = InternalBranchSelectorModal;
@@ -47,7 +47,7 @@ const InternalCancelDossierEdit = () => {
47
47
  className: (0, _helpers__.withStyle)('col-12 col-md-8 mb-1 mb-md-0')
48
48
  }, /*#__PURE__*/_react.default.createElement("p", {
49
49
  className: (0, _helpers__.withStyle)('mb-0')
50
- }, ' ', "U bewerkt het dossier", ' ', /*#__PURE__*/_react.default.createElement("strong", null, (dossierById === null || dossierById === void 0 ? void 0 : dossierById.title) || existingDossierId, " "))), /*#__PURE__*/_react.default.createElement("div", {
50
+ }, ' ', "U bewerkt het dossier ", /*#__PURE__*/_react.default.createElement("strong", null, dossierById === null || dossierById === void 0 ? void 0 : dossierById.title, " "))), /*#__PURE__*/_react.default.createElement("div", {
51
51
  className: (0, _helpers__.withStyle)('col-12 col-md-4')
52
52
  }, /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
53
53
  type: "button",
@@ -56,6 +56,6 @@ const InternalCancelDossierEdit = () => {
56
56
  className: "fa fa-times"
57
57
  }), " Wijzigingen annuleren"),
58
58
  onClick: handleCancel
59
- }))));
59
+ }), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("em", null, "Dossier ID: ", (dossierById === null || dossierById === void 0 ? void 0 : dossierById.dossierId) || existingDossierId))));
60
60
  };
61
61
  var _default = exports.default = InternalCancelDossierEdit;
@@ -149,6 +149,7 @@ const InternalQuotationForm = _ref => {
149
149
  executionAnswer2,
150
150
  priceCalculationDate,
151
151
  durationAnswer,
152
+ existingDossierId,
152
153
  selectedBoardComputer,
153
154
  selectedCableset,
154
155
  selectedCombiset,
@@ -297,6 +298,7 @@ const InternalQuotationForm = _ref => {
297
298
  name: "channel",
298
299
  label: "Kanaal:",
299
300
  isRequired: true,
301
+ isDisabled: !!existingDossierId,
300
302
  isLoading: isLoadingMarketingChannels,
301
303
  noOptionsMessage: "Geen opties beschikbaar",
302
304
  placeholder: "Maak een keuze",
@@ -18,11 +18,11 @@ var _DangerAlert = _interopRequireDefault(require("../../__components__/DangerAl
18
18
  var _CheckboxInput = _interopRequireDefault(require("../../__components__/Form/CheckboxInput"));
19
19
  var _DropdownInput = _interopRequireDefault(require("../../__components__/Form/DropdownInput"));
20
20
  var _TextInput = _interopRequireDefault(require("../../__components__/Form/TextInput"));
21
- var _constants__ = require("../../__constants__");
22
21
  var _FormulaContext = require("../../__context__/FormulaContext");
23
22
  var _OrderSessionContext = require("../../__context__/OrderSessionContext");
24
23
  var _helpers__ = require("../../__helpers__");
25
24
  var _useAuthSession = require("../../__hooks__/useAuthSession");
25
+ var _useIsTmg = require("../../__hooks__/useIsTmg");
26
26
  function _interopRequireDefault(e) {
27
27
  return e && e.__esModule ? e : {
28
28
  default: e
@@ -82,11 +82,7 @@ const InternalSingleOrderFilters = /*#__PURE__*/(0, _react.forwardRef)((_ref, re
82
82
  const {
83
83
  branch
84
84
  } = (0, _useAuthSession.useAuthSession)();
85
- const isTmg = (0, _react.useMemo)(() => {
86
- var _branchTypes$byId;
87
- const branchType = branchTypes === null || branchTypes === void 0 || (_branchTypes$byId = branchTypes.byId) === null || _branchTypes$byId === void 0 ? void 0 : _branchTypes$byId[branch === null || branch === void 0 ? void 0 : branch.organisatietype];
88
- return (branchType === null || branchType === void 0 ? void 0 : branchType.title) === _constants__.TMG_ORGANIZATION_TYPE;
89
- }, [branchTypes, branch]);
85
+ const isTmg = (0, _useIsTmg.useIsTmg)();
90
86
  const [selectedArticleType, setSelectedArticleType] = (0, _react.useState)('');
91
87
  const [selectedArticleGroup, setSelectedArticleGroup] = (0, _react.useState)('');
92
88
  const [selectedArticleSubGroup, setSelectedArticleSubGroup] = (0, _react.useState)('');
@@ -131,9 +127,7 @@ const InternalSingleOrderFilters = /*#__PURE__*/(0, _react.forwardRef)((_ref, re
131
127
  }
132
128
  }, [selectedArticleGroup]);
133
129
  (0, _react.useEffect)(() => {
134
- if (!licensePlate && !model) {
135
- onFilterChange('showAllArticles', showAllArticles);
136
- }
130
+ onFilterChange('showAllArticles', showAllArticles);
137
131
  }, [showAllArticles]);
138
132
  (0, _react.useEffect)(() => {
139
133
  if (!licensePlate && !model) {
@@ -245,7 +239,6 @@ const InternalSingleOrderFilters = /*#__PURE__*/(0, _react.forwardRef)((_ref, re
245
239
  name: 'showAllArticles',
246
240
  initialValue: showAllArticles,
247
241
  onChange: value => {
248
- resetLicensePlateFilters();
249
242
  setShowAllArticles(value);
250
243
  },
251
244
  label: "Toon alle artikelen"
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useIsTmg = void 0;
7
+ var _react = require("react");
8
+ var _queries = require("../__api__/queries");
9
+ var _constants__ = require("../__constants__");
10
+ var _useAuthSession = require("./useAuthSession");
11
+ const useIsTmg = () => {
12
+ const {
13
+ branchTypes
14
+ } = (0, _queries.useBranchTypes)();
15
+ const {
16
+ branch
17
+ } = (0, _useAuthSession.useAuthSession)();
18
+ return (0, _react.useMemo)(() => {
19
+ var _branchTypes$byId;
20
+ const branchType = branchTypes === null || branchTypes === void 0 || (_branchTypes$byId = branchTypes.byId) === null || _branchTypes$byId === void 0 ? void 0 : _branchTypes$byId[branch === null || branch === void 0 ? void 0 : branch.organisatietype];
21
+ return (branchType === null || branchType === void 0 ? void 0 : branchType.title) === _constants__.TMG_ORGANIZATION_TYPE;
22
+ }, [branchTypes, branch]);
23
+ };
24
+ exports.useIsTmg = useIsTmg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thm-p3-configurator",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "EnoRm.",