Putting select placeholder in second tab
This commit is contained in:
1 parent
cb4a115596
commit
402632c126
3 files changed
+69
-54
No files matched your search
@@ -1,14 +1,8 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
TextField,
|
||||
FormControl,
|
||||
InputLabel,
|
||||
Input,
|
||||
Button,
|
||||
MenuItem,
|
||||
FormGroup,
|
||||
Select,
|
||||
FormHelperText,
|
||||
Typography,
|
||||
Grid,
|
||||
} from '@material-ui/core';
|
||||
@@ -92,47 +86,18 @@ class Basic extends React.Component {
|
||||
</Grid>
|
||||
</Grid>
|
||||
</FormGroup>
|
||||
|
||||
<FormControl className={classes.inputField}>
|
||||
<InputLabel shrink htmlFor='select'>
|
||||
Select the formula
|
||||
</InputLabel>
|
||||
<Select
|
||||
id='select'
|
||||
value='1'
|
||||
input={<Input name='Role' id='role-label-placeholder' />}
|
||||
displayEmpty
|
||||
name='select'
|
||||
className={classes.selectEmpty}
|
||||
>
|
||||
<MenuItem key='1' value='1'>moi</MenuItem>
|
||||
<MenuItem key='2' value='2'>toi</MenuItem>
|
||||
<MenuItem key='3' value='3'>nous</MenuItem>
|
||||
</Select>
|
||||
<FormHelperText> For new formula, select {'"'}create new{'"'} </FormHelperText>
|
||||
</FormControl>
|
||||
<FormControl className={classes.inputField}>
|
||||
<InputLabel shrink htmlFor='select'>
|
||||
Select the Plotter
|
||||
</InputLabel>
|
||||
<Select
|
||||
id='select'
|
||||
value='1'
|
||||
input={<Input name='Role' id='role-label-placeholder' />}
|
||||
displayEmpty
|
||||
name='select'
|
||||
className={classes.selectEmpty}
|
||||
>
|
||||
<MenuItem key='1' value='1'>moi</MenuItem>
|
||||
<MenuItem key='2' value='2'>toi</MenuItem>
|
||||
<MenuItem key='3' value='3'>nous</MenuItem>
|
||||
</Select>
|
||||
<FormHelperText> For new plotter, select {'"'}create new{'"'} </FormHelperText>
|
||||
</FormControl>
|
||||
<Grid container justify='center' >
|
||||
<Grid item>
|
||||
<Button
|
||||
className={classes.bottomButton}
|
||||
variant='contained'
|
||||
color='secondary'
|
||||
onClick={() => edit('value', 1)}
|
||||
>
|
||||
Go to technical tab
|
||||
</Button>
|
||||
<Button className={classes.bottomButton} type='submit' variant='contained' color='secondary'>
|
||||
Create New Project
|
||||
Or Create event
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import React from 'react';
|
||||
import { Typography } from '@material-ui/core';
|
||||
import {
|
||||
Typography,
|
||||
FormControl,
|
||||
InputLabel,
|
||||
Input,
|
||||
Select,
|
||||
FormHelperText,
|
||||
MenuItem,
|
||||
} from '@material-ui/core';
|
||||
|
||||
import { withStyles } from '@material-ui/core/styles';
|
||||
import styles from '../styles';
|
||||
@@ -10,15 +18,45 @@ class Technical extends React.Component {
|
||||
const { classes } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Typography
|
||||
className={classes.title}
|
||||
variant='h4'
|
||||
align='center'
|
||||
color='textPrimary'
|
||||
gutterBottom
|
||||
>
|
||||
Technical
|
||||
<Typography className={classes.typography} variant='body1' gutterBottom align='left'>
|
||||
Select the formula and the plotter you want to use, you can also create your own with the corresponding button.
|
||||
</Typography>
|
||||
<FormControl className={classes.inputField}>
|
||||
<InputLabel shrink htmlFor='select'>
|
||||
Select the formula
|
||||
</InputLabel>
|
||||
<Select
|
||||
id='select'
|
||||
value='1'
|
||||
input={<Input name='Role' id='role-label-placeholder' />}
|
||||
displayEmpty
|
||||
name='select'
|
||||
className={classes.selectEmpty}
|
||||
>
|
||||
<MenuItem key='1' value='1'>moi</MenuItem>
|
||||
<MenuItem key='2' value='2'>toi</MenuItem>
|
||||
<MenuItem key='3' value='3'>nous</MenuItem>
|
||||
</Select>
|
||||
<FormHelperText> For new formula, select {'"'}create new{'"'} </FormHelperText>
|
||||
</FormControl>
|
||||
<FormControl className={classes.inputField}>
|
||||
<InputLabel shrink htmlFor='select'>
|
||||
Select the Plotter
|
||||
</InputLabel>
|
||||
<Select
|
||||
id='select'
|
||||
value='1'
|
||||
input={<Input name='Role' id='role-label-placeholder' />}
|
||||
displayEmpty
|
||||
name='select'
|
||||
className={classes.selectEmpty}
|
||||
>
|
||||
<MenuItem key='1' value='1'>moi</MenuItem>
|
||||
<MenuItem key='2' value='2'>toi</MenuItem>
|
||||
<MenuItem key='3' value='3'>nous</MenuItem>
|
||||
</Select>
|
||||
<FormHelperText> For new plotter, select {'"'}create new{'"'} </FormHelperText>
|
||||
</FormControl>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ class Create extends React.Component {
|
||||
description: '',
|
||||
startDatetime: DateTime.local().plus({ days: 1 }).startOf('day'),
|
||||
finishDatetime: DateTime.local().plus({ days: 8 }).startOf('day'),
|
||||
formulaId: '',
|
||||
plotterId: '',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -62,6 +64,8 @@ class Create extends React.Component {
|
||||
startDatetime,
|
||||
finishDatetime,
|
||||
value,
|
||||
formulaId,
|
||||
plotterId,
|
||||
} = this.state;
|
||||
const { classes } = this.props;
|
||||
return (
|
||||
@@ -136,7 +140,15 @@ class Create extends React.Component {
|
||||
edit={(newType, newVal) => this.handleEventChange(newType, newVal)}
|
||||
/>
|
||||
</TabContainer>}
|
||||
{value === 1 && <TabContainer><Technical /></TabContainer>}
|
||||
{value === 1 && <TabContainer>
|
||||
<Technical
|
||||
event={{
|
||||
formulaId,
|
||||
plotterId,
|
||||
}}
|
||||
edit={(newType, newVal) => this.handleEventChange(newType, newVal)}
|
||||
/>
|
||||
</TabContainer>}
|
||||
{value === 2 && <TabContainer><TeamsServer /></TabContainer>}
|
||||
{value === 3 && <TabContainer><PresentationPage /></TabContainer>}
|
||||
</form>
|
||||
|
||||
Reference in new issue
Block a user