Commit Graph

41 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
7ba2d39ab0 Fix: AuthStore import and component props
- 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.
2025-06-23 21:41:18 +00:00
gpt-engineer-app[bot]
41946a7e9c Fix: Incorrect redirect URL in signup
Ensures the correct `redirectTo` URL is passed to `supabase.auth.signUp()` to generate valid email confirmation links.
2025-06-23 06:08:36 +00:00
gpt-engineer-app[bot]
c2e115412a Refactor: Split EmailConfirmation page
Refactors the EmailConfirmation page into smaller, reusable components to improve maintainability.
2025-06-23 05:45:48 +00:00
gpt-engineer-app[bot]
6809553751 Fix: Redirect to dashboard after login
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.
2025-06-23 03:38:53 +00:00
gpt-engineer-app[bot]
c5dbc236a1 Fix: Onboarding tour and subscription page issues
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.
2025-06-22 01:41:03 +00:00
gpt-engineer-app[bot]
4950dae761 Fix: Enforce profile completion and webhook trigger
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.
2025-06-21 14:25:52 +00:00
gpt-engineer-app[bot]
9427d396b6 Fix Google OAuth redirect in production
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.
2025-06-21 14:19:52 +00:00
gpt-engineer-app[bot]
8afd392018 Fix: Redirect after Google login
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.
2025-06-21 14:13:41 +00:00
gpt-engineer-app[bot]
a0eaf94ed5 Fix: Google login redirect error
Fixes the Google login redirect error by ensuring the correct configuration in Supabase and Google Cloud Console.
2025-06-21 13:36:12 +00:00
gpt-engineer-app[bot]
9ac63c926b Implement authentication flow
Implement mandatory data collection after Google login, including a dedicated page and webhook integration.
2025-06-21 12:30:18 +00:00
gpt-engineer-app[bot]
cf27d1561e Implement authentication improvements.
- Enable email confirmation.
- Implement social login (Google).
- Review brute force protection settings.
2025-06-21 12:19:11 +00:00
gpt-engineer-app[bot]
020ba4d396 Refine user registration flow
- Maintain webhook action with WhatsApp number.
- Redirect to login page after successful registration.
- Display success message on login page.
2025-06-19 21:41:33 +00:00
gpt-engineer-app[bot]
0b9e6ee5df Refactor: Replace n8n API call with webhook
Remove direct n8n API call and implement a webhook POST request to trigger the workflow creation process upon user registration.
2025-06-19 20:57:26 +00:00
gpt-engineer-app[bot]
f719a4cb1e Fix: Ensure n8n workflow creation on signup
Ensured the n8n workflow creation process is correctly triggered after user registration, including correct API request details, dynamic data replacement, and saving workflow information.
2025-06-19 10:01:57 +00:00
gpt-engineer-app[bot]
176fe2c9f9 Fix: Ensure n8n workflow creation on signup
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.
2025-06-19 09:54:50 +00:00
gpt-engineer-app[bot]
e70444f320 Fix: Display WhatsApp groups and implement n8n workflow creation
- 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.
2025-06-18 13:09:40 +00:00
gpt-engineer-app[bot]
10d79f0f4e Fix: Transactions showing incorrect user data
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.
2025-06-15 20:53:10 +00:00
gpt-engineer-app[bot]
9cd928329b Run SQL migration
Apply the reviewed SQL changes to the database.
2025-06-15 20:47:37 +00:00
gpt-engineer-app[bot]
8c3b01e6b6 Apply SQL migration
Apply the SQL migration to the database.
2025-06-15 20:40:16 +00:00
gpt-engineer-app[bot]
0dc7667f05 Fix: App not rendering any pages
The app was not rendering any pages.
2025-06-15 20:35:41 +00:00
gpt-engineer-app[bot]
26cd75ae81 Fix: Handle invalid session on subscription page
The subscription page now correctly handles invalid sessions, even after logging out and back in.
2025-06-15 20:32:43 +00:00
gpt-engineer-app[bot]
354c53212d Refactor: Split RegisterForm.tsx into smaller components
Refactor RegisterForm.tsx into smaller, reusable components to improve code organization and maintainability.
2025-05-24 13:07:24 +00:00
gpt-engineer-app[bot]
bd322c9f45 Fix: Resolve TypeScript error in RegisterForm
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.
2025-05-24 12:15:00 +00:00
gpt-engineer-app[bot]
13db2b6b01 Run SQL to add remote_jid column
The SQL commands to add the `remote_jid` column to the `usuarios` table have been approved and should be executed.
2025-05-23 16:41:37 +00:00
gpt-engineer-app[bot]
47ce122c02 Fix: TypeScript error in RegisterForm.tsx
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.
2025-05-23 16:40:11 +00:00
gpt-engineer-app[bot]
d304d5c9c6 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.
2025-05-23 16:15:10 +00:00
gpt-engineer-app[bot]
e75d0058d6 Run SQL to add WhatsApp column
Adds the WhatsApp column to the usuarios table in the Supabase database.
2025-05-23 16:11:31 +00:00
gpt-engineer-app[bot]
af6bfe3177 Fix: Redirect to dashboard after login
The app was incorrectly redirecting to a 404 page after login. This commit fixes the redirect to the dashboard after a successful login.
2025-05-22 22:00:44 +00:00
gpt-engineer-app[bot]
006c2dacc4 Add WhatsApp number to registration
Adds a WhatsApp number field to the registration form and includes it in the data sent to the webhook.
2025-05-22 12:30:35 +00:00
gpt-engineer-app[bot]
74ec708d37 Refactor: Split Auth.tsx into smaller components
Refactor src/pages/Auth.tsx into smaller, more manageable components to improve readability and maintainability.
2025-05-21 19:54:31 +00:00
gpt-engineer-app[bot]
63fd48a4a9 Fix: History replaceState overuse
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()`.
2025-05-21 18:30:26 +00:00
gpt-engineer-app[bot]
66e18c3988 Fix: Resolve React error #301
The error is a minified React error, likely caused by a problem with the component's rendering. The error occurs on the /whatsapp route.
2025-05-20 17:30:32 +00:00
gpt-engineer-app[bot]
57d71c73af Fix: Remove unnecessary login message
The login message was appearing even when the user was logged in. The request on app load is only to fetch existing instances.
2025-05-20 17:07:26 +00:00
gpt-engineer-app[bot]
96426e8d8d Fix: Sidebar and page visibility issues
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.
2025-05-19 23:12:25 +00:00
gpt-engineer-app[bot]
f3b00231de Fix: Authentication issues
Fixes login and password entry issues.
2025-05-19 12:59:29 +00:00
gpt-engineer-app[bot]
75e54b23c2 Fix: Dashboard navigation redirects to login
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.
2025-05-19 01:35:22 +00:00
gpt-engineer-app[bot]
746083c7ed Disable RLS to resolve errors
The user requested to disable Row Level Security (RLS) to address persistent authorization errors.
2025-05-19 01:30:03 +00:00
gpt-engineer-app[bot]
9116d7a5be Fix: Supabase row-level security error
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.
2025-05-19 01:24:46 +00:00
gpt-engineer-app[bot]
c5d3e51a34 Fix: Authentication error on transaction save
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.
2025-05-18 13:25:43 +00:00
gpt-engineer-app[bot]
3028d8629d Fix: Redirect to login on dashboard navigation
The user is redirected to the login screen when navigating to the dashboard after logging in. This commit addresses the issue.
2025-05-18 13:15:39 +00:00
gpt-engineer-app[bot]
c05ba05353 Run SQL to create user and transaction tables. 2025-05-18 13:06:18 +00:00