1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { withStyles, WithStyles, StyleRulesCallback, Grid, Button } from '@material-ui/core';
7 import { ArvadosTheme } from '~/common/custom-theme';
8 import { Field, reduxForm, InjectedFormProps } from 'redux-form';
9 import { TextField } from '~/components/text-field/text-field';
10 import { RunProcessSecondStepDataFormProps, RUN_PROCESS_SECOND_STEP_FORM_NAME } from '~/store/run-process-panel/run-process-panel-actions';
12 type CssRules = 'root';
14 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
20 export interface RunProcessSecondStepDataProps {
24 export interface RunProcessSecondStepActionProps {
25 onSetStep: (step: number) => void;
26 onRunProcess: (data: RunProcessSecondStepDataFormProps) => void;
29 type RunProcessSecondStepProps = RunProcessSecondStepDataProps
30 & RunProcessSecondStepActionProps
31 & WithStyles<CssRules>
32 & InjectedFormProps<RunProcessSecondStepDataFormProps>;
34 const RunProcessSecondStep = withStyles(styles)(
35 ({ onSetStep, classes }: RunProcessSecondStepProps) =>
36 <Grid container spacing={16}>
42 label="Enter a new name for run process" />
46 label="Enter a description for run process" />
50 <Button color="primary" onClick={() => onSetStep(0)}>
53 <Button variant="contained" color="primary">
60 export const RunProcessSecondStepForm = reduxForm<RunProcessSecondStepDataFormProps>({
61 form: RUN_PROCESS_SECOND_STEP_FORM_NAME
62 })(RunProcessSecondStep);