+ client: modify added filters
This commit is contained in:
committed by
Simon Zolin
parent
0b8cba7384
commit
b3bca39de4
@@ -37,7 +37,17 @@ const filtering = handleActions(
|
||||
isFilterAdded: true,
|
||||
}),
|
||||
|
||||
[actions.toggleFilteringModal]: (state) => {
|
||||
[actions.toggleFilteringModal]: (state, { payload }) => {
|
||||
if (payload) {
|
||||
const newState = {
|
||||
...state,
|
||||
isModalOpen: !state.isModalOpen,
|
||||
isFilterAdded: false,
|
||||
modalType: payload.type || '',
|
||||
modalFilterUrl: payload.url || '',
|
||||
};
|
||||
return newState;
|
||||
}
|
||||
const newState = {
|
||||
...state,
|
||||
isModalOpen: !state.isModalOpen,
|
||||
@@ -50,6 +60,10 @@ const filtering = handleActions(
|
||||
[actions.toggleFilterFailure]: state => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.toggleFilterSuccess]: state => ({ ...state, processingConfigFilter: false }),
|
||||
|
||||
[actions.editFilterRequest]: state => ({ ...state, processingConfigFilter: true }),
|
||||
[actions.editFilterFailure]: state => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.editFilterSuccess]: state => ({ ...state, processingConfigFilter: false }),
|
||||
|
||||
[actions.refreshFiltersRequest]: state => ({ ...state, processingRefreshFilters: true }),
|
||||
[actions.refreshFiltersFailure]: state => ({ ...state, processingRefreshFilters: false }),
|
||||
[actions.refreshFiltersSuccess]: state => ({ ...state, processingRefreshFilters: false }),
|
||||
@@ -80,6 +94,8 @@ const filtering = handleActions(
|
||||
userRules: '',
|
||||
interval: 24,
|
||||
enabled: true,
|
||||
modalType: '',
|
||||
modalFilterUrl: '',
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user