init search facility
[arvados-workbench2.git] / src / views / run-process-panel / run-process-panel-root.tsx
index f98660ad44fd065421987643da83f192cc2f6862..b656ba1f0d776d819c2e292f0c37f35af622161a 100644 (file)
@@ -3,37 +3,36 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { Stepper, Step, StepLabel, StepContent, Button } from '@material-ui/core';
+import { Stepper, Step, StepLabel, StepContent } from '@material-ui/core';
+import { RunProcessFirstStepDataProps, RunProcessFirstStepActionProps, RunProcessFirstStep } from '~/views/run-process-panel/run-process-first-step';
+import { RunProcessSecondStepDataProps, RunProcessSecondStepActionProps, RunProcessSecondStepForm } from '~/views/run-process-panel/run-process-second-step';
 
-export interface RunProcessPanelRootDataProps {
+export type RunProcessPanelRootDataProps = {
     currentStep: number;
-}
+} & RunProcessFirstStepDataProps & RunProcessSecondStepDataProps;
 
-export interface RunProcessPanelRootActionProps {
-    onClick: (step: number) => void;
-}
+export type RunProcessPanelRootActionProps = RunProcessFirstStepActionProps & RunProcessSecondStepActionProps;
 
 type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
 
-export const RunProcessPanelRoot = ({ currentStep, onClick, ...props }: RunProcessPanelRootProps) =>
+export const RunProcessPanelRoot = ({ currentStep, onSearch, onSetStep, onRunProcess, onSetWorkflow, workflows, selectedWorkflow }: RunProcessPanelRootProps) =>
     <Stepper activeStep={currentStep} orientation="vertical" elevation={2}>
         <Step>
             <StepLabel>Choose a workflow</StepLabel>
             <StepContent>
-                <Button variant="contained" color="primary" onClick={() => onClick(1)}>
-                    Next
-                </Button>
+                <RunProcessFirstStep 
+                    workflows={workflows}
+                    selectedWorkflow={selectedWorkflow}
+                    onSearch={onSearch}
+                    onSetStep={onSetStep} 
+                    onSetWorkflow={onSetWorkflow} />
             </StepContent>
         </Step>
         <Step>
             <StepLabel>Select inputs</StepLabel>
             <StepContent>
-                <Button color="primary" onClick={() => onClick(0)}>
-                    Back
-                </Button>
-                <Button variant="contained" color="primary">
-                    Run Process
-                </Button>
+                <RunProcessSecondStepForm />
+                {/* <RunProcessSecondStep onSetStep={onSetStep} onRunProcess={onRunProcess} /> */}
             </StepContent>
         </Step>
     </Stepper>;
\ No newline at end of file