Redirect users to the dashboard after Google login. Move webhook calls for workflow and Evolution API activation to the "Cadastrar grupo" button click in CreateGroupFormSimple.tsx, removing them from instance creation.
The webhook was looping due to incorrect placement of the webhook configuration. This commit moves the webhook configuration to the correct location. Also fixes the 500 errors.
- Investigate and correct the timing and data sent to the `/ativarworkflow` webhook.
- Address the looping issue with the `/hook` webhook, ensuring it's only triggered once during group creation.
- Implemented year-long view for "Receitas vs Despesas" chart.
- Improved dashboard card design and functionality, including navigation to filtered transactions on click.
- Verified the accuracy of the "Despesa por Categoria" chart.
Replaced incorrect import of `authStore` with `useAuthStore` in `MeuCadastroForm.tsx`, `useProfileCompletion.ts`, and `CompleteProfile.tsx` to resolve TypeScript errors.
The AI addressed the app crashing after login and investigated the subscription page issue, focusing on resolving the problem to display the purchase page, without providing logs.
- Fixed dashboard data not loading from the database.
- Fixed onboarding tour looping and showing repeated banners.
- Fixed "Assinar Agora" button not redirecting to payment page.
The AI fixed the onboarding tour logic to ensure it appears on login if the user has no registered groups, addressing the issue of the tour not appearing despite the conditions being met.
The AI addressed the 404 error on the subscription page and investigated the onboarding tour not starting after login when no groups are registered. It also reviewed the code for potential errors in the tour logic.
The onboarding tour was not starting correctly after login. This commit reviews the logic to ensure the tour starts when the user logs in and has no registered groups. Also, it moves the "Assinatura" menu item to the end of the sidebar, after "Calendário".
Fixes the onboarding tour looping issue and adjusts the button style for better visibility. The tour now correctly opens only once per session until the required conditions are met (connected instance and active group).
Implement an onboarding tour that guides users through connecting WhatsApp and creating a group. The tour should only appear until the user has created at least one instance and one group.
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.
The AI identified that the WhatsApp connection page was not updating correctly, and the previous fixes were not working. It suggests a new approach, analyzing the old and current logic, and checking for other potential issues.
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.
Ensure instance creation logic checks 'instancia_zap' and 'status_instancia' in the 'usuarios' table. Allow group creation only when 'status_instancia' is 'conectado'.
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.
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.
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.
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.
- 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.
- 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.
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".
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.
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.
- 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.