diff --git a/src/app/[slug]/agendar/page.tsx b/src/app/[slug]/agendar/page.tsx index 2024a1c..c747fc9 100644 --- a/src/app/[slug]/agendar/page.tsx +++ b/src/app/[slug]/agendar/page.tsx @@ -127,7 +127,19 @@ export default function PublicBookingPage({ params }: { params: Promise<{ slug: return false; }; + const [showPhoneModal, setShowPhoneModal] = useState(false); + const handleBook = async () => { + if (!clientName.trim()) { + showToast('Por favor, informe o seu nome completo.', 'warning'); + return; + } + if (!clientPhone.trim()) { + showToast('É necessário informar o seu telefone para confirmar o agendamento!', 'error'); + setShowPhoneModal(true); + return; + } + const [startHour, startMin] = selectedTime ? selectedTime.split(':').map(Number) : [9, 0]; try { @@ -432,14 +444,57 @@ export default function PublicBookingPage({ params }: { params: Promise<{ slug: Próximo ) : ( - )} + {/* MODAL POP-UP TELEFONE OBRIGATÓRIO */} + {showPhoneModal && ( +
setShowPhoneModal(false)}> +
e.stopPropagation()} style={{ maxWidth: '420px', textAlign: 'center' }}> +
+
+ +
+
+
+

Telefone / WhatsApp Obrigatório 📱

+

+ Por favor, informe o seu número de telefone ou WhatsApp para confirmarmos e enviarmos a nota do seu agendamento. +

+
+ + setClientPhone(e.target.value)} + /> +
+ +
+
+
+ )} + {/* FOOTER */}