Commit Graph

179 Commits

Author SHA1 Message Date
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
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
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