Merge branch '18559-user-profile' into main. Closes #18559
[arvados-workbench2.git] / src / store / process-panel / process-panel-reducer.ts
index 487b092b123a19f6e0cb8264138dc3fdcfda25e7..d26e76932038bf500e33074a68548645f6a1064f 100644 (file)
@@ -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, {
-        INIT_PROCESS_PANEL_FILTERS: statuses => {
+    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