From d304d5c9c6176388bb2b7072cf8d102d39348394 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 16:15:10 +0000 Subject: [PATCH] Fix: Add WhatsApp to registration form type The `RegisterForm.tsx` component was updated to include a WhatsApp field. The TypeScript error was resolved by adding the `whatsapp` property to the type definition used for the registration form data. This ensures that the object literal used to pass data to the `supabase.rpc('registrar_usuario')` function includes the `whatsapp` field, resolving the type error. --- src/components/auth/RegisterForm.tsx | 8 +++++ .../update-register-function-sql/index.ts | 1 + .../update-register-function/index.ts | 29 +++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/components/auth/RegisterForm.tsx b/src/components/auth/RegisterForm.tsx index dd1a7da..a3191bf 100644 --- a/src/components/auth/RegisterForm.tsx +++ b/src/components/auth/RegisterForm.tsx @@ -6,6 +6,8 @@ import { Input } from "@/components/ui/input"; import { useToast } from "@/components/ui/use-toast"; import { supabase } from "@/integrations/supabase/client"; import { enviarDadosParaWebhook } from '@/utils/webhookService'; +import { Label } from '@/components/ui/label'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; interface RegisterFormProps { isLoading: boolean; @@ -114,6 +116,7 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => { return (