Sha256: 72ff4686f5fe958de1f5efab811e04ddd524a3c36b170d3a1d5e4bd378775bfd

Contents?: true

Size: 800 Bytes

Versions: 28

Compression:

Stored size: 800 Bytes

Contents

import Immutable from 'seamless-immutable';
import {
  UPDATE_CONTENT_VIEW,
  UPDATE_CONTENT_VIEW_FAILURE,
  UPDATE_CONTENT_VIEW_SUCCESS,
  CONTENT_VIEW_NEEDS_PUBLISH,
  CONTENT_VIEW_NEEDS_PUBLISH_RESET,
} from '../ContentViewsConstants';

const initialState = Immutable({
  updating: false,
});

export default (state = initialState, action) => {
  switch (action.type) {
  case UPDATE_CONTENT_VIEW:
    return state.set('updating', true);
  case UPDATE_CONTENT_VIEW_SUCCESS:
    return state.merge({ updating: false });
  case UPDATE_CONTENT_VIEW_FAILURE:
    return state.set('updating', false);
  case CONTENT_VIEW_NEEDS_PUBLISH:
    return state.set('needsPublish', true);
  case CONTENT_VIEW_NEEDS_PUBLISH_RESET:
    return state.set('needsPublish', false);
  default:
    return state;
  }
};

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.15.0.rc1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.14.1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.14.0 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.14.0.rc3 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.14.0.rc2 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.14.0.rc1.1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.14.0.rc1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.13.1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.13.0 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.12.1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.13.0.rc1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.12.0 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.12.0.rc3 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.12.0.rc2 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.12.0.rc1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.11.1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.11.0 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.11.0.rc2 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js
katello-4.11.0.rc1 webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js