X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7a8fafa13f5f94945cf0a4c5965db273f3435823..25216cc7acedc987c26a159f0b640210c0ef101e:/src/store/process-panel/process-panel-reducer.ts diff --git a/src/store/process-panel/process-panel-reducer.ts b/src/store/process-panel/process-panel-reducer.ts index 3e31f56446..d26e769320 100644 --- a/src/store/process-panel/process-panel-reducer.ts +++ b/src/store/process-panel/process-panel-reducer.ts @@ -2,23 +2,26 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { ProcessPanel } from '~/store/process-panel/process-panel'; -import { ProcessPanelAction, procesPanelActions } from '~/store/process-panel/process-panel-actions'; +import { ProcessPanel } from 'store/process-panel/process-panel'; +import { ProcessPanelAction, processPanelActions } from 'store/process-panel/process-panel-actions'; const initialState: ProcessPanel = { + containerRequestUuid: "", filters: {} }; export const processPanelReducer = (state = initialState, action: ProcessPanelAction): ProcessPanel => - procesPanelActions.match(action, { + processPanelActions.match(action, { + SET_PROCESS_PANEL_CONTAINER_REQUEST_UUID: containerRequestUuid => ({ + ...state, containerRequestUuid + }), SET_PROCESS_PANEL_FILTERS: statuses => { const filters = statuses.reduce((filters, status) => ({ ...filters, [status]: true }), {}); - return { filters }; + return { ...state, filters }; }, TOGGLE_PROCESS_PANEL_FILTER: status => { const filters = { ...state.filters, [status]: !state.filters[status] }; - return { filters }; + return { ...state, filters }; }, default: () => state, }); - \ No newline at end of file