|
|
@@ -80,51 +80,61 @@ function Candidatos(props) {
|
|
|
|
|
|
return (
|
|
|
<FormikProvider style={{ padding: 25 }} value={formik}>
|
|
|
- <Typography style={{ padding: !home ? 5 : 0, marginBottom: !home ? 15 : 0 }}>
|
|
|
- {home ? "" : "Ingresa la informacion del candidato"}
|
|
|
- </Typography>
|
|
|
- <Divider />
|
|
|
<Form autoComplete="off" noValidate onSubmit={handleSubmit}>
|
|
|
<Stack spacing={3}>
|
|
|
|
|
|
- <Stack
|
|
|
- style={{ paddingTop: !home ? 15 : 0, paddingBottom: !home ? 15 : 0 }}
|
|
|
- direction={{ xs: 'column', sm: 'row' }}
|
|
|
- spacing={2}>
|
|
|
-
|
|
|
- <TextField
|
|
|
- style={{ display: home ? 'none' : 'block', background: '' }}
|
|
|
- label="Nombre"
|
|
|
- {...getFieldProps('nombres')}
|
|
|
- error={Boolean(touched.nombres && errors.nombres)}
|
|
|
- helperText={touched.nombres && errors.nombres}
|
|
|
- />
|
|
|
-
|
|
|
- <TextField
|
|
|
- style={{ display: home ? 'none' : 'block' }}
|
|
|
- label="Apellidos"
|
|
|
- {...getFieldProps('apellidos')}
|
|
|
- error={Boolean(touched.apellidos && errors.apellidos)}
|
|
|
- helperText={touched.apellidos && errors.apellidos}
|
|
|
- />
|
|
|
- </Stack>
|
|
|
-
|
|
|
- <Stack direction={{ xs: 'column', sm: 'row' }} >
|
|
|
- <TextField
|
|
|
- style={{ display: home ? 'none' : 'block' }}
|
|
|
- fullWidth
|
|
|
- type="email"
|
|
|
- label="Correo Electronico"
|
|
|
- {...getFieldProps('mail')}
|
|
|
- error={Boolean(touched.mail && errors.mail)}
|
|
|
- helperText={touched.mail && errors.mail}
|
|
|
- />
|
|
|
-
|
|
|
- <Button hidden={home} type="submit">
|
|
|
- <AddCircle style={{ color: 'var(--main)' }} />
|
|
|
- </Button>
|
|
|
-
|
|
|
- </Stack>
|
|
|
+ {
|
|
|
+ !home ?
|
|
|
+ (
|
|
|
+ <>
|
|
|
+
|
|
|
+ <Typography style={{ padding: 5, marginBottom: !home ? 15 : 0 }}>
|
|
|
+ {home ? "" : "Ingresa la informacion del candidato"}
|
|
|
+ </Typography>
|
|
|
+ <Divider />
|
|
|
+
|
|
|
+
|
|
|
+ <Stack
|
|
|
+ style={{ paddingTop: 15, paddingBottom: !home ? 15 : 0 }}
|
|
|
+ direction={{ xs: 'column', sm: 'row' }}
|
|
|
+ spacing={2}>
|
|
|
+
|
|
|
+ <TextField
|
|
|
+ style={{ display: 'block', background: '' }}
|
|
|
+ label="Nombre"
|
|
|
+ {...getFieldProps('nombres')}
|
|
|
+ error={Boolean(touched.nombres && errors.nombres)}
|
|
|
+ helperText={touched.nombres && errors.nombres}
|
|
|
+ />
|
|
|
+
|
|
|
+ <TextField
|
|
|
+ style={{ display: 'block' }}
|
|
|
+ label="Apellidos"
|
|
|
+ {...getFieldProps('apellidos')}
|
|
|
+ error={Boolean(touched.apellidos && errors.apellidos)}
|
|
|
+ helperText={touched.apellidos && errors.apellidos}
|
|
|
+ />
|
|
|
+ </Stack>
|
|
|
+
|
|
|
+ <Stack direction={{ xs: 'column', sm: 'row' }} >
|
|
|
+ <TextField
|
|
|
+ style={{ display: 'block' }}
|
|
|
+ fullWidth
|
|
|
+ type="email"
|
|
|
+ label="Correo Electronico"
|
|
|
+ {...getFieldProps('mail')}
|
|
|
+ error={Boolean(touched.mail && errors.mail)}
|
|
|
+ helperText={touched.mail && errors.mail}
|
|
|
+ />
|
|
|
+
|
|
|
+ <Button type="submit">
|
|
|
+ <AddCircle style={{ color: 'var(--main)' }} />
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ </Stack>
|
|
|
+ </>
|
|
|
+ ) : undefined
|
|
|
+ }
|
|
|
|
|
|
<MailTable
|
|
|
home={home}
|