Commit Graph

145 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
61e154ed02 Fix: Improve WhatsApp instance and group creation logic
Analyze and fix the logic for WhatsApp instance and group creation, ensuring correct instance detection based on user email and status. Also, check for any exposed API keys or sensitive information.
2025-06-21 15:18:42 +00:00
gpt-engineer-app[bot]
c06f108d6e Refactor: Split CreateGroupForm.tsx
Refactors CreateGroupForm.tsx into smaller, more manageable components and hooks to improve code organization and readability. This includes creating new files for specific functionalities and logic, enhancing maintainability.
2025-06-21 14:50:28 +00:00
gpt-engineer-app[bot]
630b535bf4 Refactor: Split CreateInstanceForm.tsx into smaller components
This commit refactors the CreateInstanceForm.tsx component into smaller, more manageable files to improve code organization and maintainability. This includes splitting the form into logical sub-components and potentially moving related hooks or utilities into separate files. Unused imports and files are also removed.
2025-06-21 14:48:47 +00:00
gpt-engineer-app[bot]
9a3e2ac4fb Fix: Incorrect instance detection
The previous fix for instance detection was not fully effective. This commit further refines the logic in `src/components/whatsapp/CreateInstanceForm.tsx` and `src/components/whatsappGroups/CreateGroupForm.tsx` to ensure that the app correctly identifies existing WhatsApp instances and prevents the creation of duplicate instances or groups.
2025-06-21 14:44:28 +00:00
gpt-engineer-app[bot]
be3ceeaeb2 Fix WhatsApp group creation logic
The logic for enabling WhatsApp group creation was not correctly recognizing when a WhatsApp instance was created, allowing users to attempt to create multiple instances. This commit addresses the issue.
2025-06-21 14:38:27 +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]
e31d990b1b Fix: Resolve localStorage import error
The error `Uncaught SyntaxError: The requested module '/src/services/whatsApp/localStorage.ts' does not provide an export named 'loadInstancesFromLocalStorage'` indicates an incorrect import. This commit corrects the import in `src/hooks/whatsApp/useInstanceState.ts` to use the correct export name, which is `loadInstancesFromStorage`. Also fixes the build errors in `src/components/whatsapp/CreateInstanceForm.tsx` and `src/hooks/whatsApp/useInstanceState.ts`.
2025-06-21 12:09:35 +00:00
gpt-engineer-app[bot]
3877be5376 Fix: Resolve conflicting star exports
Resolve the `SyntaxError: conflicting star exports` in `src/services/whatsAppInstance/index.ts` by adjusting the export structure. This involves refactoring the exports to avoid conflicts with `updateUserWhatsAppInstance`.
2025-06-20 16:58:27 +00:00
gpt-engineer-app[bot]
4f905ca65f feat: Improve WhatsApp number input field
- Added fixed country code (+55)
- Separated DDD and phone number fields
- Added placeholder for DDD and phone number
- Added helper text
2025-06-20 16:56:01 +00:00
gpt-engineer-app[bot]
e47501cfa1 Reverted to commit aeb9fa261d 2025-06-20 16:50:23 +00:00
gpt-engineer-app[bot]
364304ef6c Fix: Correct updateUserWhatsAppInstance call
Corrected the `updateUserWhatsAppInstance` call in `src/components/whatsapp/CreateInstanceForm.tsx` to match the expected argument count.
2025-06-20 16:49:14 +00:00
gpt-engineer-app[bot]
3e3b931ca7 Fix CreateInstanceForm and userOperations errors
Fixed type errors in CreateInstanceForm.tsx and userOperations.ts related to argument counts, property definitions, and Supabase update calls. Corrected the WhatsAppInstance type definition and ensured correct data passing to Supabase.
2025-06-20 16:47:37 +00:00
gpt-engineer-app[bot]
7bf6cdd8ce Fix: Resolve conflicting star exports in WhatsApp instance service
The error "conflicting star exports for name 'updateUserWhatsAppInstance'" indicates a naming conflict when re-exporting modules. This commit resolves the issue by explicitly re-exporting the conflicting functions in `src/services/whatsAppInstance/index.ts` to avoid the conflict.
2025-06-20 16:45:49 +00:00
gpt-engineer-app[bot]
27cad3b98b Fix n8n workflow activation and trigger.
Adjusted the n8n workflow activation request and moved the trigger to group creation. Implemented email standardization to lowercase and WhatsApp number field improvements. Edited `src/services/whatsAppInstance/workflowOperations.ts`, `src/components/whatsapp/CreateInstanceForm.tsx`, and `src/services/n8nWorkflowService.ts`.
2025-06-20 16:43:41 +00:00
gpt-engineer-app[bot]
ec390787c6 Implement WhatsApp connection flow
- Updated database on instance creation.
- Added n8n workflow activation.
- Filtered instance display by user email.
2025-06-19 22:28:40 +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]
a930b755eb Add webhook creation on WhatsApp connect
Implement POST request to Evolution API to create a webhook after successful WhatsApp QR code connection, including correct endpoint, headers, and body formatting. Log request status.
2025-06-19 09:48:06 +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]
7970b1b99f feat: Use user-provided group name and display created groups
- Modified the WhatsApp group creation to use the user-entered group name instead of the default.
- Implemented the display of created group cards in the "Seus grupos cadastrados" section, including a delete option.
2025-06-16 21:05:35 +00:00
gpt-engineer-app[bot]
7f202972b2 feat: Implement WhatsApp group creation and instance management
- Implemented POST request to Evolution API for WhatsApp group creation on "Cadastrar Grupo" button click.
- Added "Desconectar Instância" button with disconnection logic and Supabase update.
- Hid debug information in the "Grupos" menu.
- Changed app name to "Finance Home".
- Added hover color to sidebar menu items.
2025-06-16 20:36:23 +00:00
gpt-engineer-app[bot]
f4f614e86b Refactor: Improve dashboard chart layout and design
Stacked charts and improved styling for a modern look.
2025-06-15 22:00:39 +00:00
gpt-engineer-app[bot]
528714622a Implement trial period and access restrictions
Implement a 30-day trial period for new users. After the trial, restrict the ability to add new transactions if no payment is detected. Use `usuarios.created_at` for the registration date and consider a payment active if a record exists in `pagamentos_mercadopago` with status "approved".
2025-06-15 21:43:16 +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]
ea1d873675 Feat: Implement settings sub-menus
Implement the settings sub-menus ("Visão Geral", "Meu cadastro", "Assinatura") and the "Meu cadastro" form, using the provided print as a reference. Fetch user data from the database to pre-fill the form and create a new table for user profile data.
2025-06-15 19:17:00 +00:00
gpt-engineer-app[bot]
424b86811f feat: Add settings menu to sidebar
Adds a settings menu item to the sidebar.
2025-06-15 17:25:05 +00:00
gpt-engineer-app[bot]
2c59420776 Fix: Resolve missing export error in CreateGroupFormSimple
The error "Module '"@/services/n8nWorkflowService"' has no exported member 'createN8nWorkflow'" indicates that the `createN8nWorkflow` function is not being correctly exported from the `n8nWorkflowService.ts` file. This commit will address this by ensuring the function is exported correctly.
2025-06-12 22:56:52 +00:00
gpt-engineer-app[bot]
fd86aabf32 Refactor: Improve WhatsApp groups UI
Hide debug information and focus on essential data in the WhatsApp groups screen.
2025-06-12 22:55:10 +00:00
gpt-engineer-app[bot]
47e003213d Run SQL to create credit card tables. 2025-06-11 00:33:12 +00:00
gpt-engineer-app[bot]
cb3f41b8ff Fix Select.Item value error
The AI will address the "A <Select.Item /> must have a value prop that is not an empty string" error. It will review the code, particularly the `Select.Item` components, to ensure that the `value` prop is always populated with a non-empty string.
2025-06-06 18:56:29 +00:00
gpt-engineer-app[bot]
bfdd935853 Fix: Resolve "Nova Despesa" button issue
The AI will address the issue where the "Nova Despesa" button causes problems, specifically for the user "leopootz10@gmail.com". The changes will focus on the `TransactionForm.tsx`, `useTransactionForm.ts`, and `TransactionDialogs.tsx` files.
2025-06-06 18:50:28 +00:00
gpt-engineer-app[bot]
c25272b68f Fix: Nova Despesa button issue for specific user
The AI will investigate and resolve a bug that occurs when the "Nova Despesa" button is clicked by the user leopootz10@gmail.com.
2025-06-06 18:48:39 +00:00
gpt-engineer-app[bot]
3cc9ca31c8 Fix: Bug when creating new expense
The AI will investigate and fix a bug that occurs when the "Nova Despesa" button is pressed in production.
2025-06-06 18:44:28 +00:00
gpt-engineer-app[bot]
e1087e22c6 Fix: Improve monthly chart readability
The AI improved the monthly chart to prevent overlapping labels. It adjusted the display of revenue and expense values for better clarity.
2025-06-03 22:39:12 +00:00
gpt-engineer-app[bot]
cb2d335aab feat: Add month filter to dashboard and transactions
Implement month filtering for the dashboard and transactions pages, allowing users to select a month and view data accordingly.
2025-05-31 18:00:30 +00:00
gpt-engineer-app[bot]
e7b414724b Fix: Debug info not showing correct data
The AI will investigate why the debug information is not reflecting the expected data from the database, potentially due to incorrect database connection or data retrieval issues.
2025-05-24 14:44:09 +00:00
gpt-engineer-app[bot]
ea7398237e Fix: Resolve 'instanceData' not found error
The code was throwing a "Cannot find name 'instanceData'" error in `CreateGroupForm.tsx`. This commit resolves the error by ensuring that the `instanceData` variable is correctly defined and accessible within the component's scope.
2025-05-24 14:37:32 +00:00
gpt-engineer-app[bot]
497c27c7f1 Fix: Enable group creation button
The group creation button should be enabled when the user has a connected WhatsApp instance. The code was updated to check if the user's instance is connected.
2025-05-24 14:36:08 +00:00
gpt-engineer-app[bot]
7ea5009fbd Fix: Enable "Cadastrar Grupo" button logic
The "Cadastrar Grupo" button should be enabled when the user's WhatsApp instance name is filled in the "usuarios" table and the status is "connected". This commit implements this logic.
2025-05-24 14:31:23 +00:00