modifiche002

This commit is contained in:
2026-05-26 14:38:05 +02:00
parent 83fb4b8c1e
commit bd5b845e43
10 changed files with 162 additions and 152 deletions

View File

@@ -24,6 +24,18 @@ const services = [
"Laparoscopia",
];
const doctors = [
"Dott. Paolo Parmeggiani",
"Dott.ssa Irene Paganelli",
"Dott. Simone Tinti",
"Dott.ssa Michela Sghedoni",
"Dott. Luca Pietri",
"Dott.ssa Sara Casali",
"Dott. Riccardo Suffritti",
"Dott.ssa Elena Venturelli",
"Dott.ssa Cinzia Pellegrini",
];
const timeSlots = [
"09:00",
"09:30",
@@ -44,6 +56,7 @@ type BookingFormState = {
phone: string;
petName: string;
petType: string;
doctor: string;
service: string;
date: string;
time: string;
@@ -55,6 +68,7 @@ const initialForm: BookingFormState = {
phone: "",
petName: "",
petType: "cane",
doctor: "",
service: "",
date: "",
time: "",
@@ -72,7 +86,7 @@ export default function BookingSection() {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (!form.name || !form.phone || !form.service || !form.date) {
if (!form.name || !form.phone || !form.doctor || !form.service || !form.date) {
toast.error("Compila tutti i campi obbligatori");
return;
}
@@ -90,6 +104,7 @@ export default function BookingSection() {
phone: form.phone,
pet_name: form.petName,
pet_type: form.petType,
doctor: form.doctor,
service: form.service,
date: form.date,
time: form.time,
@@ -326,6 +341,25 @@ export default function BookingSection() {
</div>
</div>
<div>
<label className="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-gray-600">
Medico richiesto *
</label>
<select
required
value={form.doctor}
onChange={(e) => setForm({ ...form, doctor: e.target.value })}
className="w-full rounded-lg border border-gray-200 bg-white px-3 py-2.5 text-sm transition-all focus:border-transparent focus:outline-none focus:ring-2 focus:ring-[#4ECDC4]"
>
<option value="">Seleziona un medico</option>
{doctors.map((doctor) => (
<option key={doctor} value={doctor}>
{doctor}
</option>
))}
</select>
</div>
<div>
<label className="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-gray-600">
Tipo di visita *