2 * Copyright © 2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 import { createAction } from 'redux-actions';
18 export const SET_CURRENT_VERSION = 'workflow/version/SET_CURRENT_VERSION';
19 export const FETCH_REQUESTED = 'workflow/version/FETCH_REQUESTED';
20 export const DETAILS_CHANGED = 'workflow/version/DETAILS_CHANGED';
21 export const FETCH_REQUESTED_FAILED = 'workflow/version/FETCH_REQUESTED_FAILED';
22 export const VERSION_STATE_CHANGED = 'workflow/version/VERSION_STATE_CHANGED';
23 export const TOGGLE_COMPOSITION_UPDATE =
24 'workflow/version/TOGGLE_COMPOSITION_UPDATE';
25 export const SET_OPERRATION_MODE = 'workflow/version/SET_OPERRATION_MODE';
27 export const workflowVersionFetchRequestedAction = createAction(
31 export const workflowVersionDetailsChangedAction = createAction(
35 export const setWorkflowVersionAction = createAction(SET_CURRENT_VERSION);
36 export const fetchWorkflowVersionActionFailed = createAction(
37 FETCH_REQUESTED_FAILED,
41 export const versionStateChangedAction = createAction(
42 VERSION_STATE_CHANGED,
46 export const toggleCompositionUpdate = createAction(
47 TOGGLE_COMPOSITION_UPDATE,
48 payload => ({ isCompositionUpdating: payload })
51 export const setOperationModeAction = createAction(SET_OPERRATION_MODE);
53 export const getIsCompositionUpdating = state =>
54 state.currentVersion.general.isCompositionUpdating;
56 export const versionState = {
58 CERTIFIED: 'certified'