Commit Graph

302 Commits

Author SHA1 Message Date
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
gpt-engineer-app[bot]
9afd8b4457 Fix: Resolve import error in CreateGroupForm
The CreateGroupForm component was importing a non-existent function `cadastrarGrupoWhatsApp` from `gruposWhatsAppService.ts`. This commit corrects the import to use the available `findOrCreateWhatsAppGroup` function, which is more appropriate for the intended functionality of creating a group.
2025-05-24 14:23:31 +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]
80cd8a1517 Run SQL to update database function
The SQL command to update the `registrar_usuario` function has been reviewed and approved. This commit runs the SQL.
2025-05-24 13:11:05 +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]
9a2f18c74e Add delete meta option to menu
Adds a delete option to the meta menu for deleting registered metas.
2025-05-22 21:54:38 +00:00
gpt-engineer-app[bot]
002836773d Fix: React refresh preamble error
The error "React refresh preamble was not loaded" in `sonner.tsx` suggests a problem with the Vite configuration or React refresh setup. The AI will investigate the Vite configuration (`vite.config.ts`) and the component's import/export structure to ensure proper React refresh functionality.
2025-05-22 14:15:37 +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]
6750ecd20e Update registration webhook URL
Update the webhook URL in `src/utils/webhookService.ts` to the new URL provided by the user.
2025-05-21 19:58:14 +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]
36a045d899 Feat: Send user data to webhook on signup
Implement a webhook call to send user registration data to a specified URL after successful signup.
2025-05-21 18:27:03 +00:00
gpt-engineer-app[bot]
17e570de84 Fix: Resolve module import error
The error "TypeError: Importing a module script failed" suggests an issue with module loading in the frontend. This commit aims to address the error, likely by reviewing and correcting module imports, especially in `src/main.tsx` and `index.html`, to ensure proper module loading and prevent runtime errors.
2025-05-21 17:50:06 +00:00
gpt-engineer-app[bot]
96237c4c37 Fix: Resolve module import errors
The commit fixes module import errors in `DespesaCartaoForm.tsx` and `useDespesaCartaoForm.ts` by ensuring the correct path to `despesasService` is used. This resolves the "cannot find module" errors.
2025-05-21 12:55:13 +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]
e6d6f5c2b3 Refactor: Split TransactionForm into smaller components
Refactors TransactionForm.tsx into smaller, reusable components and a custom hook to improve code organization and maintainability.
2025-05-21 09:54:05 +00:00
gpt-engineer-app[bot]
1cb5be29cc Refactor: Split DespesaCartaoFormSelect.tsx
Split DespesaCartaoFormSelect.tsx into smaller, more manageable components.
2025-05-21 09:50:32 +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
gpt-engineer-app[bot]
1843cd56b2 Fix TypeScript errors in cartao and despesas services
Resolve errors related to missing properties and type inconsistencies in cartoesService.ts, despesasService.ts, and cartaoTypes.ts. Address the infinite type instantiation error.
2025-05-21 01:08:33 +00:00
gpt-engineer-app[bot]
0d7e56b168 Fix TypeScript errors in services 2025-05-21 01:04:01 +00:00
gpt-engineer-app[bot]
1c529d1310 Fix cartao service type errors
Fixes TypeScript errors related to missing properties in `cartoesService.ts` and `despesasService.ts`, specifically addressing issues with `cartao_codigo`, `bandeira`, and `banco` properties. Also addresses the infinite type instantiation error.
2025-05-21 00:59:44 +00:00
gpt-engineer-app[bot]
18e751ca31 feat: Add pagination to DespesasList
Adds pagination to the DespesasList component to improve handling of large expense lists.
2025-05-21 00:57:41 +00:00
gpt-engineer-app[bot]
4798390546 feat: Add pagination to expenses list
Adds pagination to the DespesasList component to improve handling of large expense lists. Uses the Pagination component from ui/pagination.tsx.
2025-05-21 00:56:16 +00:00
gpt-engineer-app[bot]
df6ee93e01 Refactor: Split CartoesCredito.tsx into components
Refactors the CartoesCreditoPage into smaller, reusable components to improve code organization and maintainability.
2025-05-21 00:54:15 +00:00
gpt-engineer-app[bot]
8253e603a6 Refactor: Split cartaoCreditoService.ts into smaller files
Split the cartaoCreditoService.ts file into smaller, more manageable files to improve code organization and maintainability.
2025-05-21 00:51:28 +00:00
gpt-engineer-app[bot]
8b64a56cd5 Fix TypeScript errors in credit card features
The commit addresses multiple TypeScript errors related to the credit card functionality. It corrects an argument count mismatch in `CartaoCreditoForm.tsx`, resolves missing property errors for `cartao_codigo` in `cartaoCreditoService.ts`, and fixes type instantiation issues.
2025-05-21 00:48:59 +00:00
gpt-engineer-app[bot]
586f831b30 Fix: Resolve TypeScript errors in credit card features
This commit addresses multiple TypeScript errors related to the credit card features. It fixes an argument count mismatch in `DespesaCartaoForm.tsx`, type mismatches in `cartaoCreditoService.ts` related to missing `cartao_codigo` properties, and excessively deep type instantiations. These changes ensure the correct data types are used throughout the application, resolving the build errors and improving code stability.
2025-05-21 00:34:28 +00:00
gpt-engineer-app[bot]
0d58128969 Implement credit card and expense features.
Add credit card registration form with required fields and auto-generated code. Implement expense registration form with card selection and required fields. Establish association logic between expenses and cards based on user and card codes. Ensure data privacy and validation.
2025-05-21 00:21:30 +00:00
gpt-engineer-app[bot]
04ed74ac61 Fix: WhatsApp instance refresh and expense summary
- Fixed an issue where the "Atualizar Lista" button in the WhatsApp connect menu was not correctly displaying created instances.
- Implemented the display of credit card expenses in the transaction and dashboard summaries. The summaries now include the total expenses for each credit card, aggregated with other transaction expenses.
2025-05-20 23:26:56 +00:00
gpt-engineer-app[bot]
afb53c1429 Refactor: Split Transacoes.tsx into smaller components
Refactored the `TransacoesPage` component into smaller, more manageable components to improve code organization and readability. This includes extracting the table, form, and dialog related logic into separate files. Unused imports and files were also removed.
2025-05-20 23:11:39 +00:00
gpt-engineer-app[bot]
9d02a2203d feat: Add credit card expense to transactions
Adds the functionality to include credit card expenses within the transactions menu, mirroring the existing "Nova Despesa" button functionality. This allows users to select a credit card when adding a new expense.
2025-05-20 20:26:48 +00:00
gpt-engineer-app[bot]
34968ee74a Fix: Select.Item value prop error
The Select.Item component requires a non-empty string value prop. This commit addresses the error by ensuring that the value prop is not an empty string.
2025-05-20 20:22:16 +00:00
gpt-engineer-app[bot]
1c78451e07 Fix: TransactionForm prop type and service errors
Fixes the type error in `Transacoes.tsx` by ensuring the `TransactionForm` component receives the correct props, specifically addressing the missing `transaction` prop. Also resolves the type errors in `transacaoService.ts` related to incorrect argument types for number parameters.
2025-05-20 20:17:38 +00:00
gpt-engineer-app[bot]
6d6734c17d Refactor: Split GruposWhatsApp.tsx into smaller components
Split the large GruposWhatsApp.tsx file into smaller, more manageable components to improve readability and maintainability. This refactoring aims to improve code organization without altering existing functionality.
2025-05-20 20:15:21 +00:00
gpt-engineer-app[bot]
c5f3a3d161 Feat: Add group name input and transaction actions
- Added an input field in the GruposWhatsApp menu for users to name their WhatsApp groups, and store the name in the database.
- Added delete and edit buttons to the transactions table, with database integration.
2025-05-20 20:13:08 +00:00
gpt-engineer-app[bot]
a12e1411ef Fix: Restore WhatsApp menu and fix groups menu
Reverts the WhatsApp menu item name change and addresses the non-functional groups menu.
2025-05-20 20:05:31 +00:00
gpt-engineer-app[bot]
ecaa65fdf5 Fix: Sidebar overlapping content
Adjust the sidebar's positioning to prevent it from overlapping content on the screen.
2025-05-20 20:02:46 +00:00
gpt-engineer-app[bot]
ff772429f7 Fix: Resolve import error in App.tsx
Fixes an import error in `App.tsx` related to the `authStore`.  The error message "Failed to resolve import "./stores/authStore" from "src/App.tsx". Does the file exist?" indicates that the specified module could not be found.  This commit addresses the issue by ensuring the correct import path or by creating the missing file.
2025-05-20 20:00:20 +00:00
gpt-engineer-app[bot]
ea18d3488d Run SQL for credit card and expenses
This commit executes the provided SQL script to create tables for credit cards and their associated expenses in the Supabase database.
2025-05-20 19:57:53 +00:00
gpt-engineer-app[bot]
c461f132fb Fix: Check QR code generation
Investigate and address potential issues with QR code generation for WhatsApp connections.
2025-05-20 19:49:35 +00:00
gpt-engineer-app[bot]
03bb67872a Revert instance creation changes
Reverts changes to the instance creation form and related hooks, restoring the functionality to create and connect instances as it was before the recent changes.
2025-05-20 19:37:49 +00:00
gpt-engineer-app[bot]
a9ee70ccb6 feat: Implement "Atualizar Lista" button
The "Connect WhatsApp" menu now loads instances only on clicking the "Atualizar Lista" button. The button fetches instances from the API, filters by the user's instance name, and displays the results. It also shows an appropriate message if no instances are found and addresses potential rendering errors.
2025-05-20 19:26:10 +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]
4da7b28d1a Refactor: Split InstanceCard into smaller components
Refactors the InstanceCard component into smaller, more manageable components to improve code organization and readability. This includes extracting parts of the UI and logic into separate components.
2025-05-20 17:03:04 +00:00
gpt-engineer-app[bot]
d9a804c36a Refactor: Break down WhatsApp.tsx into smaller components
Refactors WhatsApp.tsx into smaller, more manageable components and hooks to improve readability and maintainability. This reduces the overall complexity of the file.
2025-05-20 17:01:02 +00:00
gpt-engineer-app[bot]
62e2acbf4e Fix: WhatsApp instance search trigger
The instance search was incorrectly triggered on every keystroke in the instance name input field. The fix ensures that the search uses the saved instance name from local storage, and is only triggered when the "Conectar WhatsApp" menu is opened. The instance name input field is now only used for creating new instances.
2025-05-20 16:57:16 +00:00
gpt-engineer-app[bot]
12e6cda1df Feat: Fetch WhatsApp instance on mount
Adds functionality to fetch a WhatsApp instance from the Evolution API when the "Conectar WhatsApp" menu is accessed. The request uses the instance name entered in the form, includes the necessary headers, and displays the instance information. It also handles cases where the user is not logged in and when the instance is not found.
2025-05-20 16:01:08 +00:00
gpt-engineer-app[bot]
002103e676 Refactor: Improve chart visuals
Improve the visual appearance of the pie chart and the "Receitas vs Despesas" chart, aiming for a more modern look, without affecting other functionalities.
2025-05-20 14:35:43 +00:00
gpt-engineer-app[bot]
67c4d2e318 Refactor: Use Supabase Edge Function for workflow creation
Implement workflow creation using a Supabase Edge Function, addressing CORS issues and enhancing security. The frontend now calls the Edge Function, which handles the n8n API interaction and Supabase updates.
2025-05-20 11:40:32 +00:00
gpt-engineer-app[bot]
9d35dfb518 Fix: Prevent modification of package.json
The AI was attempting to modify the `package.json` file, which is not allowed. This commit removes any changes that would have affected this file.
2025-05-20 11:12:52 +00:00
gpt-engineer-app[bot]
12c178aeb7 Fix: Supabase client access in n8nWorkflowService
The commit addresses two TypeScript errors in `n8nWorkflowService.ts`. The first error, TS2445, arises from attempting to access the protected `supabaseUrl` property directly. The second error, TS2339, occurs because the `session` property is not directly available on the `SupabaseAuthClient`. The fix involves adjusting how the Supabase client and its properties are accessed to align with the Supabase library's intended usage.
2025-05-20 10:56:58 +00:00
gpt-engineer-app[bot]
8ec8b4a5c6 Refactor: Move n8n workflow creation to backend
The frontend now calls a backend endpoint to create n8n workflows, addressing CORS issues. The backend handles the n8n API request, updates Supabase, and returns the result to the frontend.
2025-05-20 10:54:37 +00:00
gpt-engineer-app[bot]
71d2ef79c0 Refactor: Split WhatsApp group service
Split `gruposWhatsAppService.ts` into smaller, more maintainable service files: `n8nWorkflowService.ts` and `whatsAppGroupsService.ts`. This improves code organization and readability.
2025-05-20 10:44:22 +00:00
gpt-engineer-app[bot]
e0f6bc4b86 Fix: Cadastrar Grupo button failing quickly
The "Cadastrar Grupo" button now fails immediately. The priority is to ensure the n8n workflow creation request succeeds. This commit reviews the button's context and related code to address the issue.
2025-05-20 10:37:55 +00:00
gpt-engineer-app[bot]
7736ab1452 Fix: Log n8n API HTTP status code
Log the HTTP status code returned by the n8n API to help debug the "Cadastrar Grupo" button errors.
2025-05-20 10:33:25 +00:00
gpt-engineer-app[bot]
84b22ae8bd Fix: Ensure n8n workflow creation
The code was updated to create the n8n workflow when the "Cadastrar Grupo" button is pressed. It now makes a POST request to the n8n API with the user's email in the request body.
2025-05-20 10:28:24 +00:00
gpt-engineer-app[bot]
9d6319c1b3 Fix: Determine error stage for "Cadastrar Grupo"
The user reported an error when clicking the "Cadastrar Grupo" button. This commit aims to identify the specific stage where the error occurs to facilitate debugging.
2025-05-20 10:25:14 +00:00
gpt-engineer-app[bot]
e5dbce2562 Fix: Resolve group registration error
Investigate and fix the "Não foi possível registrar o grupo" error, likely related to n8n workflow creation. Check API key and other potential causes.
2025-05-20 10:19:49 +00:00
gpt-engineer-app[bot]
aae413643d Fix: Implement group creation workflow
The "Cadastrar Grupo" button now creates a group in Supabase and attempts to create an empty workflow in n8n. If the workflow creation is successful, the workflow ID is saved. If it fails, the group is still created, but a specific error message is displayed.
2025-05-20 10:13:27 +00:00
gpt-engineer-app[bot]
edccfbde36 feat: Create n8n workflow on group registration
Implement n8n API call to create an empty workflow when a new WhatsApp group is registered. Save the returned workflow ID to the Supabase record upon successful creation. Display success message to the user.
2025-05-20 10:01:01 +00:00
gpt-engineer-app[bot]
4f84ab9a9f Add workflow integration for WhatsApp groups
Integrate n8n workflow cloning upon WhatsApp group registration.  Adds a `workflow_id` column to the `grupos_whatsapp` table and updates the `cadastrarGrupoWhatsApp` function to call the n8n webhook, capturing the returned workflow ID and saving it to the database.  The button "Cadastrar Grupo" is only visible when the user is logged in.
2025-05-20 02:24:58 +00:00
gpt-engineer-app[bot]
9331f37ec5 Fix: gruposWhatsAppService.ts insert error
The `cadastrarGrupoWhatsApp` function in `gruposWhatsAppService.ts` was updated to include the `remote_jid` field when inserting a new group into the `grupos_whatsapp` table. This resolves the TypeScript error related to missing properties in the insert call.
2025-05-20 01:10:04 +00:00
gpt-engineer-app[bot]
6a38fd0bf1 Refactor: Use email (login) for user identification
Update the system to use the user's email (login) as the primary identifier for linking users, WhatsApp groups, and transactions. This includes changes to the `grupos_whatsapp` and `transacoes` tables, as well as adjustments to queries and data retrieval logic. The `user_id` field is maintained for compatibility.
2025-05-20 01:08:48 +00:00
gpt-engineer-app[bot]
8435c03464 Run SQL to add WhatsApp group features. 2025-05-20 00:59:19 +00:00
gpt-engineer-app[bot]
5a16246b23 Apply Supabase schema changes
Apply the SQL schema changes to Supabase, including the creation of the `grupos_whatsapp` table and the addition of the `grupo_id` column to the `transacoes` table.
2025-05-20 00:04:49 +00:00
gpt-engineer-app[bot]
908904f9b9 Refactor: Split useWhatsAppInstances hook
Split the `useWhatsAppInstances.ts` hook into smaller, more manageable files to improve code organization and readability.
2025-05-19 23:59:46 +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]
fa5ff08d71 Fix: Resolve infinite re-render loop
The AI identified and fixed an infinite re-render loop in `useWhatsAppInstances.ts` and `WhatsApp.tsx` by adding state checks, delays, and improving useEffect dependencies.
2025-05-19 23:10:31 +00:00
gpt-engineer-app[bot]
9cd9dcca3a Fix: Resolve React rendering errors
The AI will address two runtime errors: a minified React error (likely related to incorrect component usage or props) and a "too many re-renders" error (indicating an infinite loop). The AI will analyze the code, particularly the `WhatsApp` component and its related hooks and components, to identify and fix the root causes of these errors.
2025-05-19 23:09:26 +00:00
gpt-engineer-app[bot]
f476c1422b Fix: Access instance property in instanceManagement
The code was updated to correctly access the 'instance' property, resolving a TypeScript error.
2025-05-19 23:07:16 +00:00
gpt-engineer-app[bot]
2eba5aa7b1 Refactor: Split WhatsApp service into modules
Split `whatsAppService.ts` into smaller files for API calls, local storage, and types to improve maintainability.
2025-05-19 23:05:13 +00:00
gpt-engineer-app[bot]
90b3030ebb Reverted to commit b8d0db98bb 2025-05-19 18:42:59 +00:00
gpt-engineer-app[bot]
ba5d3c92a3 Refactor: Split useWhatsAppActions into smaller files
Refactor useWhatsAppActions.ts into smaller, more manageable files.
2025-05-19 18:41:01 +00:00
gpt-engineer-app[bot]
88150d84e4 Refactor: Split useWhatsAppInstances hook
Split the large useWhatsAppInstances hook into smaller, more manageable files to improve code organization and readability.
2025-05-19 18:39:02 +00:00
gpt-engineer-app[bot]
8922c07e41 Fix: Incorrect type for onViewQrCode prop
The `onViewQrCode` prop in `InstanceList` was expecting a function with two arguments, but the `handleViewQrCode` function only provided one. This commit fixes the type mismatch.
2025-05-19 18:32:11 +00:00
gpt-engineer-app[bot]
b06373115b Fix: Resolve import error in Sidebar.tsx
The commit fixes an import error in `Sidebar.tsx` related to the `@/config/site` module. The error message indicates that the module cannot be resolved. The fix likely involves ensuring the correct path to the module or creating the missing file.
2025-05-19 18:30:40 +00:00
gpt-engineer-app[bot]
119a8af96a Run SQL migration
Apply the provided SQL to create the `rodrigo_audio_messages` table.
2025-05-19 18:29:45 +00:00
gpt-engineer-app[bot]
e208e7e373 Fix: Resolve import path error
The commit addresses a "Failed to resolve import" error in `src/pages/WhatsApp.tsx`. The error message indicates that the module `@/components/whatsapp` could not be found. This likely means the import path is incorrect, or the file does not exist at the specified location.
2025-05-19 18:24:30 +00:00
gpt-engineer-app[bot]
6100374e56 Add user filtering to database queries
Implement user-based filtering in database queries to retrieve data associated with specific users. Determine the users registered today.
2025-05-19 18:22:18 +00:00
gpt-engineer-app[bot]
b8d0db98bb Fix: Type mismatch in useWhatsAppInstances
The commit fixes a TypeScript error in `useWhatsAppInstances.ts` where the `setInstances` function was receiving an array with incorrect types. The error occurred because the `connectionState` property was sometimes a string instead of the expected union type. The fix ensures that the `connectionState` is always of the correct type.
2025-05-19 18:10:59 +00:00
gpt-engineer-app[bot]
dec494083c Fix: Address instance deletion, disappearing instances, and update errors
- Fixed instance deletion failures.
- Resolved the issue of instances appearing and disappearing in a loop.
- Addressed errors during instance updates.
- Check for missing information.
2025-05-19 18:07:25 +00:00
gpt-engineer-app[bot]
f26e41707a Fix: Instance cards not rendering
The commit addresses the issue where instance cards were not appearing after creation. It revisits the `WhatsApp.tsx` file and related components to ensure instances are correctly added to the state and displayed.
2025-05-19 15:16:50 +00:00
gpt-engineer-app[bot]
66a2cc47a8 Refactor: Extract WhatsApp logic into hooks and components
Refactor WhatsApp.tsx to use custom hooks and smaller components, preserving all existing functionality.
2025-05-19 15:09:59 +00:00
gpt-engineer-app[bot]
b0d6e88a76 Add advanced instance management features
Implement instance listing, restart, disconnect, delete, and presence setting functionalities with confirmation dialogs and UI updates.
2025-05-19 15:07:24 +00:00
gpt-engineer-app[bot]
686b682c19 Fix: Instance card not appearing
The fix ensures instance cards are displayed after creation.
2025-05-19 15:01:37 +00:00
gpt-engineer-app[bot]
926d3a37ef Refactor: Split WhatsApp.tsx into smaller components
This commit refactors the `WhatsApp.tsx` file into smaller, more manageable components. The form, instance list, QR code dialog, and API functions are separated into their own files to improve code organization and maintainability. No functionality changes were made.
2025-05-19 14:57:22 +00:00
gpt-engineer-app[bot]
f25b820437 Fix: Instance card not updating after creation
The fix ensures that when a new instance is created, even if the QR code isn't scanned immediately, the instance card appears in the "Desconectado" state, allowing the user to connect later.
2025-05-19 14:54:02 +00:00
gpt-engineer-app[bot]
11628031a3 Fix: Ensure instance cards appear after creation
The instance cards were not appearing after creation. This commit fixes the issue, ensuring that the cards are displayed whether the instance is connected or disconnected.
2025-05-19 14:48:52 +00:00
gpt-engineer-app[bot]
54310bd204 feat: Implement user-specific WhatsApp instances
- Associate WhatsApp instances with logged-in users.
- Store user ID/email with instance data.
- Filter instance cards to show only the user's instances.
- Clear instances on logout/login.
2025-05-19 14:41:04 +00:00
gpt-engineer-app[bot]
44e8569b6c Add instance connection status check
Implement automatic connection status checks for each instance card, displaying "Conectado" or "Desconectado" based on the API response. Includes periodic updates and visual status indication.
2025-05-19 14:33:33 +00:00
gpt-engineer-app[bot]
e7b86b26ea Fix: QR code not rendering
The QR code was not appearing, likely due to a base64 conversion issue.
2025-05-19 14:22:31 +00:00
gpt-engineer-app[bot]
ae584bce96 Fix: Update QR code retrieval flow
Update the "Ver QR Code" button to fetch the QR code from the /instance/connect/{instanceName} endpoint, display the QR code, and handle errors.
2025-05-19 14:20:07 +00:00
gpt-engineer-app[bot]
0b36a1bda5 feat: Display created WhatsApp instances
Adds a section to display created WhatsApp instances as cards, each with a "View QR Code" button. Implements local storage for instance data and fetches QR codes from the API.
2025-05-19 13:40:23 +00:00
gpt-engineer-app[bot]
490ac533ac feat: Implement WhatsApp QR code flow
- Store instanceId and instanceName after instance creation.
- Add "Ver QR Code" button to fetch and display QR code from API.
- Implement QR code refresh functionality.
- Display success/error messages.
2025-05-19 13:30:19 +00:00
gpt-engineer-app[bot]
70dd4fc790 Fix: Update WhatsApp API request
Update the API endpoint and apikey for the WhatsApp instance creation request.
2025-05-19 13:22:42 +00:00
gpt-engineer-app[bot]
991964846a feat: Add "Connect WhatsApp" menu and integration
Adds a "Connect WhatsApp" menu item to the sidebar. Implements a form to input instance name and WhatsApp number, and a button to create a WhatsApp instance via a POST request to the Evolution API. Saves the returned instanceId and displays success/error messages.
2025-05-19 13:12:27 +00:00
gpt-engineer-app[bot]
db6468b4cc feat: Add economy value to dashboard
Add economy value and percentage to the dashboard summary card.
2025-05-19 13:04:03 +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]
e288c9262d Fix: Persist metas, fix category display, add category labels
- Fixed the issue where metas disappeared after navigating away and back.
- Fixed the category display in the dashboard and category menu.
- Added category names to the pie chart labels.
2025-05-19 12:55:27 +00:00
gpt-engineer-app[bot]
e66b0342b7 Run SQL to create financial goals table. 2025-05-19 12:47:41 +00:00
gpt-engineer-app[bot]
85b4d3e795 Fix: "Ver todas as transações" button refresh issue
The "Ver todas as transações" button was refreshing the page instead of displaying all transactions. This commit addresses the issue.
2025-05-19 12:31:13 +00:00
gpt-engineer-app[bot]
0f5e9e7d72 Fix user-specific data and UI issues
- Display user's real name in the header.
- Fix category menu and transaction filters.
- Implement a split view for transactions.
- Ensure each user uses their own database.
- Update database naming.
2025-05-19 12:08:55 +00:00
gpt-engineer-app[bot]
416074060d Implement user-specific data separation
Configure the application to associate each user with a distinct database or data scope, ensuring that users like Rodrigo and Rejane access only their own transactions and data, preventing shared data access.
2025-05-19 11:52:23 +00:00
gpt-engineer-app[bot]
032f171d7f Fix useState runtime error in TooltipProvider
Resolved a runtime TypeError caused by attempting to read 'useState' from a null value. The issue was traced to the TooltipProvider component, which was improperly imported or used, leading to React hooks being called outside of a valid React component context. The fix involved ensuring correct import of React and proper definition of TooltipProvider as a React component that uses hooks within a valid React functional component scope. This prevents the hooks from executing in an invalid context, eliminating the 'null useState' error and restoring proper rendering.
2025-05-19 11:47:03 +00:00
gpt-engineer-app[bot]
e70b9ce00b Fix: Sidebar navigation issue
The sidebar navigation incorrectly highlights the "Dashboard" menu item when the "Transações" menu item is selected, preventing access to the dashboard.
2025-05-19 01:37:43 +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]
22136fc8a1 Fix: Transaction save error
Investigate and resolve an issue where saving new transactions fails, potentially unrelated to the database.
2025-05-18 13:19:36 +00:00
gpt-engineer-app[bot]
23ac89e158 Fix: Dashboard and Transactions menu selection
The dashboard menu item is selected when the user navigates to the transactions page. This commit ensures that the correct menu item is selected based on the current route.
2025-05-18 13:17:51 +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]
6bed5a8fc4 Run SQL to fix column name
The SQL was reviewed and approved. This commit runs the SQL to fix the column name issue.
2025-05-18 13:13:28 +00:00
gpt-engineer-app[bot]
b02d7f29e6 Fix: Supabase table name issue
The errors indicate a problem with the Supabase table names being passed as strings instead of the correct type. This is causing type errors in `TransactionForm.tsx` and `transacaoService.ts`. The fix will involve ensuring the correct table names are used when calling Supabase functions.
2025-05-18 13:10:04 +00:00
gpt-engineer-app[bot]
c05ba05353 Run SQL to create user and transaction tables. 2025-05-18 13:06:18 +00:00
gpt-engineer-app[bot]
e59656824f Fix: Enable "Nova Transação" button
The "Nova Transação" button in the Transacoes page was not functioning. This commit enables the button.
2025-05-18 03:09:01 +00:00
gpt-engineer-app[bot]
f14cc08652 Fix: Calendar negative sign issue
Corrects the calendar view to display revenue transactions with positive values.
2025-05-18 02:38:08 +00:00
gpt-engineer-app[bot]
eccb0a6cb6 Fix: Calendar menu negative sign for revenue
Corrects the calendar view to display revenue transactions with positive values, removing the negative sign.
2025-05-18 02:34:05 +00:00
gpt-engineer-app[bot]
688548893d Fix: Calendar revenue sign
Corrects the display of revenue transactions in the calendar view to remove the negative sign.
2025-05-18 02:32:30 +00:00
gpt-engineer-app[bot]
0a14aec425 Fix: Calendar transaction color
Corrects the transaction color in the calendar view.  Expenses are now displayed in red, and income is displayed in green.
2025-05-18 02:31:01 +00:00
gpt-engineer-app[bot]
98fb2f72ec Fix: Apply responsiveness adjustments
The AI addressed responsiveness issues, ensuring the changes are reflected on the live URL.
2025-05-18 02:27:44 +00:00
gpt-engineer-app[bot]
0df3fc10ee Fix: Dashboard and Categorias page data
The dashboard was not displaying expenses correctly, and the categorias menu was empty. This commit revises the code to ensure expenses are correctly calculated and displayed, and that the categorias menu populates with data.
2025-05-18 02:24:03 +00:00
gpt-engineer-app[bot]
8a056a56dc Fix: Ensure responsiveness across devices
Implemented responsive design adjustments to support both mobile and desktop devices.
2025-05-18 00:16:01 +00:00
gpt-engineer-app[bot]
254b231ec8 Refactor: Sum category values in Categorias page
Use the 'categoria' column to sum values in the Categorias menu.
2025-05-17 23:54:56 +00:00
gpt-engineer-app[bot]
14f970f191 Fix: Use transaction type for sign
Updated `transacaoService.ts` to determine the sign of the transaction value based on the 'tipo' column instead of 'categoria'.
2025-05-17 23:51:21 +00:00
gpt-engineer-app[bot]
d7bf29cf60 Fix: Implement income/expense logic and icon activation
-   Adjusted the display of transaction values to be positive for income and negative for expenses, based on the category.
-   Activated the icons for "Receitas", "Despesas", "Saldo", and "Economia" in the dashboard.
2025-05-17 23:49:54 +00:00
gpt-engineer-app[bot]
d7b24fa168 Fix: Resolve 'useEffect' error
The error "Uncaught TypeError: Cannot read properties of null (reading 'useEffect')" was occurring. This commit addresses the issue.
2025-05-17 23:45:40 +00:00
gpt-engineer-app[bot]
f315af5ed7 Fix: Activate and connect menu items
Connects the "Transações", "Categorias", and "Calendário" menu items to their respective functionalities. Ensures data from Supabase is displayed in these sections.
2025-05-17 23:44:35 +00:00
gpt-engineer-app[bot]
22ce38db82 Fix: Display existing transactions
The dashboard was not displaying the existing transactions from the Supabase table. This commit ensures that the transactions are correctly fetched and displayed on the front end.
2025-05-17 23:40:27 +00:00
gpt-engineer-app[bot]
a4f8efc420 Connect to transactions table 2025-05-17 23:37:48 +00:00
gpt-engineer-app[bot]
cfabf6e503 Connect to Supabase project
Add Supabase configuration and types to the project.
2025-05-17 23:33:22 +00:00
gpt-engineer-app[bot]
c59ba67daa feat: Create finance dashboard
Implement a dashboard to display financial information from a Supabase database. The data will be fetched from the 'transacoes' table, which includes columns like id, user, created_at, valor, quando, detalhes, estabelecimento, tipo, and categoria.
2025-05-17 23:25:52 +00:00
gpt-engineer-app[bot]
d755d23300 Use tech stack vite_react_shadcn_ts 2025-05-17 23:22:05 +00:00