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:
parent
6750ecd20e
commit
006c2dacc4
@ -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"
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user