- 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.
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.
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.
- 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.
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.
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.
- 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.
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.
- 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.
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.
The sidebar navigation incorrectly highlights the "Dashboard" menu item when the "Transações" menu item is selected, preventing access to the dashboard.
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.
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.
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 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.
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.
Connects the "Transações", "Categorias", and "Calendário" menu items to their respective functionalities. Ensures data from Supabase is displayed in these sections.
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.