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.
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.
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.
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.
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.
- Fixed instance deletion failures.
- Resolved the issue of instances appearing and disappearing in a loop.
- Addressed errors during instance updates.
- Check for missing information.
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.
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.
- 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.
- 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.
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.
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.
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.
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.
- 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.
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.