1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ProcessPanel } from '~/store/process-panel/process-panel';
6 import { ProcessPanelAction, procesPanelActions } from '~/store/process-panel/process-panel-actions';
8 const initialState: ProcessPanel = {
12 export const processPanelReducer = (state = initialState, action: ProcessPanelAction): ProcessPanel =>
13 procesPanelActions.match(action, {
14 SET_PROCESS_PANEL_FILTERS: statuses => {
15 const filters = statuses.reduce((filters, status) => ({ ...filters, [status]: true }), {});
18 TOGGLE_PROCESS_PANEL_FILTER: status => {
19 const filters = { ...state.filters, [status]: !state.filters[status] };