- Corrected import of `useAuthStore` in `src/App.tsx`, `src/components/avisos/ContaRecorrenteForm.tsx`, and `src/components/avisos/ContasRecorrentesList.tsx`.
- Added `children` prop to `ProtectedRoute` and `Layout` components in `src/App.tsx`.
- Fixed type error in `src/components/layout/Layout.tsx` related to `Sidebar` props.
Adjusted the login flow to redirect users to the dashboard upon successful authentication, instead of the landing page. This ensures users are directed to the application's core functionality after logging in.
The AI addressed the 404 error on the subscription page and investigated the onboarding tour not starting after login when no groups are registered. It also reviewed the code for potential errors in the tour logic.
The user reported that the app allows navigation without completing the profile (Name, WhatsApp) after Google login, and the N8N webhook is not triggered. This commit addresses these issues by ensuring the `/complete-profile` page is shown until the required data is provided, and the `sendNewUserWebhook` is called after successful profile completion.
The Google OAuth redirect was failing in production due to `window.location.origin` resolving to `localhost:3000`. This commit fixes the redirect logic in `src/components/auth/SocialLoginButtons.tsx` and updates the `public.handle_new_user()` function via a SQL migration (`supabase/migrations/20250621141237-fix-google-user-data.sql`) to capture the user's name from Google metadata.
The user is redirected to a "page not accessible" error after Google login in production. The email is saved in Supabase, but name and WhatsApp are missing. The app should redirect to the profile completion page to collect the missing data.
Ensured the n8n workflow creation process is correctly triggered after user registration, including correct API request details, dynamic data replacement, and saving workflow information.
The n8n workflow creation was not triggered after user registration. This commit ensures the POST request to the n8n API is correctly configured to execute after a new user signs up.
- Fixed the display of WhatsApp group cards.
- Implemented the creation of an n8n workflow upon user registration, including API action setup, dynamic data modification, and post-request actions to store workflow ID and webhook URL.
- Instructions provided for the user to paste the JSON body.
The transactions were showing data from the wrong user. The `getTransacoes` function in `src/services/transacaoFetchService.ts` was updated to filter transactions by the logged-in user's email, matching the `login` column in the `transacoes` table.
The commit addresses a TypeScript error in `RegisterForm.tsx` related to the `whatsapp` field. The error message "Object literal may only specify known properties, and 'whatsapp' does not exist in type" indicates that the `whatsapp` field is not correctly recognized within the object being used.
The TypeScript error in `RegisterForm.tsx` is caused by the `whatsapp` field not being included in the type definition. This commit will address the error by updating the type definition to include the `whatsapp` field.
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.
The commit addresses a "SecurityError: Attempt to use history.replaceState() more than 100 times per 10 seconds" error, likely caused by excessive calls to `history.replaceState()`.
The user reported that no pages were visible and the menu had disappeared. This commit likely addresses the root cause of these issues, potentially related to layout, routing, or component rendering.
The issue where navigating to the dashboard after logging in redirects to the login screen is addressed. The fix likely involves correcting route handling or authentication checks in `App.tsx` and/or `ProtectedRoute.tsx` to ensure proper navigation to the dashboard.
The AI addressed the Supabase row-level security error by ensuring correct authentication and data insertion in `TransactionForm.tsx`. It also updated `src/services/transacaoService.ts` to check for valid sessions.
The AI addressed an authentication error that occurred when saving new transactions. It updated `TransactionForm.tsx` to correctly retrieve the user ID, get the session, and insert data into the user-specific table, ensuring proper authentication and data insertion according to Supabase's security policies.