2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 import {combineReducers} from 'redux';
23 import licenseModelCreationReducer from './creation/LicenseModelCreationReducer.js';
24 import licenseModelEditorReducer from './LicenseModelEditorReducer.js';
26 import licenseAgreementListReducer from './licenseAgreement/LicenseAgreementListReducer.js';
27 import licenseAgreementEditorReducer from './licenseAgreement/LicenseAgreementEditorReducer.js';
28 import {actionTypes as licenseAgreementActionTypes} from './licenseAgreement/LicenseAgreementConstants.js';
30 import featureGroupsEditorReducer from './featureGroups/FeatureGroupsEditorReducer.js';
31 import featureGroupsListReducer from './featureGroups/FeatureGroupsListReducer.js';
32 import {actionTypes as featureGroupsActionConstants} from './featureGroups/FeatureGroupsConstants';
34 import entitlementPoolsListReducer from './entitlementPools/EntitlementPoolsListReducer.js';
35 import entitlementPoolsEditorReducer from './entitlementPools/EntitlementPoolsEditorReducer.js';
36 import {actionTypes as entitlementPoolsConstants} from './entitlementPools/EntitlementPoolsConstants';
38 import licenseKeyGroupsEditorReducer from './licenseKeyGroups/LicenseKeyGroupsEditorReducer.js';
39 import licenseKeyGroupsListReducer from './licenseKeyGroups/LicenseKeyGroupsListReducer.js';
40 import {actionTypes as licenseKeyGroupsConstants} from './licenseKeyGroups/LicenseKeyGroupsConstants.js';
42 export default combineReducers({
43 licenseModelCreation: licenseModelCreationReducer,
44 licenseModelEditor: licenseModelEditorReducer,
46 licenseAgreement: combineReducers({
47 licenseAgreementEditor: licenseAgreementEditorReducer,
48 licenseAgreementList: licenseAgreementListReducer,
49 licenseAgreementToDelete: (state = false, action) => action.type === licenseAgreementActionTypes.LICENSE_AGREEMENT_DELETE_CONFIRM ? action.licenseAgreementToDelete : state
51 featureGroup: combineReducers({
52 featureGroupEditor: featureGroupsEditorReducer,
53 featureGroupsList: featureGroupsListReducer,
54 featureGroupToDelete: (state = false, action) => action.type === featureGroupsActionConstants.FEATURE_GROUPS_DELETE_CONFIRM ? action.featureGroupToDelete : state
56 entitlementPool: combineReducers({
57 entitlementPoolEditor: entitlementPoolsEditorReducer,
58 entitlementPoolsList: entitlementPoolsListReducer,
59 entitlementPoolToDelete: (state = false, action) => action.type === entitlementPoolsConstants.ENTITLEMENT_POOLS_DELETE_CONFIRM ? action.entitlementPoolToDelete : state
61 licenseKeyGroup: combineReducers({
62 licenseKeyGroupsEditor: licenseKeyGroupsEditorReducer,
63 licenseKeyGroupsList: licenseKeyGroupsListReducer,
64 licenseKeyGroupToDelete: (state = false, action) => action.type === licenseKeyGroupsConstants.LICENSE_KEY_GROUPS_DELETE_CONFIRM ? action.licenseKeyGroupToDelete : state