diff --git a/src/components/Central.tsx b/src/components/Central.tsx index b74a907..8539bc5 100644 --- a/src/components/Central.tsx +++ b/src/components/Central.tsx @@ -4,6 +4,7 @@ import Step from "@material-ui/core/Step"; import StepLabel from "@material-ui/core/StepLabel"; import Button from "@material-ui/core/Button"; import Typography from "@material-ui/core/Typography"; +import { FormControl, Grid, InputLabel, MenuItem, Select } from "@material-ui/core"; /* function Central(props: any) { @@ -163,13 +164,36 @@ function Central(props: any) { } */ -/** CONTAINER **/ +interface Form { + oficina?: string; + area?: string; + + nie?: string; + nombre?: string; + apellidos?: string; + email?: string; + + + rnie?: string; + rnombre?: string; + rapellidos?: string; + remail?: string; + + + telefono?: number; + expediente?: string; + matricula?: string; + +} + interface ICentralProps { current: number; setActiveStep: (arg0: number) => void; } -interface ICentralState {} +interface ICentralState { + formulario: Form +} class Centrals extends React.Component { steps = [ @@ -179,9 +203,21 @@ class Centrals extends React.Component { "Datos del representante", "Otros datos", ]; + oficinas = [{id: 0, name:'Alicante'},{id: 1, name:'Sevilla'},{id: 2, name:'Madrid'},{id: 3, name:'Constantina'}] + areas = ['Conductores', 'VehĂ­culos', 'Sanciones', 'Otros'] constructor(props: ICentralProps) { super(props); + this.state = { formulario: {} as Form }; + } + + onValueChange = (event: React.ChangeEvent) => { + const key = event.target.name + const val = event.target.value + const formGroup = { ...this.state.formulario }; + formGroup[key] = val; + this.setState({ formulario: formGroup }); + console.log(this.state) } isStepOptional(step: number) { @@ -200,7 +236,26 @@ class Centrals extends React.Component { getStepContent(step: number) { switch (step) { case 0: - return "Select campaign settings..."; + return ( + + + + Oficina + + + + + ); case 1: return "What is an ad group anyways?"; case 2: @@ -222,7 +277,7 @@ class Centrals extends React.Component { const labelProps: { optional?: React.ReactNode } = {}; if (this.isStepOptional(index)) { labelProps.optional = ( - Opcional + Opcional ); } return ( @@ -235,11 +290,11 @@ class Centrals extends React.Component {
{this.props.current === this.steps.length ? (
- Has completado todos los pasos + Has completado todos los pasos
) : (
- {this.getStepContent(this.props.current)} + {this.getStepContent(this.props.current)}