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 [nome, setNome] = useState('');
const [empresa, setEmpresa] = useState(''); const [empresa, setEmpresa] = useState('');
const [email, setEmail] = useState(''); const [email, setEmail] = useState('');
const [whatsapp, setWhatsapp] = useState('');
const [senha, setSenha] = useState(''); const [senha, setSenha] = useState('');
const [confirmaSenha, setConfirmaSenha] = useState(''); const [confirmaSenha, setConfirmaSenha] = useState('');
@ -65,6 +66,7 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
nome, nome,
empresa, empresa,
email, email,
whatsapp,
data_cadastro: new Date().toISOString(), data_cadastro: new Date().toISOString(),
origem: window.location.origin, origem: window.location.origin,
}; };
@ -139,6 +141,16 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
required required
/> />
</div> </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"> <div className="space-y-2">
<Input <Input
id="senha" id="senha"

View File

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