orc-shared 5.8.0-dev.2 → 5.8.0-dev.21
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/actions/applications.js +5 -5
- package/dist/actions/authentication.js +5 -5
- package/dist/actions/countries.js +5 -5
- package/dist/actions/locale.js +5 -5
- package/dist/actions/makeApiAction.js +8 -8
- package/dist/actions/makeOrcApiAction.js +3 -3
- package/dist/actions/metadata.js +8 -8
- package/dist/actions/navigation.js +3 -3
- package/dist/actions/scopes.js +5 -5
- package/dist/actions/tasks.js +5 -5
- package/dist/actions/timezones.js +5 -5
- package/dist/actions/versionInfo.js +5 -5
- package/dist/buildStore.js +5 -5
- package/dist/components/AppFrame/About.js +14 -13
- package/dist/components/AppFrame/Anchor.js +1 -1
- package/dist/components/AppFrame/AppFrame.js +6 -6
- package/dist/components/AppFrame/ApplicationSelector/ApplicationDialog.js +1 -1
- package/dist/components/AppFrame/ApplicationSelector/Header.js +4 -4
- package/dist/components/AppFrame/ApplicationSelector/index.js +3 -3
- package/dist/components/AppFrame/ConnectedToastList.js +2 -2
- package/dist/components/AppFrame/Help.js +1 -1
- package/dist/components/AppFrame/MenuItem.js +6 -6
- package/dist/components/AppFrame/Preferences.js +8 -9
- package/dist/components/AppFrame/Sidebar.js +5 -5
- package/dist/components/AppFrame/Topbar.js +3 -3
- package/dist/components/AppFrame/index.js +2 -2
- package/dist/components/ApplicationModuleLoader.js +5 -5
- package/dist/components/Authenticate.js +2 -2
- package/dist/components/Button.js +1 -1
- package/dist/components/CategoryList.js +6 -6
- package/dist/components/Checkbox.js +5 -5
- package/dist/components/ColumnWrapper.js +1 -1
- package/dist/components/Culture.js +1 -1
- package/dist/components/DevPages.js +1 -1
- package/dist/components/DropMenu/Menu.js +2 -2
- package/dist/components/DropMenu/index.js +5 -5
- package/dist/components/ErrorPlaceholder.js +4 -4
- package/dist/components/Form/Combination.js +2 -2
- package/dist/components/Form/Field.js +3 -3
- package/dist/components/Form/FieldElements.js +4 -4
- package/dist/components/Form/FieldList.js +10 -11
- package/dist/components/Form/Fieldset.js +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/FormElement.js +1 -1
- package/dist/components/Form/InputField.js +10 -10
- package/dist/components/Form/Inputs/Button.js +4 -4
- package/dist/components/Form/Inputs/Date.js +4 -4
- package/dist/components/Form/Inputs/FieldButtons.js +2 -2
- package/dist/components/Form/Inputs/Number.js +4 -4
- package/dist/components/Form/Inputs/ReadOnly.js +1 -1
- package/dist/components/Form/Inputs/SmallButton.js +4 -4
- package/dist/components/Form/Inputs/Text.js +4 -5
- package/dist/components/Form/Inputs/Time.js +4 -4
- package/dist/components/Form/Inputs/Toggles.js +4 -4
- package/dist/components/Form/Inputs/Translation.js +12 -12
- package/dist/components/Form/Inputs/index.js +1 -1
- package/dist/components/Form/index.js +2 -2
- package/dist/components/I18n.js +2 -2
- package/dist/components/Icon.js +3 -3
- package/dist/components/IconButton.js +3 -3
- package/dist/components/Input.js +5 -5
- package/dist/components/InternetExplorerWarningMessage.js +1 -1
- package/dist/components/List/DataCell.js +2 -2
- package/dist/components/List/HeadCell.js +2 -2
- package/dist/components/List/HeadRow.js +1 -1
- package/dist/components/List/List.js +5 -5
- package/dist/components/List/Row.js +2 -2
- package/dist/components/List/enhanceColumnDefs.js +3 -3
- package/dist/components/List/index.js +2 -2
- package/dist/components/Loader.js +6 -6
- package/dist/components/LoadingIcon.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/Badge.js +4 -4
- package/dist/components/MaterialUI/DataDisplay/Chip.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/CollapsableList.js +6 -6
- package/dist/components/MaterialUI/DataDisplay/Divider.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/Icon.js +4 -4
- package/dist/components/MaterialUI/DataDisplay/List.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/Modal.js +5 -5
- package/dist/components/MaterialUI/DataDisplay/Notification.js +9 -9
- package/dist/components/MaterialUI/DataDisplay/NotificationProps.js +7 -7
- package/dist/components/MaterialUI/DataDisplay/PopperedElements/PopperedIcon.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ActionModal.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Address.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ConfirmationModal.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/DiscountedPrice.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/GlobalErrorMessages.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +24 -14
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/LookupDisplayValue.js +4 -4
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/SectionTitle.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +25 -11
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/TableInfoBar.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Translations.js +10 -10
- package/dist/components/MaterialUI/DataDisplay/SelectionList.js +17 -25
- package/dist/components/MaterialUI/DataDisplay/Table.js +9 -9
- package/dist/components/MaterialUI/DataDisplay/TableHeaderCell.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/TableProps.js +7 -7
- package/dist/components/MaterialUI/DataDisplay/Timeline.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/TimelineItem.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.js +7 -7
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedIcon.js +4 -4
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedTypography.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/TransferList.js +10 -10
- package/dist/components/MaterialUI/DataDisplay/chipProps.js +7 -7
- package/dist/components/MaterialUI/DataDisplay/collapsableListProps.js +7 -7
- package/dist/components/MaterialUI/DataDisplay/dividerProps.js +7 -7
- package/dist/components/MaterialUI/DataDisplay/index.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/modalProps.js +7 -7
- package/dist/components/MaterialUI/DataDisplay/tableHelpers.js +9 -5
- package/dist/components/MaterialUI/DataDisplay/useTableSelection.js +7 -7
- package/dist/components/MaterialUI/Feedback/NotificationContext.js +6 -6
- package/dist/components/MaterialUI/Feedback/loadingScreen.js +6 -6
- package/dist/components/MaterialUI/Inputs/Autocomplete.js +6 -6
- package/dist/components/MaterialUI/Inputs/AutocompleteProps.js +7 -7
- package/dist/components/MaterialUI/Inputs/Checkbox.js +5 -5
- package/dist/components/MaterialUI/Inputs/CheckboxGroup.js +5 -5
- package/dist/components/MaterialUI/Inputs/CheckboxGroupProps.js +7 -7
- package/dist/components/MaterialUI/Inputs/CheckboxProps.js +7 -7
- package/dist/components/MaterialUI/Inputs/DatePicker.js +16 -17
- package/dist/components/MaterialUI/Inputs/InputBase.js +15 -12
- package/dist/components/MaterialUI/Inputs/InputBaseProps.js +7 -7
- package/dist/components/MaterialUI/Inputs/LookupSelect.js +3 -3
- package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +2 -2
- package/dist/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js +1 -1
- package/dist/components/MaterialUI/Inputs/Radio.js +2 -2
- package/dist/components/MaterialUI/Inputs/RadioProps.js +7 -7
- package/dist/components/MaterialUI/Inputs/Select.js +24 -11
- package/dist/components/MaterialUI/Inputs/SelectProps.js +9 -8
- package/dist/components/MaterialUI/Inputs/StandaloneRadio.js +5 -5
- package/dist/components/MaterialUI/Inputs/Switch.js +33 -21
- package/dist/components/MaterialUI/Inputs/SwitchProps.js +7 -7
- package/dist/components/MaterialUI/Inputs/TimePicker.js +7 -7
- package/dist/components/MaterialUI/Inputs/createInput.js +6 -6
- package/dist/components/MaterialUI/Inputs/index.js +1 -1
- package/dist/components/MaterialUI/Inputs/standaloneRadioProps.js +7 -7
- package/dist/components/MaterialUI/Navigation/DropDownMenu.js +6 -6
- package/dist/components/MaterialUI/Navigation/DropDownMenuProps.js +7 -7
- package/dist/components/MaterialUI/Navigation/ExternalLink.js +1 -1
- package/dist/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js +1 -1
- package/dist/components/MaterialUI/Navigation/TabBar.js +60 -38
- package/dist/components/MaterialUI/Navigation/TabLabel.js +5 -5
- package/dist/components/MaterialUI/ScopeSelector/ScopeSelector.js +1 -1
- package/dist/components/MaterialUI/ScopeSelector/ScopeTreeView.js +5 -5
- package/dist/components/MaterialUI/ScopeSelector/TreeItem.js +13 -8
- package/dist/components/MaterialUI/Surfaces/ExpansionPanel.js +5 -5
- package/dist/components/MaterialUI/Surfaces/Paper.js +2 -2
- package/dist/components/MaterialUI/Surfaces/PredefinedElements/TitledPaper.js +1 -1
- package/dist/components/MaterialUI/Surfaces/SectionExpansionPanel.js +5 -5
- package/dist/components/MaterialUI/Surfaces/expansionPanelProps.js +8 -8
- package/dist/components/MaterialUI/Surfaces/paperProps.js +7 -7
- package/dist/components/MaterialUI/componentProps.js +3 -3
- package/dist/components/MaterialUI/hocs/withDeferredPopper.js +10 -16
- package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +10 -9
- package/dist/components/MaterialUI/muiThemes.js +3 -3
- package/dist/components/MaterialUI/textProps.js +7 -7
- package/dist/components/Modal/Background.js +1 -1
- package/dist/components/Modal/Dialog.js +2 -2
- package/dist/components/Modal/Wrapper.js +2 -2
- package/dist/components/Modal/index.js +6 -6
- package/dist/components/Modules.js +9 -9
- package/dist/components/MultiSelector.js +9 -9
- package/dist/components/Navigation/Bar.js +9 -9
- package/dist/components/Navigation/Tab.js +8 -8
- package/dist/components/Navigation/index.js +2 -1
- package/dist/components/Navigation/useNavigationState.js +9 -9
- package/dist/components/Placeholder.js +5 -5
- package/dist/components/Provision.js +1 -1
- package/dist/components/Routing/FullPage.js +1 -1
- package/dist/components/Routing/Page.js +7 -7
- package/dist/components/Routing/Segment.js +2 -2
- package/dist/components/Routing/SegmentPage.js +11 -11
- package/dist/components/Routing/SubPage.js +5 -5
- package/dist/components/Routing/withWaypointing.js +5 -5
- package/dist/components/Scope/ScopeModificationConfirmationDialog.js +1 -1
- package/dist/components/Scope/ScopeNode.js +6 -6
- package/dist/components/Scope/Selector.js +1 -1
- package/dist/components/Scope/index.js +9 -9
- package/dist/components/Scope/useScopeConfirmationModalState.js +10 -10
- package/dist/components/Scope/useScopeSelect.js +1 -1
- package/dist/components/ScopeExtendedConfigurationLoader.js +5 -5
- package/dist/components/Selector.js +9 -9
- package/dist/components/Sidepanel.js +2 -2
- package/dist/components/Spritesheet.js +1 -1
- package/dist/components/Switch.js +5 -5
- package/dist/components/TaskDetailsModal.js +2 -2
- package/dist/components/Text.js +6 -6
- package/dist/components/ToastList.js +9 -6
- package/dist/components/Toolbar.js +5 -5
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Treeview/Branch.js +1 -1
- package/dist/components/Treeview/Label.js +2 -2
- package/dist/components/Treeview/Leaf.js +1 -1
- package/dist/components/Treeview/Node.js +7 -7
- package/dist/components/Treeview/index.js +11 -11
- package/dist/constants.js +7 -1
- package/dist/getThemeOverrides.js +3 -3
- package/dist/hocs/withAuthentication.js +2 -2
- package/dist/hocs/withClickOutside.js +4 -4
- package/dist/hocs/withErrorBoundary.js +7 -7
- package/dist/hocs/withId.js +4 -4
- package/dist/hocs/withNavigationLink.js +5 -5
- package/dist/hocs/withScopeData.js +5 -5
- package/dist/hocs/withScrollBox.js +4 -4
- package/dist/hocs/withToggle.js +8 -8
- package/dist/hocs/withUpdateHandler.js +3 -3
- package/dist/hocs/withViewState.js +5 -5
- package/dist/hooks/useEditState.js +3 -3
- package/dist/hooks/useEntityLoader.js +8 -8
- package/dist/hooks/useFullEntityEditState.js +8 -8
- package/dist/hooks/useInfiniteScroll.js +4 -4
- package/dist/hooks/useLabelMessage.js +4 -4
- package/dist/hooks/useMultipleFieldEditState.js +3 -3
- package/dist/hooks/useNotificationRequestState.js +4 -4
- package/dist/hooks/useRequestState.js +1 -1
- package/dist/hooks/useScopeGuardLoader.js +1 -1
- package/dist/hooks/useSelectorAndUnwrap.js +1 -1
- package/dist/hooks/useToggle.js +4 -4
- package/dist/reducers/applications.js +1 -1
- package/dist/reducers/authentication.js +5 -5
- package/dist/reducers/countries.js +1 -1
- package/dist/reducers/globalErrorMessages.js +1 -1
- package/dist/reducers/localeFactory.js +1 -1
- package/dist/reducers/metadata.js +18 -10
- package/dist/reducers/modules.js +1 -1
- package/dist/reducers/navigation.js +1 -1
- package/dist/reducers/request.js +1 -1
- package/dist/reducers/requestStates.js +1 -1
- package/dist/reducers/scopeRouteState.js +1 -1
- package/dist/reducers/scopes.js +1 -1
- package/dist/reducers/scopesExtendedConfiguration.js +1 -1
- package/dist/reducers/settings.js +1 -1
- package/dist/reducers/tasks.js +1 -1
- package/dist/reducers/timezones.js +1 -1
- package/dist/reducers/toasts.js +1 -1
- package/dist/reducers/versionInfo.js +1 -1
- package/dist/reducers/view.js +1 -1
- package/dist/selectors/locale.js +1 -1
- package/dist/selectors/metadata.js +4 -4
- package/dist/selectors/modules.js +3 -3
- package/dist/selectors/navigation.js +1 -1
- package/dist/selectors/route.js +1 -1
- package/dist/selectors/scope.js +1 -1
- package/dist/selectors/tasks.js +1 -1
- package/dist/utils/buildUrl.js +19 -5
- package/dist/utils/filterHelper.js +4 -2
- package/dist/utils/flatten.js +7 -7
- package/dist/utils/index.js +1 -1
- package/dist/utils/inputHelper.js +71 -0
- package/dist/utils/logPass.js +1 -1
- package/dist/utils/memoize.js +1 -1
- package/dist/utils/modelValidationHelper.js +3 -3
- package/dist/utils/normalizeForSearch.js +4 -1
- package/dist/utils/propertyBagHelper.js +4 -4
- package/dist/utils/propertyHelper.js +6 -6
- package/dist/utils/propertyValidator.js +1 -1
- package/dist/utils/setTranslation.js +3 -3
- package/dist/utils/setTranslationWithFallback.js +3 -3
- package/dist/utils/stripKey.js +4 -4
- package/dist/utils/styledPropFuncs.js +1 -1
- package/dist/utils/testUtils.js +8 -5
- package/dist/utils/timezoneHelper.js +6 -6
- package/dist/utils/unwrapImmutable.js +1 -1
- package/dist/utils/urlHelper.js +3 -3
- package/dist/whyDidYouRerender.js +1 -1
- package/package.json +2 -5
- package/src/components/AppFrame/About.js +4 -3
- package/src/components/AppFrame/About.test.js +61 -0
- package/src/components/AppFrame/ConnectedToastList.test.js +3 -1
- package/src/components/DropMenu/DropMenu.test.js +2 -0
- package/src/components/Form/InputField.js +1 -1
- package/src/components/Form/InputField.test.js +1 -1
- package/src/components/MaterialUI/DataDisplay/Badge.js +1 -1
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +29 -8
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.test.js +18 -6
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +27 -6
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.test.js +202 -0
- package/src/components/MaterialUI/DataDisplay/SelectionList.js +6 -20
- package/src/components/MaterialUI/DataDisplay/SelectionList.test.js +0 -6
- package/src/components/MaterialUI/DataDisplay/tableHelpers.js +14 -4
- package/src/components/MaterialUI/Feedback/loadingScreen.test.js +1 -0
- package/src/components/MaterialUI/Feedback/useNotification.test.js +1 -0
- package/src/components/MaterialUI/Inputs/DatePicker.js +16 -4
- package/src/components/MaterialUI/Inputs/DatePicker.test.js +35 -1
- package/src/components/MaterialUI/Inputs/InputBase.js +2 -0
- package/src/components/MaterialUI/Inputs/InputBase.test.js +49 -0
- package/src/components/MaterialUI/Inputs/Select.js +13 -1
- package/src/components/MaterialUI/Inputs/Select.test.js +37 -0
- package/src/components/MaterialUI/Inputs/SelectProps.js +1 -0
- package/src/components/MaterialUI/Inputs/Switch.js +28 -6
- package/src/components/MaterialUI/Inputs/Switch.test.js +39 -0
- package/src/components/MaterialUI/Navigation/TabBar.js +55 -34
- package/src/components/MaterialUI/ScopeSelector/TreeItem.js +6 -2
- package/src/components/MaterialUI/ScopeSelector/TreeItem.test.js +39 -0
- package/src/components/MaterialUI/hocs/withDeferredPopper.js +1 -4
- package/src/components/MaterialUI/hocs/withDeferredPopper.test.js +2 -0
- package/src/components/Modal/Modal.test.js +3 -1
- package/src/components/Modal/Wrapper.test.js +3 -1
- package/src/components/Routing/SegmentPage.js +2 -1
- package/src/components/Scope/Scope.test.js +3 -1
- package/src/components/Sidepanel.test.js +3 -1
- package/src/components/ToastList.js +2 -2
- package/src/constants.js +5 -0
- package/src/hocs/withErrorBoundary.test.js +4 -3
- package/src/hooks/useEditState.test.js +2 -0
- package/src/hooks/useLabelMessage.test.js +2 -0
- package/src/reducers/metadata.js +12 -17
- package/src/reducers/metadata.test.js +318 -156
- package/src/utils/buildUrl.js +15 -0
- package/src/utils/buildUrl.test.js +27 -1
- package/src/utils/filterHelper.js +4 -2
- package/src/utils/filterHelper.test.js +6 -6
- package/src/utils/inputHelper.js +22 -0
- package/src/utils/inputHelper.test.js +47 -0
- package/src/utils/normalizeForSearch.js +2 -0
- package/src/utils/propertyBagHelper.js +6 -3
- package/src/utils/propertyHelper.js +6 -6
- package/src/utils/testUtils.js +25 -22
- package/src/utils/testUtils.test.js +4 -4
|
@@ -178,11 +178,27 @@ describe("metadata", () => {
|
|
|
178
178
|
});
|
|
179
179
|
|
|
180
180
|
it("get order lookup success", () => {
|
|
181
|
-
const
|
|
182
|
-
|
|
181
|
+
const oldState = Immutable.fromJS({
|
|
182
|
+
lookups: {
|
|
183
|
+
order: {
|
|
184
|
+
index: {
|
|
185
|
+
CartStatus: {
|
|
186
|
+
lookupName: "CartStatus",
|
|
187
|
+
values: {},
|
|
188
|
+
isActive: true,
|
|
189
|
+
isSystem: true,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
list: [],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
const action = {
|
|
197
|
+
type: GET_ORDER_LOOKUP_SUCCESS,
|
|
198
|
+
payload: {
|
|
183
199
|
lookupName: "CanceledStatusReasons",
|
|
184
|
-
values:
|
|
185
|
-
|
|
200
|
+
values: [
|
|
201
|
+
{
|
|
186
202
|
id: "e16d07f847284775b77cfb985724cf58",
|
|
187
203
|
value: "CanceledReason1",
|
|
188
204
|
lookupId: "CanceledStatusReasons",
|
|
@@ -190,7 +206,7 @@ describe("metadata", () => {
|
|
|
190
206
|
isActive: true,
|
|
191
207
|
isSystem: true,
|
|
192
208
|
},
|
|
193
|
-
|
|
209
|
+
{
|
|
194
210
|
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
195
211
|
value: "CanceledReason2",
|
|
196
212
|
lookupId: "CanceledStatusReasons",
|
|
@@ -198,37 +214,48 @@ describe("metadata", () => {
|
|
|
198
214
|
isActive: true,
|
|
199
215
|
isSystem: true,
|
|
200
216
|
},
|
|
201
|
-
|
|
202
|
-
isActive: true,
|
|
203
|
-
isSystem: true,
|
|
204
|
-
},
|
|
205
|
-
CartStatus: {
|
|
206
|
-
lookupName: "CartStatus",
|
|
207
|
-
values: {},
|
|
217
|
+
],
|
|
208
218
|
isActive: true,
|
|
209
219
|
isSystem: true,
|
|
210
220
|
},
|
|
211
221
|
};
|
|
212
|
-
|
|
213
|
-
const oldState = Immutable.fromJS({
|
|
214
|
-
lookups: {
|
|
215
|
-
order: {
|
|
216
|
-
index: { CartStatus: lookups.CartStatus },
|
|
217
|
-
list: [],
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
});
|
|
221
|
-
const action = {
|
|
222
|
-
type: GET_ORDER_LOOKUP_SUCCESS,
|
|
223
|
-
payload: lookups.CanceledStatusReasons,
|
|
224
|
-
};
|
|
225
222
|
const newState = reducer(oldState, action);
|
|
226
223
|
return expect(newState, "not to be", oldState).and(
|
|
227
224
|
"to equal",
|
|
228
225
|
Immutable.fromJS({
|
|
229
226
|
lookups: {
|
|
230
227
|
order: {
|
|
231
|
-
index:
|
|
228
|
+
index: {
|
|
229
|
+
CanceledStatusReasons: {
|
|
230
|
+
lookupName: "CanceledStatusReasons",
|
|
231
|
+
values: {
|
|
232
|
+
CanceledReason1: {
|
|
233
|
+
id: "e16d07f847284775b77cfb985724cf58",
|
|
234
|
+
value: "CanceledReason1",
|
|
235
|
+
lookupId: "CanceledStatusReasons",
|
|
236
|
+
sortOrder: 0,
|
|
237
|
+
isActive: true,
|
|
238
|
+
isSystem: true,
|
|
239
|
+
},
|
|
240
|
+
CanceledReason2: {
|
|
241
|
+
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
242
|
+
value: "CanceledReason2",
|
|
243
|
+
lookupId: "CanceledStatusReasons",
|
|
244
|
+
sortOrder: 0,
|
|
245
|
+
isActive: true,
|
|
246
|
+
isSystem: true,
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
isActive: true,
|
|
250
|
+
isSystem: true,
|
|
251
|
+
},
|
|
252
|
+
CartStatus: {
|
|
253
|
+
lookupName: "CartStatus",
|
|
254
|
+
values: {},
|
|
255
|
+
isActive: true,
|
|
256
|
+
isSystem: true,
|
|
257
|
+
},
|
|
258
|
+
},
|
|
232
259
|
list: [],
|
|
233
260
|
},
|
|
234
261
|
},
|
|
@@ -237,11 +264,27 @@ describe("metadata", () => {
|
|
|
237
264
|
});
|
|
238
265
|
|
|
239
266
|
it("save order metadata success", () => {
|
|
240
|
-
const
|
|
241
|
-
|
|
267
|
+
const oldState = Immutable.fromJS({
|
|
268
|
+
lookups: {
|
|
269
|
+
order: {
|
|
270
|
+
index: {
|
|
271
|
+
CartStatus: {
|
|
272
|
+
lookupName: "CartStatus",
|
|
273
|
+
values: {},
|
|
274
|
+
isActive: true,
|
|
275
|
+
isSystem: true,
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
list: [],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
});
|
|
282
|
+
const action = {
|
|
283
|
+
type: SAVE_ORDER_LOOKUP_SUCCESS,
|
|
284
|
+
payload: {
|
|
242
285
|
lookupName: "CanceledStatusReasons",
|
|
243
|
-
values:
|
|
244
|
-
|
|
286
|
+
values: [
|
|
287
|
+
{
|
|
245
288
|
id: "e16d07f847284775b77cfb985724cf58",
|
|
246
289
|
value: "CanceledReason1",
|
|
247
290
|
lookupId: "CanceledStatusReasons",
|
|
@@ -249,7 +292,7 @@ describe("metadata", () => {
|
|
|
249
292
|
isActive: true,
|
|
250
293
|
isSystem: true,
|
|
251
294
|
},
|
|
252
|
-
|
|
295
|
+
{
|
|
253
296
|
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
254
297
|
value: "CanceledReason2",
|
|
255
298
|
lookupId: "CanceledStatusReasons",
|
|
@@ -257,29 +300,10 @@ describe("metadata", () => {
|
|
|
257
300
|
isActive: true,
|
|
258
301
|
isSystem: true,
|
|
259
302
|
},
|
|
260
|
-
|
|
303
|
+
],
|
|
261
304
|
isActive: true,
|
|
262
305
|
isSystem: true,
|
|
263
306
|
},
|
|
264
|
-
CartStatus: {
|
|
265
|
-
lookupName: "CartStatus",
|
|
266
|
-
values: {},
|
|
267
|
-
isActive: true,
|
|
268
|
-
isSystem: true,
|
|
269
|
-
},
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
const oldState = Immutable.fromJS({
|
|
273
|
-
lookups: {
|
|
274
|
-
order: {
|
|
275
|
-
index: { CartStatus: lookups.CartStatus },
|
|
276
|
-
list: [],
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
});
|
|
280
|
-
const action = {
|
|
281
|
-
type: SAVE_ORDER_LOOKUP_SUCCESS,
|
|
282
|
-
payload: lookups.CanceledStatusReasons,
|
|
283
307
|
};
|
|
284
308
|
const newState = reducer(oldState, action);
|
|
285
309
|
return expect(newState, "not to be", oldState).and(
|
|
@@ -287,7 +311,37 @@ describe("metadata", () => {
|
|
|
287
311
|
Immutable.fromJS({
|
|
288
312
|
lookups: {
|
|
289
313
|
order: {
|
|
290
|
-
index:
|
|
314
|
+
index: {
|
|
315
|
+
CanceledStatusReasons: {
|
|
316
|
+
lookupName: "CanceledStatusReasons",
|
|
317
|
+
values: {
|
|
318
|
+
CanceledReason1: {
|
|
319
|
+
id: "e16d07f847284775b77cfb985724cf58",
|
|
320
|
+
value: "CanceledReason1",
|
|
321
|
+
lookupId: "CanceledStatusReasons",
|
|
322
|
+
sortOrder: 0,
|
|
323
|
+
isActive: true,
|
|
324
|
+
isSystem: true,
|
|
325
|
+
},
|
|
326
|
+
CanceledReason2: {
|
|
327
|
+
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
328
|
+
value: "CanceledReason2",
|
|
329
|
+
lookupId: "CanceledStatusReasons",
|
|
330
|
+
sortOrder: 0,
|
|
331
|
+
isActive: true,
|
|
332
|
+
isSystem: true,
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
isActive: true,
|
|
336
|
+
isSystem: true,
|
|
337
|
+
},
|
|
338
|
+
CartStatus: {
|
|
339
|
+
lookupName: "CartStatus",
|
|
340
|
+
values: {},
|
|
341
|
+
isActive: true,
|
|
342
|
+
isSystem: true,
|
|
343
|
+
},
|
|
344
|
+
},
|
|
291
345
|
list: [],
|
|
292
346
|
},
|
|
293
347
|
},
|
|
@@ -296,11 +350,27 @@ describe("metadata", () => {
|
|
|
296
350
|
});
|
|
297
351
|
|
|
298
352
|
it("add order metadata success", () => {
|
|
299
|
-
const
|
|
300
|
-
|
|
353
|
+
const oldState = Immutable.fromJS({
|
|
354
|
+
lookups: {
|
|
355
|
+
order: {
|
|
356
|
+
index: {
|
|
357
|
+
CartStatus: {
|
|
358
|
+
lookupName: "CartStatus",
|
|
359
|
+
values: {},
|
|
360
|
+
isActive: true,
|
|
361
|
+
isSystem: true,
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
list: [],
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
});
|
|
368
|
+
const action = {
|
|
369
|
+
type: ADD_ORDER_LOOKUP_SUCCESS,
|
|
370
|
+
payload: {
|
|
301
371
|
lookupName: "NewStatusReasons",
|
|
302
|
-
values:
|
|
303
|
-
|
|
372
|
+
values: [
|
|
373
|
+
{
|
|
304
374
|
id: "e16d07f847284775b77cfb985724cf58",
|
|
305
375
|
value: "CanceledReason1",
|
|
306
376
|
lookupId: "CanceledStatusReasons",
|
|
@@ -308,7 +378,7 @@ describe("metadata", () => {
|
|
|
308
378
|
isActive: true,
|
|
309
379
|
isSystem: true,
|
|
310
380
|
},
|
|
311
|
-
|
|
381
|
+
{
|
|
312
382
|
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
313
383
|
value: "CanceledReason2",
|
|
314
384
|
lookupId: "CanceledStatusReasons",
|
|
@@ -316,37 +386,48 @@ describe("metadata", () => {
|
|
|
316
386
|
isActive: true,
|
|
317
387
|
isSystem: true,
|
|
318
388
|
},
|
|
319
|
-
|
|
320
|
-
isActive: true,
|
|
321
|
-
isSystem: true,
|
|
322
|
-
},
|
|
323
|
-
CartStatus: {
|
|
324
|
-
lookupName: "CartStatus",
|
|
325
|
-
values: {},
|
|
389
|
+
],
|
|
326
390
|
isActive: true,
|
|
327
391
|
isSystem: true,
|
|
328
392
|
},
|
|
329
393
|
};
|
|
330
|
-
|
|
331
|
-
const oldState = Immutable.fromJS({
|
|
332
|
-
lookups: {
|
|
333
|
-
order: {
|
|
334
|
-
index: { CartStatus: lookups.CartStatus },
|
|
335
|
-
list: [],
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
});
|
|
339
|
-
const action = {
|
|
340
|
-
type: ADD_ORDER_LOOKUP_SUCCESS,
|
|
341
|
-
payload: lookups.NewStatusReasons,
|
|
342
|
-
};
|
|
343
394
|
const newState = reducer(oldState, action);
|
|
344
395
|
return expect(newState, "not to be", oldState).and(
|
|
345
396
|
"to equal",
|
|
346
397
|
Immutable.fromJS({
|
|
347
398
|
lookups: {
|
|
348
399
|
order: {
|
|
349
|
-
index:
|
|
400
|
+
index: {
|
|
401
|
+
NewStatusReasons: {
|
|
402
|
+
lookupName: "NewStatusReasons",
|
|
403
|
+
values: {
|
|
404
|
+
CanceledReason1: {
|
|
405
|
+
id: "e16d07f847284775b77cfb985724cf58",
|
|
406
|
+
value: "CanceledReason1",
|
|
407
|
+
lookupId: "CanceledStatusReasons",
|
|
408
|
+
sortOrder: 0,
|
|
409
|
+
isActive: true,
|
|
410
|
+
isSystem: true,
|
|
411
|
+
},
|
|
412
|
+
CanceledReason2: {
|
|
413
|
+
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
414
|
+
value: "CanceledReason2",
|
|
415
|
+
lookupId: "CanceledStatusReasons",
|
|
416
|
+
sortOrder: 0,
|
|
417
|
+
isActive: true,
|
|
418
|
+
isSystem: true,
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
isActive: true,
|
|
422
|
+
isSystem: true,
|
|
423
|
+
},
|
|
424
|
+
CartStatus: {
|
|
425
|
+
lookupName: "CartStatus",
|
|
426
|
+
values: {},
|
|
427
|
+
isActive: true,
|
|
428
|
+
isSystem: true,
|
|
429
|
+
},
|
|
430
|
+
},
|
|
350
431
|
list: ["CartStatus", "NewStatusReasons"],
|
|
351
432
|
totalCount: 2,
|
|
352
433
|
},
|
|
@@ -745,11 +826,27 @@ describe("metadata", () => {
|
|
|
745
826
|
});
|
|
746
827
|
|
|
747
828
|
it("get customer lookup success", () => {
|
|
748
|
-
const
|
|
749
|
-
|
|
829
|
+
const oldState = Immutable.fromJS({
|
|
830
|
+
lookups: {
|
|
831
|
+
customer: {
|
|
832
|
+
index: {
|
|
833
|
+
CartStatus: {
|
|
834
|
+
lookupName: "CartStatus",
|
|
835
|
+
values: {},
|
|
836
|
+
isActive: true,
|
|
837
|
+
isSystem: true,
|
|
838
|
+
},
|
|
839
|
+
},
|
|
840
|
+
list: [],
|
|
841
|
+
},
|
|
842
|
+
},
|
|
843
|
+
});
|
|
844
|
+
const action = {
|
|
845
|
+
type: GET_CUSTOMER_LOOKUP_SUCCESS,
|
|
846
|
+
payload: {
|
|
750
847
|
lookupName: "CanceledStatusReasons",
|
|
751
|
-
values:
|
|
752
|
-
|
|
848
|
+
values: [
|
|
849
|
+
{
|
|
753
850
|
id: "e16d07f847284775b77cfb985724cf58",
|
|
754
851
|
value: "CanceledReason1",
|
|
755
852
|
lookupId: "CanceledStatusReasons",
|
|
@@ -757,7 +854,7 @@ describe("metadata", () => {
|
|
|
757
854
|
isActive: true,
|
|
758
855
|
isSystem: true,
|
|
759
856
|
},
|
|
760
|
-
|
|
857
|
+
{
|
|
761
858
|
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
762
859
|
value: "CanceledReason2",
|
|
763
860
|
lookupId: "CanceledStatusReasons",
|
|
@@ -765,37 +862,48 @@ describe("metadata", () => {
|
|
|
765
862
|
isActive: true,
|
|
766
863
|
isSystem: true,
|
|
767
864
|
},
|
|
768
|
-
|
|
769
|
-
isActive: true,
|
|
770
|
-
isSystem: true,
|
|
771
|
-
},
|
|
772
|
-
CartStatus: {
|
|
773
|
-
lookupName: "CartStatus",
|
|
774
|
-
values: {},
|
|
865
|
+
],
|
|
775
866
|
isActive: true,
|
|
776
867
|
isSystem: true,
|
|
777
868
|
},
|
|
778
869
|
};
|
|
779
|
-
|
|
780
|
-
const oldState = Immutable.fromJS({
|
|
781
|
-
lookups: {
|
|
782
|
-
customer: {
|
|
783
|
-
index: { CartStatus: lookups.CartStatus },
|
|
784
|
-
list: [],
|
|
785
|
-
},
|
|
786
|
-
},
|
|
787
|
-
});
|
|
788
|
-
const action = {
|
|
789
|
-
type: GET_CUSTOMER_LOOKUP_SUCCESS,
|
|
790
|
-
payload: lookups.CanceledStatusReasons,
|
|
791
|
-
};
|
|
792
870
|
const newState = reducer(oldState, action);
|
|
793
871
|
return expect(newState, "not to be", oldState).and(
|
|
794
872
|
"to equal",
|
|
795
873
|
Immutable.fromJS({
|
|
796
874
|
lookups: {
|
|
797
875
|
customer: {
|
|
798
|
-
index:
|
|
876
|
+
index: {
|
|
877
|
+
CanceledStatusReasons: {
|
|
878
|
+
lookupName: "CanceledStatusReasons",
|
|
879
|
+
values: {
|
|
880
|
+
CanceledReason1: {
|
|
881
|
+
id: "e16d07f847284775b77cfb985724cf58",
|
|
882
|
+
value: "CanceledReason1",
|
|
883
|
+
lookupId: "CanceledStatusReasons",
|
|
884
|
+
sortOrder: 0,
|
|
885
|
+
isActive: true,
|
|
886
|
+
isSystem: true,
|
|
887
|
+
},
|
|
888
|
+
CanceledReason2: {
|
|
889
|
+
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
890
|
+
value: "CanceledReason2",
|
|
891
|
+
lookupId: "CanceledStatusReasons",
|
|
892
|
+
sortOrder: 0,
|
|
893
|
+
isActive: true,
|
|
894
|
+
isSystem: true,
|
|
895
|
+
},
|
|
896
|
+
},
|
|
897
|
+
isActive: true,
|
|
898
|
+
isSystem: true,
|
|
899
|
+
},
|
|
900
|
+
CartStatus: {
|
|
901
|
+
lookupName: "CartStatus",
|
|
902
|
+
values: {},
|
|
903
|
+
isActive: true,
|
|
904
|
+
isSystem: true,
|
|
905
|
+
},
|
|
906
|
+
},
|
|
799
907
|
list: [],
|
|
800
908
|
},
|
|
801
909
|
},
|
|
@@ -804,11 +912,27 @@ describe("metadata", () => {
|
|
|
804
912
|
});
|
|
805
913
|
|
|
806
914
|
it("save customer metadata success", () => {
|
|
807
|
-
const
|
|
808
|
-
|
|
915
|
+
const oldState = Immutable.fromJS({
|
|
916
|
+
lookups: {
|
|
917
|
+
customer: {
|
|
918
|
+
index: {
|
|
919
|
+
CartStatus: {
|
|
920
|
+
lookupName: "CartStatus",
|
|
921
|
+
values: {},
|
|
922
|
+
isActive: true,
|
|
923
|
+
isSystem: true,
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
list: [],
|
|
927
|
+
},
|
|
928
|
+
},
|
|
929
|
+
});
|
|
930
|
+
const action = {
|
|
931
|
+
type: SAVE_CUSTOMER_LOOKUP_SUCCESS,
|
|
932
|
+
payload: {
|
|
809
933
|
lookupName: "CanceledStatusReasons",
|
|
810
|
-
values:
|
|
811
|
-
|
|
934
|
+
values: [
|
|
935
|
+
{
|
|
812
936
|
id: "e16d07f847284775b77cfb985724cf58",
|
|
813
937
|
value: "CanceledReason1",
|
|
814
938
|
lookupId: "CanceledStatusReasons",
|
|
@@ -816,7 +940,7 @@ describe("metadata", () => {
|
|
|
816
940
|
isActive: true,
|
|
817
941
|
isSystem: true,
|
|
818
942
|
},
|
|
819
|
-
|
|
943
|
+
{
|
|
820
944
|
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
821
945
|
value: "CanceledReason2",
|
|
822
946
|
lookupId: "CanceledStatusReasons",
|
|
@@ -824,29 +948,10 @@ describe("metadata", () => {
|
|
|
824
948
|
isActive: true,
|
|
825
949
|
isSystem: true,
|
|
826
950
|
},
|
|
827
|
-
|
|
951
|
+
],
|
|
828
952
|
isActive: true,
|
|
829
953
|
isSystem: true,
|
|
830
954
|
},
|
|
831
|
-
CartStatus: {
|
|
832
|
-
lookupName: "CartStatus",
|
|
833
|
-
values: {},
|
|
834
|
-
isActive: true,
|
|
835
|
-
isSystem: true,
|
|
836
|
-
},
|
|
837
|
-
};
|
|
838
|
-
|
|
839
|
-
const oldState = Immutable.fromJS({
|
|
840
|
-
lookups: {
|
|
841
|
-
customer: {
|
|
842
|
-
index: { CartStatus: lookups.CartStatus },
|
|
843
|
-
list: [],
|
|
844
|
-
},
|
|
845
|
-
},
|
|
846
|
-
});
|
|
847
|
-
const action = {
|
|
848
|
-
type: SAVE_CUSTOMER_LOOKUP_SUCCESS,
|
|
849
|
-
payload: lookups.CanceledStatusReasons,
|
|
850
955
|
};
|
|
851
956
|
const newState = reducer(oldState, action);
|
|
852
957
|
return expect(newState, "not to be", oldState).and(
|
|
@@ -854,7 +959,37 @@ describe("metadata", () => {
|
|
|
854
959
|
Immutable.fromJS({
|
|
855
960
|
lookups: {
|
|
856
961
|
customer: {
|
|
857
|
-
index:
|
|
962
|
+
index: {
|
|
963
|
+
CanceledStatusReasons: {
|
|
964
|
+
lookupName: "CanceledStatusReasons",
|
|
965
|
+
values: {
|
|
966
|
+
CanceledReason1: {
|
|
967
|
+
id: "e16d07f847284775b77cfb985724cf58",
|
|
968
|
+
value: "CanceledReason1",
|
|
969
|
+
lookupId: "CanceledStatusReasons",
|
|
970
|
+
sortOrder: 0,
|
|
971
|
+
isActive: true,
|
|
972
|
+
isSystem: true,
|
|
973
|
+
},
|
|
974
|
+
CanceledReason2: {
|
|
975
|
+
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
976
|
+
value: "CanceledReason2",
|
|
977
|
+
lookupId: "CanceledStatusReasons",
|
|
978
|
+
sortOrder: 0,
|
|
979
|
+
isActive: true,
|
|
980
|
+
isSystem: true,
|
|
981
|
+
},
|
|
982
|
+
},
|
|
983
|
+
isActive: true,
|
|
984
|
+
isSystem: true,
|
|
985
|
+
},
|
|
986
|
+
CartStatus: {
|
|
987
|
+
lookupName: "CartStatus",
|
|
988
|
+
values: {},
|
|
989
|
+
isActive: true,
|
|
990
|
+
isSystem: true,
|
|
991
|
+
},
|
|
992
|
+
},
|
|
858
993
|
list: [],
|
|
859
994
|
},
|
|
860
995
|
},
|
|
@@ -863,11 +998,27 @@ describe("metadata", () => {
|
|
|
863
998
|
});
|
|
864
999
|
|
|
865
1000
|
it("add customer metadata success", () => {
|
|
866
|
-
const
|
|
867
|
-
|
|
1001
|
+
const oldState = Immutable.fromJS({
|
|
1002
|
+
lookups: {
|
|
1003
|
+
customer: {
|
|
1004
|
+
index: {
|
|
1005
|
+
CartStatus: {
|
|
1006
|
+
lookupName: "CartStatus",
|
|
1007
|
+
values: {},
|
|
1008
|
+
isActive: true,
|
|
1009
|
+
isSystem: true,
|
|
1010
|
+
},
|
|
1011
|
+
},
|
|
1012
|
+
list: [],
|
|
1013
|
+
},
|
|
1014
|
+
},
|
|
1015
|
+
});
|
|
1016
|
+
const action = {
|
|
1017
|
+
type: ADD_CUSTOMER_LOOKUP_SUCCESS,
|
|
1018
|
+
payload: {
|
|
868
1019
|
lookupName: "NewStatusReasons",
|
|
869
|
-
values:
|
|
870
|
-
|
|
1020
|
+
values: [
|
|
1021
|
+
{
|
|
871
1022
|
id: "e16d07f847284775b77cfb985724cf58",
|
|
872
1023
|
value: "CanceledReason1",
|
|
873
1024
|
lookupId: "CanceledStatusReasons",
|
|
@@ -875,7 +1026,7 @@ describe("metadata", () => {
|
|
|
875
1026
|
isActive: true,
|
|
876
1027
|
isSystem: true,
|
|
877
1028
|
},
|
|
878
|
-
|
|
1029
|
+
{
|
|
879
1030
|
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
880
1031
|
value: "CanceledReason2",
|
|
881
1032
|
lookupId: "CanceledStatusReasons",
|
|
@@ -883,37 +1034,48 @@ describe("metadata", () => {
|
|
|
883
1034
|
isActive: true,
|
|
884
1035
|
isSystem: true,
|
|
885
1036
|
},
|
|
886
|
-
|
|
887
|
-
isActive: true,
|
|
888
|
-
isSystem: true,
|
|
889
|
-
},
|
|
890
|
-
CartStatus: {
|
|
891
|
-
lookupName: "CartStatus",
|
|
892
|
-
values: {},
|
|
1037
|
+
],
|
|
893
1038
|
isActive: true,
|
|
894
1039
|
isSystem: true,
|
|
895
1040
|
},
|
|
896
1041
|
};
|
|
897
|
-
|
|
898
|
-
const oldState = Immutable.fromJS({
|
|
899
|
-
lookups: {
|
|
900
|
-
customer: {
|
|
901
|
-
index: { CartStatus: lookups.CartStatus },
|
|
902
|
-
list: [],
|
|
903
|
-
},
|
|
904
|
-
},
|
|
905
|
-
});
|
|
906
|
-
const action = {
|
|
907
|
-
type: ADD_CUSTOMER_LOOKUP_SUCCESS,
|
|
908
|
-
payload: lookups.NewStatusReasons,
|
|
909
|
-
};
|
|
910
1042
|
const newState = reducer(oldState, action);
|
|
911
1043
|
return expect(newState, "not to be", oldState).and(
|
|
912
1044
|
"to equal",
|
|
913
1045
|
Immutable.fromJS({
|
|
914
1046
|
lookups: {
|
|
915
1047
|
customer: {
|
|
916
|
-
index:
|
|
1048
|
+
index: {
|
|
1049
|
+
NewStatusReasons: {
|
|
1050
|
+
lookupName: "NewStatusReasons",
|
|
1051
|
+
values: {
|
|
1052
|
+
CanceledReason1: {
|
|
1053
|
+
id: "e16d07f847284775b77cfb985724cf58",
|
|
1054
|
+
value: "CanceledReason1",
|
|
1055
|
+
lookupId: "CanceledStatusReasons",
|
|
1056
|
+
sortOrder: 0,
|
|
1057
|
+
isActive: true,
|
|
1058
|
+
isSystem: true,
|
|
1059
|
+
},
|
|
1060
|
+
CanceledReason2: {
|
|
1061
|
+
id: "6bbfe77703c745d68b8eaceb9cd484b1",
|
|
1062
|
+
value: "CanceledReason2",
|
|
1063
|
+
lookupId: "CanceledStatusReasons",
|
|
1064
|
+
sortOrder: 0,
|
|
1065
|
+
isActive: true,
|
|
1066
|
+
isSystem: true,
|
|
1067
|
+
},
|
|
1068
|
+
},
|
|
1069
|
+
isActive: true,
|
|
1070
|
+
isSystem: true,
|
|
1071
|
+
},
|
|
1072
|
+
CartStatus: {
|
|
1073
|
+
lookupName: "CartStatus",
|
|
1074
|
+
values: {},
|
|
1075
|
+
isActive: true,
|
|
1076
|
+
isSystem: true,
|
|
1077
|
+
},
|
|
1078
|
+
},
|
|
917
1079
|
list: ["CartStatus", "NewStatusReasons"],
|
|
918
1080
|
totalCount: 2,
|
|
919
1081
|
},
|
package/src/utils/buildUrl.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { applications } from "../constants";
|
|
2
|
+
|
|
1
3
|
/* Constructs a URL search string from an object with key value pairs */
|
|
2
4
|
const buildParamString = params =>
|
|
3
5
|
Object.entries(params)
|
|
@@ -32,6 +34,19 @@ export const loadConfig = () =>
|
|
|
32
34
|
`${host}/${pathParts.join("/")}` + (parameters ? "?" + buildParamString(parameters) : "");
|
|
33
35
|
});
|
|
34
36
|
|
|
37
|
+
export const buildExternalAppUrl = (app, relativeUrl) => {
|
|
38
|
+
const url = relativeUrl[0] === "/" ? relativeUrl.substring(1) : relativeUrl;
|
|
39
|
+
|
|
40
|
+
let lowercaseApp = app.toLowerCase();
|
|
41
|
+
switch (lowercaseApp) {
|
|
42
|
+
case applications.oms:
|
|
43
|
+
case applications.pim:
|
|
44
|
+
return `/${lowercaseApp}/app/${url}`;
|
|
45
|
+
default:
|
|
46
|
+
throw new Error("Not implemented app '" + app + "'");
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
35
50
|
/* Reset function for testing, never use this in actual code */
|
|
36
51
|
export const resetConfig = () => {
|
|
37
52
|
buildUrl = placeholder;
|