diff --git a/client/src/Components/Event/Create/Tabs/Basic.js b/client/src/Components/Event/Create/Tabs/Basic.js new file mode 100644 index 000000000..87760d33a --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/Basic.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class Basic extends React.Component { + render() { + const { classes } = this.props; + return ( + + + Basic + + + ); + } +} + +export default withStyles(styles)(Basic); diff --git a/client/src/Components/Event/Create/Tabs/PresentationPage.js b/client/src/Components/Event/Create/Tabs/PresentationPage.js new file mode 100644 index 000000000..1c674ddcc --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/PresentationPage.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class PresentationPage extends React.Component { + render() { + const { classes } = this.props; + return ( + + + PresentationPage + + + ); + } +} + +export default withStyles(styles)(PresentationPage); diff --git a/client/src/Components/Event/Create/Tabs/TeamsServer.js b/client/src/Components/Event/Create/Tabs/TeamsServer.js new file mode 100644 index 000000000..874c72d6f --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/TeamsServer.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class TeamsServer extends React.Component { + render() { + const { classes } = this.props; + return ( + + + TeamsServer + + + ); + } +} + +export default withStyles(styles)(TeamsServer); diff --git a/client/src/Components/Event/Create/Tabs/Technical.js b/client/src/Components/Event/Create/Tabs/Technical.js new file mode 100644 index 000000000..f091e6bd2 --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/Technical.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class Technical extends React.Component { + render() { + const { classes } = this.props; + return ( + + + Technical + + + ); + } +} + +export default withStyles(styles)(Technical); diff --git a/client/src/Components/Event/Create/Tabs/index.js b/client/src/Components/Event/Create/Tabs/index.js new file mode 100644 index 000000000..feecaaf55 --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/index.js @@ -0,0 +1,11 @@ +import Basic from './Basic'; +import PresentationPage from './PresentationPage'; +import TeamsServer from './TeamsServer'; +import Technical from './Technical'; + +export { + Basic, + PresentationPage, + TeamsServer, + Technical, +}; diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index 69c200d2c..cfbd9686e 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -15,18 +15,44 @@ import { Paper, Grid, Typography, + AppBar, + Tabs, + Tab, } from '@material-ui/core'; -import { ChevronLeft, ChevronRight } from '@material-ui/icons'; +import { + ChevronLeft, + ChevronRight, + Face as BasicIcon, + Alarm as TechnicalIcon, + Group as TeamAndServerIcon, + PresentToAll as PresentationIcon, +} from '@material-ui/icons'; import { DateTimePicker } from 'material-ui-pickers'; import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; +import { + Basic, + PresentationPage, + TeamsServer, + Technical, +} from './Tabs'; + import { hostedEventsCalls } from '../../../GraphQL/Calls'; +function TabContainer(props) { + return ( + + {props.children} + + ); +} + class Create extends React.Component { constructor(props) { super(props); this.state = { + value: 0, name: '', description: '', startDatetime: DateTime.local().plus({ days: 1 }).startOf('day'), @@ -34,9 +60,13 @@ class Create extends React.Component { }; } + handleChange = (event, value) => { + this.setState({ value }); + } + render() { const { - name, description, startDatetime, finishDatetime, + name, description, startDatetime, finishDatetime, value, } = this.state; const { classes } = this.props; return ( @@ -47,60 +77,94 @@ class Create extends React.Component { } > {hostEvent => ( - - - - Create a new event - -
{ - e.preventDefault(); - hostEvent({ - variables: { - event: { - name, - description, - startDatetime: startDatetime.valueOf() / 1000, - finishDatetime: startDatetime.valueOf() / 1000, - }, - }, - }); - }} +
+ + - + } + /> + } + /> + } + disabled + /> + } + disabled + /> + + + + + Create a new event + + { + e.preventDefault(); + hostEvent({ + variables: { + event: { + name, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: startDatetime.valueOf() / 1000, + }, + }, + }); + }} + > + {value === 0 && + These are the basic information you need to input in order to create an event. There might be some heavy changes in the near future as the application is still at a very early stage. - + - - - - + The dates are purely indicative, as it is important for you to make sure everything is ready before manually triggering the beginning and end of the event. If you are confident use the scheduler to start it for you(incoming). - + - - - - + + + - - - + + - - - + + + - - + + Select the formula - - } @@ -140,17 +204,17 @@ class Create extends React.Component { name='select' className={classes.selectEmpty} > - moi - toi - nous - - For new formula, select {'"'}create new{'"'} - - - + moi + toi + nous + + For new formula, select {'"'}create new{'"'} + + + Select the Plotter - - } @@ -158,19 +222,27 @@ class Create extends React.Component { name='select' className={classes.selectEmpty} > - moi - toi - nous - - For new plotter, select {'"'}create new{'"'} - - - - - - - - + moi + toi + nous + + For new plotter, select {'"'}create new{'"'} + + + + + + + + } + {value === 1 && } + {value === 2 && } + {value === 3 && } + + +
)} ); diff --git a/client/src/Components/Event/Create/styles.js b/client/src/Components/Event/Create/styles.js index 44ef163a0..150cf362d 100644 --- a/client/src/Components/Event/Create/styles.js +++ b/client/src/Components/Event/Create/styles.js @@ -1,5 +1,34 @@ const styles = theme => ({ root: { + flexGrow: 1, + width: '100%', + backgroundColor: theme.palette.background.paper, + padding: 0, + margin: 0, + }, + tabTitle: { + width: '25%', + maxWidth: 'none', + }, + card: { + flexGrow: 1, + padding: 20, + marginTop: 20, + marginBottom: 20, + marginLeft: 400, + marginRight: 400, + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right', + }, + buttonGrid: { + marginTop: -20, + }, + title: { + marginTop: 20, + }, + paperRoot: { width: '50%', flexGrow: 1, padding: 10, @@ -16,23 +45,12 @@ const styles = theme => ({ marginLeft: '10%', marginTop: 40, }, - checkbox: { - width: 150, - marginLeft: '0%', - marginTop: 20, - }, selectEmpty: { marginTop: theme.spacing.unit * 2, }, - button: { - margin: theme.spacing.unit, - marginTop: theme.spacing.unit * 3, - }, - img: { - display: 'block', - marginTop: 20, - maxWidth: 120, - maxHeight: 24, + bottomButton: { + padding: 15, + margin: 20, }, });