Commit Graph

110 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
1f3197caf5 feat: Move user button and integrate webhook
Move the logged-in user button above the month filter on the dashboard. Integrate a webhook call to send contact form data to a specified URL.
2025-06-23 02:25:49 +00:00
gpt-engineer-app[bot]
1b4a148142 Fix: Dashboard not showing transaction values
The AI fixed the dashboard not displaying transaction values by reviewing the data fetching and display logic. It also addressed the "Assinar Agora" button not working by checking the Mercado Pago integration and subscription page.
2025-06-22 02:14:04 +00:00
gpt-engineer-app[bot]
a9769b76db Fix: Inconsistent WhatsApp instance detection
Unifies instance verification logic using `useExistingInstanceCheck` across components, corrects the Supabase query, and adds re-verification after instance creation to resolve inconsistencies in WhatsApp instance detection and group creation.
2025-06-21 16:19:14 +00:00
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]
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]
8127050bf6 Refactor: Implement security restructuring phase
- Implement proxy for external API calls via Edge Functions.
- Sanitize logging to remove sensitive data.
- Implement input validation.
2025-06-21 12:08:02 +00:00
gpt-engineer-app[bot]
0ab8fa63d1 Fix: Resolve missing exports in whatsAppService
Removed `SERVER_URL` and `API_KEY` imports from `src/services/whatsAppService.ts` as they are no longer exported by `src/services/whatsApp/config.ts` due to the security refactor.
2025-06-21 12:05:20 +00:00
gpt-engineer-app[bot]
0208b13700 Fix: Implement emergency security measures
Implemented Supabase secrets for API keys, created Edge Functions for secure API calls, and removed hardcoded keys from the frontend.
2025-06-21 12:03: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]
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]
aeb9fa261d Fix: Use correct email format in Evolution API webhook
Ensure the Evolution API webhook uses the user's email with the "@" symbol in the URL, instead of replacing it with "_".
2025-06-20 01:26:21 +00:00
gpt-engineer-app[bot]
d14f68d709 Refactor WhatsApp workflow activation to use webhook
Replaced direct n8n API call with a webhook POST request to `/webhook/ativarworkflow` containing the user's email after WhatsApp instance creation.
2025-06-19 23:52:52 +00:00
gpt-engineer-app[bot]
7ed70a35ff Fix: Workflow activation POST request
Ensured the POST request for workflow activation uses the correct URL and headers, dynamically replacing the workflow ID.
2025-06-19 23:12:48 +00:00
gpt-engineer-app[bot]
6d867c3649 Refactor: Split WhatsApp instance service
Refactored `src/services/whatsAppInstanceService.ts` into smaller, more focused files to improve maintainability and readability.  Removed unused imports and files.
2025-06-19 23:07:28 +00:00
gpt-engineer-app[bot]
fdbb42f693 Fix: Update n8n API key
Updated the n8n API key in the `activateUserWorkflow` function within `src/services/whatsAppInstanceService.ts` to the correct value provided by the user.
2025-06-19 23:05:55 +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]
57e016a3fb Fix: WhatsApp group creation API request
Corrected the WhatsApp group creation API request to match the Postman examples and the previously provided instructions. This includes adjusting the URL, headers, and request body to ensure successful group creation.
2025-06-16 20:56:15 +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]
a097f05a74 Fix: Use login column for filtering
The application was still not fetching transactions correctly. The issue was that the filtering logic was using the `email` column instead of the `login` column to match the logged-in user. This commit corrects the filtering to use the `login` column.
2025-06-15 22:29:11 +00:00
gpt-engineer-app[bot]
93c80af9c2 Fix: Use 'login' column for transaction email lookup
The application was incorrectly searching for transactions using the 'email' column instead of the 'login' column. This commit corrects the query to use the 'login' column, which is the correct identifier for the user's email in the 'transacoes' table.
2025-06-15 22:26:39 +00:00
gpt-engineer-app[bot]
0532e16041 Fix: Debug transaction fetching
Added more debug logs to `src/services/transacao/transacaoFetchService.ts` to investigate why transactions are not loading for specific users, including the user's email and `rodrigobm10@gmail.com`.
2025-06-15 22:21:33 +00:00
gpt-engineer-app[bot]
b82aced699 Fix: Verify login in transaction query
Ensured the transaction query uses the 'login' column in the 'transacoes' table to filter transactions based on the logged-in user's email.
2025-06-15 22:17:54 +00:00
gpt-engineer-app[bot]
ba467fd4fe Fix: Transactions not loading for user
The application is not fetching transactions for the user leopootz10@gmail.com.
2025-06-15 22:14:29 +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]
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]
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]
b2cee3d1e5 Fix: Instance data not matching database
The AI investigated the discrepancy between the database and debug information, ensuring the correct database connection and column usage.
2025-05-24 14:21:31 +00:00
gpt-engineer-app[bot]
c004980163 feat: Save WhatsApp instance on creation
- Save the WhatsApp instance name to the 'instancia_zap' column in the 'usuarios' table when a new instance is created.
- Update the instance status based on connection status.
- Prevent the creation of multiple instances per user.
2025-05-24 14:15:57 +00:00
gpt-engineer-app[bot]
ead6400404 Fix: Enable "Cadastrar Grupo" button
The "Cadastrar Grupo" button in the Grupos menu was not enabled after connecting a WhatsApp instance. This commit reviews the logic in `CreateGroupForm.tsx` to ensure the button is correctly enabled when a WhatsApp instance is connected and the user is logged in.
2025-05-24 14:09:31 +00:00
gpt-engineer-app[bot]
417c24089b Run SQL to add WhatsApp columns
Adds `instancia_zap` and `status_instancia` columns to the `usuarios` table.
2025-05-24 14:02:02 +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]
70c125715a Refactor despesasService.ts
Refactor `despesasService.ts` into smaller, modular files to improve code organization and maintainability.
2025-05-21 11:47:11 +00:00
gpt-engineer-app[bot]
e58db1bb1a Fix: Incorrect card total calculation
The card total in `CartaoDetalhes.tsx` was not correctly reflecting the sum of transactions. This commit addresses the issue.
2025-05-21 10:54:12 +00:00
gpt-engineer-app[bot]
049acd069e Refactor: Split transacaoService.ts into smaller files
Refactors transacaoService.ts into smaller, more manageable files to improve code organization and maintainability.
2025-05-21 10:49:36 +00:00
gpt-engineer-app[bot]
1e9117cbd2 Refactor: Use login and nome for expense association
Update the frontend logic to display credit card expenses based on a combination of the 'login' and 'nome' columns, instead of 'cartao_id', for associating expenses with cards and users.
2025-05-21 10:44:46 +00:00
gpt-engineer-app[bot]
5e9b6ca74a Run SQL to add columns
Add `login` and `nome` columns to `despesas_cartao` table.
2025-05-21 09:45:27 +00:00
gpt-engineer-app[bot]
a7506e7070 Fix: Ensure despesas_cartao database connection
Check and resolve issues preventing credit card expense inclusion, verifying the database connection.
2025-05-21 09:25:21 +00:00
gpt-engineer-app[bot]
80835c6ca0 Fix: Include new transactions in Transacoes menu
The changes ensure that credit card expenses, new expenses, and new income are correctly included in the transactions menu.
2025-05-21 01:19:35 +00:00