Add WhatsApp number to registration

Adds a WhatsApp number field to the registration form and includes it in the data sent to the webhook.
This commit is contained in:
gpt-engineer-app[bot] 2025-05-22 12:30:35 +00:00
parent 6750ecd20e
commit 006c2dacc4
2 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
const [nome, setNome] = useState('');
const [empresa, setEmpresa] = useState('');
const [email, setEmail] = useState('');
const [whatsapp, setWhatsapp] = useState('');
const [senha, setSenha] = useState('');
const [confirmaSenha, setConfirmaSenha] = useState('');
@ -65,6 +66,7 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
nome,
empresa,
email,
whatsapp,
data_cadastro: new Date().toISOString(),
origem: window.location.origin,
};
@ -139,6 +141,16 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
required
/>
</div>
<div className="space-y-2">
<Input
id="whatsapp"
placeholder="WhatsApp (com DDD)"
type="tel"
value={whatsapp}
onChange={(e) => setWhatsapp(e.target.value)}
disabled={isLoading}
/>
</div>
<div className="space-y-2">
<Input
id="senha"

View File

@ -6,6 +6,7 @@ interface UserData {
nome: string;
empresa?: string;
email: string;
whatsapp?: string;
data_cadastro: string;
origem: string;
}