feat: journal number setting dialog.

This commit is contained in:
Ahmed Bouhuolia
2020-10-21 01:01:06 +02:00
parent c14116a0fd
commit fb1ecd529f
22 changed files with 304 additions and 150 deletions

View File

@@ -12,7 +12,16 @@ const initialState = {
export default createReducer(initialState, {
[t.SETTING_SET]: (state, action) => {
const { options } = action;
state.data.organization = optionsArrayToMap(options);
const _data = {
...state.data,
};
options.forEach((option) => {
const { key, group, value } = option;
if (!_data[group]) {
_data[group] = {};
}
_data[group][key] = value;
});
state.data = _data;
},
});