group edit ui
This commit is contained in:
@@ -28,6 +28,7 @@ export default function groupEditorReducer(state = initialState, action) {
|
||||
return state.withMutations(map => {
|
||||
map.set('groupId', action.group.get('id'));
|
||||
map.set('title', action.group.get('title'));
|
||||
map.set('description', action.group.get('description'));
|
||||
map.set('isSubmitting', false);
|
||||
});
|
||||
case GROUP_EDITOR_VALUE_CHANGE:
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
GROUP_FETCH_FAIL,
|
||||
GROUPS_FETCH_SUCCESS,
|
||||
} from '../actions/groups';
|
||||
import { GROUP_UPDATE_SUCCESS } from '../actions/group_editor';
|
||||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
|
||||
const initialState = ImmutableMap();
|
||||
@@ -20,6 +21,7 @@ const normalizeGroups = (state, groups) => {
|
||||
export default function groups(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case GROUP_FETCH_SUCCESS:
|
||||
case GROUP_UPDATE_SUCCESS:
|
||||
return normalizeGroup(state, action.group);
|
||||
case GROUPS_FETCH_SUCCESS:
|
||||
return normalizeGroups(state, action.groups);
|
||||
|
||||
Reference in New Issue
Block a user