Commit Graph

403 Commits

Author SHA1 Message Date
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]
c7292ee600 Fix: Apply n8n workflow modifications
Verified the pasted JSON and applied the agreed-upon modifications for the n8n workflow integration.
2025-06-19 09:19:42 +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]
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]
b0bbce2637 Add permanent access feature
- Added a boolean field `liberado_permanente` to the `usuarios` table.
- Updated the RLS policy to allow inserts if `liberado_permanente` is true.
- Updated the frontend to show a custom message if the insert is blocked.
2025-06-15 21:54:18 +00:00
gpt-engineer-app[bot]
f16b060416 Apply monthly payment RLS policy
Apply the SQL policy to ensure that transactions are only inserted if the user is within the trial period or has an approved payment for the current month.
2025-06-15 21:51:44 +00:00
gpt-engineer-app[bot]
5a1e6a222d Apply RLS policy for transaction inserts
Enforce trial period and payment checks for transaction inserts using RLS.
2025-06-15 21:48:12 +00:00
gpt-engineer-app[bot]
ad7266b151 Fix: Import useState in Transacoes.tsx
The `useState` hook was not imported in `src/pages/Transacoes.tsx`, causing a "Cannot find name 'useState'" error. This commit adds the necessary import to resolve the error.
2025-06-15 21:43:47 +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]
d16695dfa4 Add Mercado Pago webhook endpoint
Create the Mercado Pago webhook function and provide the webhook URL.
2025-06-15 21:37:54 +00:00
gpt-engineer-app[bot]
038c131b3b Run SQL migration for Mercado Pago payments. 2025-06-15 21:36:27 +00:00
gpt-engineer-app[bot]
ac6b5208ca Fix: Use logged-in user's email in request
Use the logged-in user's email instead of a hardcoded one in the Mercado Pago subscription request.
2025-06-15 21:05:52 +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]
d7f2847a84 Fix: Use logged-in user's email for payment
Corrected the email retrieval logic to use the logged-in user's email instead of a hardcoded one when initiating Mercado Pago payments. This resolves the issue where payments were failing due to incorrect email addresses.
2025-06-15 20:21:56 +00:00
gpt-engineer-app[bot]
f91efb3823 Fix: Edge Function non-2xx status code
The "Assinar Agora" button was not working, returning a non-2xx status code.
2025-06-15 20:12:02 +00:00
gpt-engineer-app[bot]
de3dc3363f Fix: Implement "Assinar Agora" button action
Implemented the `handleSubscribe` function to handle the "Assinar Agora" button click, but the action was not being triggered. Fixed the issue.
2025-06-15 20:09:35 +00:00
gpt-engineer-app[bot]
ee0236123c feat: Implement handleSubscribe function
Adds a function to handle subscription requests to Mercado Pago, including POST request setup, error handling, and redirection on success.
2025-06-15 20:06:46 +00:00
gpt-engineer-app[bot]
363e5ac6a4 Add WhatsApp integration and subscription expiry.
- Updated subscription card to reflect WhatsApp integration.
- Removed "Exportação de dados" benefit.
- Added placeholder for subscription expiry date display.
- Identified requirements for subscription expiry logic.
2025-06-15 20:04:23 +00:00
gpt-engineer-app[bot]
17f2de2a73 feat: Add subscription page to settings
Adds a subscription page within the settings section, including a title, a card displaying plan details (name, price, benefits), and "Subscribe Now" and "View Details" buttons. Uses Tailwind CSS for styling.
2025-06-15 20:01:20 +00:00
gpt-engineer-app[bot]
c059dea681 feat: Add back button to Configurações page
Adds a "back" button to the Configurações page to navigate back to the main application layout, addressing the issue of the page opening in isolation.
2025-06-15 19:51:46 +00:00
gpt-engineer-app[bot]
fba2674876 Fix: Configuracoes page still isolated
The Configuracoes page was still rendering in an isolated manner. This commit ensures the page integrates correctly with the main app layout, resolving the issue where it appeared separately.
2025-06-15 19:38:43 +00:00
gpt-engineer-app[bot]
f103d34e02 Fix: Ensure settings page layout
Review and adjust the 'Configurações' page to integrate correctly with the main app layout, ensuring the sidebar and overall spacing are consistent with other sections.
2025-06-15 19:36:32 +00:00
gpt-engineer-app[bot]
3bb236d617 Fix: Ensure settings page layout
The settings page was still appearing as an isolated page. This commit ensures the settings page integrates with the main app layout, using the same sidebar as other pages.
2025-06-15 19:33:52 +00:00
gpt-engineer-app[bot]
67c1dd3ac3 Fix: Settings page navigation
Ensure settings page uses the same layout as other menu items, preserving the sidebar.
2025-06-15 19:30:47 +00:00
gpt-engineer-app[bot]
07bf385f0e Fix: Remove "Geral" from settings page
The "Geral" menu item should not be displayed as a separate page, but rather the content should be displayed within the "Configurações" page. This commit removes the "Geral" page and ensures the correct display of the settings menu.
2025-06-15 19:27:54 +00:00
gpt-engineer-app[bot]
e5b764b986 Fix: Resolve AuthState type error
The error "Property 'user' does not exist on type 'AuthState'" in `src/components/settings/MeuCadastroForm.tsx` is fixed. The code was updated to correctly access the user information from the authentication store.
2025-06-15 19:17:36 +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]
612adc60b2 Fix: Wrap SettingsSidebar with SidebarProvider
The error "useSidebar must be used within a SidebarProvider" indicates that the SettingsSidebar component is using the useSidebar hook without being wrapped by the SidebarProvider. This commit wraps the SettingsSidebar component with the SidebarProvider in the Configuracoes page to resolve the error.
2025-06-15 18:38:42 +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]
7cb41a4f9c Fix: Use existing table for credit cards
The SQL was updated to use the existing `cartoes_credito` table instead of creating a new one. This resolves the error and ensures compatibility with the existing database structure.
2025-06-11 09:20:21 +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]
7d0dc19eb9 Fix: Resolve dynamic import fetch error
The AI addressed a "Failed to fetch dynamically imported module" error related to `src/pages/Index.tsx`. This likely involves checking the import path, ensuring the file is correctly served, and verifying the build configuration.
2025-06-06 18:40:04 +00:00