Skip to content

Commit

Permalink
forms listo
Browse files Browse the repository at this point in the history
  • Loading branch information
J0SEF4 committed Nov 2, 2024
1 parent 28054a9 commit b698f9f
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 130 deletions.
10 changes: 0 additions & 10 deletions src/pages/users/zcultura.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function CulturaForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -284,15 +283,6 @@ function CulturaForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>

<FormControlLabel
control={
Expand Down
11 changes: 1 addition & 10 deletions src/pages/users/zdeporte.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function DeporteForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -284,15 +283,7 @@ function DeporteForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>


<FormControlLabel
control={
Expand Down
11 changes: 1 addition & 10 deletions src/pages/users/zentretenimiento.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function EntretenimientoForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -284,15 +283,7 @@ function EntretenimientoForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>


<FormControlLabel
control={
Expand Down
11 changes: 1 addition & 10 deletions src/pages/users/zfamiliar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function FamiliarForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -284,15 +283,7 @@ function FamiliarForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>


<FormControlLabel
control={
Expand Down
11 changes: 1 addition & 10 deletions src/pages/users/zgastronomia.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function GastronomiaForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
aptoVeganos: false,
aptoVegetarianos: false,
Expand Down Expand Up @@ -308,15 +307,7 @@ function GastronomiaForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>


<FormControlLabel
control={
Expand Down
10 changes: 0 additions & 10 deletions src/pages/users/zholistico.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function HolisticoForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -284,15 +283,6 @@ function HolisticoForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>

<FormControlLabel
control={
Expand Down
11 changes: 1 addition & 10 deletions src/pages/users/zmascota.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function MascotaForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -284,15 +283,7 @@ function MascotaForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>


<FormControlLabel
control={
Expand Down
10 changes: 0 additions & 10 deletions src/pages/users/znegocios.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function NegociosForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -280,15 +279,6 @@ function NegociosForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>

<FormControlLabel
control={
Expand Down
10 changes: 0 additions & 10 deletions src/pages/users/zoficio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function OficioForm({ handleNext }) {
instagram: '',
facebook: '',
paginaWeb: '',
abiertoEnFeriados: false,
disponible: false,
});

Expand Down Expand Up @@ -284,15 +283,6 @@ function OficioForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>

<FormControlLabel
control={
Expand Down
41 changes: 1 addition & 40 deletions src/pages/users/ztours.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@ import { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import {
TextField,
MenuItem,
FormControl,
InputLabel,
Select,
Button,
Checkbox,
FormControlLabel,
Grid,
Typography,
} from '@mui/material';
//------------new
Expand Down Expand Up @@ -94,32 +89,7 @@ function TourForm({ handleNext }) {
setFormData(prev => ({ ...prev, [field]: value }));
setErrors(prev => ({ ...prev, [field]: '' })); // Reset error when value changes
};

const handleHorarioChange = (day, field, value) => {
setFormData(prev => ({
...prev,
horarios: {
...prev.horarios,
[day]: {
...prev.horarios[day],
[field]: value
}
}
}));
};

const handleCheckboxChange = (day) => {
setFormData(prev => ({
...prev,
horarios: {
...prev.horarios,
[day]: {
...prev.horarios[day],
abierto: !prev.horarios[day].abierto
}
}
}));
};


const validateForm = () => {
const newErrors = {};
Expand Down Expand Up @@ -284,15 +254,6 @@ function TourForm({ handleNext }) {
alignItems: 'center',
}}
>
<FormControlLabel
control={
<Checkbox
checked={formData.abiertoEnFeriados}
onChange={(e) => handleInputChange('abiertoEnFeriados', e.target.checked)}
/>
}
label="Abierto en Feriados"
/>

<FormControlLabel
control={
Expand Down

0 comments on commit b698f9f

Please sign in to comment.