thm-p3-configurator 0.0.355 → 0.0.356
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.
|
@@ -193,9 +193,6 @@ const MyBranchesSelect = _ref5 => {
|
|
|
193
193
|
const SingleOrderModalContent = _ref6 => {
|
|
194
194
|
let {
|
|
195
195
|
setSelectedBranchId,
|
|
196
|
-
isLocation,
|
|
197
|
-
authSession,
|
|
198
|
-
selectedBranch,
|
|
199
196
|
dispatch,
|
|
200
197
|
isTMGOrganization,
|
|
201
198
|
formula
|
|
@@ -230,17 +227,6 @@ const SingleOrderModalContent = _ref6 => {
|
|
|
230
227
|
label: "".concat(branch === null || branch === void 0 ? void 0 : branch.naamVestiging, " - ").concat(branch === null || branch === void 0 ? void 0 : branch.name),
|
|
231
228
|
value: branch === null || branch === void 0 ? void 0 : branch.entityId
|
|
232
229
|
}));
|
|
233
|
-
(0, _react.useEffect)(() => {
|
|
234
|
-
if (isLocation && !selectedBranch && !isTMGOrganization) {
|
|
235
|
-
var _authSession$branch;
|
|
236
|
-
dispatch({
|
|
237
|
-
type: _OrderSessionContext.orderSessionActions.SET_SELECTED_BRANCH,
|
|
238
|
-
payload: {
|
|
239
|
-
branchId: authSession === null || authSession === void 0 || (_authSession$branch = authSession.branch) === null || _authSession$branch === void 0 ? void 0 : _authSession$branch.entityId
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
}, [dispatch, isLocation, authSession, selectedBranch, isTMGOrganization]);
|
|
244
230
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formula === _constants__.CONFIGURATOR_FORMULAS.TMG && /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
|
|
245
231
|
options: singleOrderBranchTypes === null || singleOrderBranchTypes === void 0 ? void 0 : singleOrderBranchTypes.map(branchType => ({
|
|
246
232
|
label: branchType === null || branchType === void 0 ? void 0 : branchType.title,
|
|
@@ -355,8 +341,8 @@ const InternalBranchSelectorModal = () => {
|
|
|
355
341
|
setIsDismissed(false);
|
|
356
342
|
}, [isSingleOrderPage]);
|
|
357
343
|
const isLocation = _react.default.useMemo(() => {
|
|
358
|
-
var _authSession$
|
|
359
|
-
const orgTypes = (authSession === null || authSession === void 0 || (_authSession$
|
|
344
|
+
var _authSession$branch;
|
|
345
|
+
const orgTypes = (authSession === null || authSession === void 0 || (_authSession$branch = authSession.branch) === null || _authSession$branch === void 0 ? void 0 : _authSession$branch.organisatietype) || [];
|
|
360
346
|
return orgTypes.some(typeId => {
|
|
361
347
|
var _branchTypes$byId;
|
|
362
348
|
return (branchTypes === null || branchTypes === void 0 || (_branchTypes$byId = branchTypes.byId) === null || _branchTypes$byId === void 0 || (_branchTypes$byId = _branchTypes$byId[typeId]) === null || _branchTypes$byId === void 0 ? void 0 : _branchTypes$byId.title) === _constants__.LOCATION_TYPE;
|
|
@@ -466,9 +452,6 @@ const InternalBranchSelectorModal = () => {
|
|
|
466
452
|
onClose: () => setIsDismissed(true)
|
|
467
453
|
}, isSingleOrderPage ? /*#__PURE__*/_react.default.createElement(SingleOrderModalContent, {
|
|
468
454
|
setSelectedBranchId: _setSelectedBranchId,
|
|
469
|
-
isLocation: isLocation,
|
|
470
|
-
authSession: authSession,
|
|
471
|
-
selectedBranch: selectedBranch,
|
|
472
455
|
dispatch: dispatch,
|
|
473
456
|
isTMGOrganization: isTMGOrganization,
|
|
474
457
|
formula: formula
|