Commit Graph

403 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
641e4c4d11 Fix: Restore help icon and move subscription page
Restore the help icon with its original functionality.
Move the subscription page to the sidebar.
Improve category chart percentage display.
2025-06-22 00:45:38 +00:00
gpt-engineer-app[bot]
36b64f7e5c Fix: Restore user identification and improve chart
Restore the user identification section in the header. Improve the category chart by removing the value from the center and improving the tooltip display.
2025-06-22 00:37:45 +00:00
gpt-engineer-app[bot]
bfad740ccb Fix: Improve onboarding tour UI and button styles
- Added an arrow connecting the text in the banner to the button in the onboarding tour.
- Adjusted the "Grupos" button style to match the original design, ensuring a white background and black text.
2025-06-22 00:32:29 +00:00
gpt-engineer-app[bot]
71026e9b63 Fix: Onboarding tour behavior and button style
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).
2025-06-22 00:26:44 +00:00
gpt-engineer-app[bot]
6a9e57eb9a Add onboarding tour for WhatsApp and Groups
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.
2025-06-22 00:10:51 +00:00
gpt-engineer-app[bot]
dcdfa9ae9c Fix: Send webhook on group creation
Ensure the webhook is sent to the correct URL with the user's email when a group is created.
2025-06-21 21:04:32 +00:00
gpt-engineer-app[bot]
27788bfbbe Refactor AdminFAQ page
Refactors `src/pages/AdminFAQ.tsx` into smaller, reusable components to improve code organization and maintainability.
2025-06-21 20:03:30 +00:00
gpt-engineer-app[bot]
352bb9aa59 Refactor: Split ContactForm into smaller components
Refactors ContactForm.tsx into smaller, more manageable components for improved code organization and maintainability.
2025-06-21 19:50:38 +00:00
gpt-engineer-app[bot]
c323023e28 Run SQL to create tables and policies
This commit executes the provided SQL script to create the necessary tables (`faqs`, `faq_feedback`, `contatos`) and associated policies for the help system, as reviewed by the user. It also creates a storage bucket for contact form attachments.
2025-06-21 19:44:53 +00:00
gpt-engineer-app[bot]
1d22b504a0 Add help icon and FAQ functionality
Implement a help icon with a "Fale com a gente" button, linking to an email form. Add admin functionality to create FAQs with text and image support, including a feedback mechanism.
2025-06-21 19:33:18 +00:00
gpt-engineer-app[bot]
e41618415d Refactor: Split WhatsApp page into components
Split the WhatsApp page into smaller, reusable components to improve code organization and readability.
2025-06-21 18:57:20 +00:00
gpt-engineer-app[bot]
a9769b76db Fix: Inconsistent WhatsApp instance detection
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.
2025-06-21 16:19:14 +00:00
gpt-engineer-app[bot]
7fbce3ca0b Fix WhatsApp instance detection
Centralize instance check, remove debug, and fix UI.
2025-06-21 16:07:11 +00:00
gpt-engineer-app[bot]
ec9c883bf0 Fix: Instance detection and group creation
The app incorrectly allows new instance creation and prevents group creation despite a connected instance. This commit addresses the issue.
2025-06-21 15:32:26 +00:00
gpt-engineer-app[bot]
25aa661bca Fix WhatsApp instance connection logic
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.
2025-06-21 15:29:13 +00:00
gpt-engineer-app[bot]
3889badb7b Fix: Prevent new instance creation
The app was incorrectly allowing new WhatsApp instance creation even when a connected instance already existed. This commit addresses this issue.
2025-06-21 15:23:35 +00:00
gpt-engineer-app[bot]
61e154ed02 Fix: Improve WhatsApp instance and group creation logic
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.
2025-06-21 15:18:42 +00:00
gpt-engineer-app[bot]
8bedfeb33c Fix: Implement instance detection logic
The previous changes did not fully resolve the issue. This commit ensures the correct instance detection logic is implemented, based on the user's email and the instance status in the database. This affects the creation of new instances and group creation.
2025-06-21 15:09:59 +00:00
gpt-engineer-app[bot]
11768cba9f Fix WhatsApp instance logic
Ensure instance creation logic checks 'instancia_zap' and 'status_instancia' in the 'usuarios' table. Allow group creation only when 'status_instancia' is 'conectado'.
2025-06-21 15:07:13 +00:00
gpt-engineer-app[bot]
c06f108d6e Refactor: Split CreateGroupForm.tsx
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.
2025-06-21 14:50:28 +00:00
gpt-engineer-app[bot]
630b535bf4 Refactor: Split CreateInstanceForm.tsx into smaller components
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.
2025-06-21 14:48:47 +00:00
gpt-engineer-app[bot]
9a3e2ac4fb Fix: Incorrect instance detection
The previous fix for instance detection was not fully effective. This commit further refines the logic in `src/components/whatsapp/CreateInstanceForm.tsx` and `src/components/whatsappGroups/CreateGroupForm.tsx` to ensure that the app correctly identifies existing WhatsApp instances and prevents the creation of duplicate instances or groups.
2025-06-21 14:44:28 +00:00
gpt-engineer-app[bot]
be3ceeaeb2 Fix WhatsApp group creation logic
The logic for enabling WhatsApp group creation was not correctly recognizing when a WhatsApp instance was created, allowing users to attempt to create multiple instances. This commit addresses the issue.
2025-06-21 14:38:27 +00:00
gpt-engineer-app[bot]
4950dae761 Fix: Enforce profile completion and webhook trigger
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.
2025-06-21 14:25:52 +00:00
gpt-engineer-app[bot]
9427d396b6 Fix Google OAuth redirect in production
The Google OAuth redirect was failing in production due to `window.location.origin` resolving to `localhost:3000`. This commit fixes the redirect logic in `src/components/auth/SocialLoginButtons.tsx` and updates the `public.handle_new_user()` function via a SQL migration (`supabase/migrations/20250621141237-fix-google-user-data.sql`) to capture the user's name from Google metadata.
2025-06-21 14:19:52 +00:00
gpt-engineer-app[bot]
8afd392018 Fix: Redirect after Google login
The user is redirected to a "page not accessible" error after Google login in production. The email is saved in Supabase, but name and WhatsApp are missing. The app should redirect to the profile completion page to collect the missing data.
2025-06-21 14:13:41 +00:00
gpt-engineer-app[bot]
a0eaf94ed5 Fix: Google login redirect error
Fixes the Google login redirect error by ensuring the correct configuration in Supabase and Google Cloud Console.
2025-06-21 13:36:12 +00:00
gpt-engineer-app[bot]
9ac63c926b Implement authentication flow
Implement mandatory data collection after Google login, including a dedicated page and webhook integration.
2025-06-21 12:30:18 +00:00
gpt-engineer-app[bot]
cf27d1561e Implement authentication improvements.
- Enable email confirmation.
- Implement social login (Google).
- Review brute force protection settings.
2025-06-21 12:19:11 +00:00
gpt-engineer-app[bot]
e31d990b1b Fix: Resolve localStorage import error
The error `Uncaught SyntaxError: The requested module '/src/services/whatsApp/localStorage.ts' does not provide an export named 'loadInstancesFromLocalStorage'` indicates an incorrect import. This commit corrects the import in `src/hooks/whatsApp/useInstanceState.ts` to use the correct export name, which is `loadInstancesFromStorage`. Also fixes the build errors in `src/components/whatsapp/CreateInstanceForm.tsx` and `src/hooks/whatsApp/useInstanceState.ts`.
2025-06-21 12:09:35 +00:00
gpt-engineer-app[bot]
8127050bf6 Refactor: Implement security restructuring phase
- Implement proxy for external API calls via Edge Functions.
- Sanitize logging to remove sensitive data.
- Implement input validation.
2025-06-21 12:08:02 +00:00
gpt-engineer-app[bot]
0ab8fa63d1 Fix: Resolve missing exports in whatsAppService
Removed `SERVER_URL` and `API_KEY` imports from `src/services/whatsAppService.ts` as they are no longer exported by `src/services/whatsApp/config.ts` due to the security refactor.
2025-06-21 12:05:20 +00:00
gpt-engineer-app[bot]
0208b13700 Fix: Implement emergency security measures
Implemented Supabase secrets for API keys, created Edge Functions for secure API calls, and removed hardcoded keys from the frontend.
2025-06-21 12:03:35 +00:00
gpt-engineer-app[bot]
3877be5376 Fix: Resolve conflicting star exports
Resolve the `SyntaxError: conflicting star exports` in `src/services/whatsAppInstance/index.ts` by adjusting the export structure. This involves refactoring the exports to avoid conflicts with `updateUserWhatsAppInstance`.
2025-06-20 16:58:27 +00:00
gpt-engineer-app[bot]
4f905ca65f feat: Improve WhatsApp number input field
- Added fixed country code (+55)
- Separated DDD and phone number fields
- Added placeholder for DDD and phone number
- Added helper text
2025-06-20 16:56:01 +00:00
gpt-engineer-app[bot]
e47501cfa1 Reverted to commit aeb9fa261d 2025-06-20 16:50:23 +00:00
gpt-engineer-app[bot]
364304ef6c Fix: Correct updateUserWhatsAppInstance call
Corrected the `updateUserWhatsAppInstance` call in `src/components/whatsapp/CreateInstanceForm.tsx` to match the expected argument count.
2025-06-20 16:49:14 +00:00
gpt-engineer-app[bot]
3e3b931ca7 Fix CreateInstanceForm and userOperations errors
Fixed type errors in CreateInstanceForm.tsx and userOperations.ts related to argument counts, property definitions, and Supabase update calls. Corrected the WhatsAppInstance type definition and ensured correct data passing to Supabase.
2025-06-20 16:47:37 +00:00
gpt-engineer-app[bot]
7bf6cdd8ce Fix: Resolve conflicting star exports in WhatsApp instance service
The error "conflicting star exports for name 'updateUserWhatsAppInstance'" indicates a naming conflict when re-exporting modules. This commit resolves the issue by explicitly re-exporting the conflicting functions in `src/services/whatsAppInstance/index.ts` to avoid the conflict.
2025-06-20 16:45:49 +00:00
gpt-engineer-app[bot]
27cad3b98b Fix n8n workflow activation and trigger.
Adjusted the n8n workflow activation request and moved the trigger to group creation. Implemented email standardization to lowercase and WhatsApp number field improvements. Edited `src/services/whatsAppInstance/workflowOperations.ts`, `src/components/whatsapp/CreateInstanceForm.tsx`, and `src/services/n8nWorkflowService.ts`.
2025-06-20 16:43:41 +00:00
gpt-engineer-app[bot]
aeb9fa261d Fix: Use correct email format in Evolution API webhook
Ensure the Evolution API webhook uses the user's email with the "@" symbol in the URL, instead of replacing it with "_".
2025-06-20 01:26:21 +00:00
gpt-engineer-app[bot]
d14f68d709 Refactor WhatsApp workflow activation to use webhook
Replaced direct n8n API call with a webhook POST request to `/webhook/ativarworkflow` containing the user's email after WhatsApp instance creation.
2025-06-19 23:52:52 +00:00
gpt-engineer-app[bot]
7ed70a35ff Fix: Workflow activation POST request
Ensured the POST request for workflow activation uses the correct URL and headers, dynamically replacing the workflow ID.
2025-06-19 23:12:48 +00:00
gpt-engineer-app[bot]
6d867c3649 Refactor: Split WhatsApp instance service
Refactored `src/services/whatsAppInstanceService.ts` into smaller, more focused files to improve maintainability and readability.  Removed unused imports and files.
2025-06-19 23:07:28 +00:00
gpt-engineer-app[bot]
fdbb42f693 Fix: Update n8n API key
Updated the n8n API key in the `activateUserWorkflow` function within `src/services/whatsAppInstanceService.ts` to the correct value provided by the user.
2025-06-19 23:05:55 +00:00
gpt-engineer-app[bot]
ec390787c6 Implement WhatsApp connection flow
- Updated database on instance creation.
- Added n8n workflow activation.
- Filtered instance display by user email.
2025-06-19 22:28:40 +00:00
gpt-engineer-app[bot]
020ba4d396 Refine user registration flow
- Maintain webhook action with WhatsApp number.
- Redirect to login page after successful registration.
- Display success message on login page.
2025-06-19 21:41:33 +00:00
gpt-engineer-app[bot]
0b9e6ee5df Refactor: Replace n8n API call with webhook
Remove direct n8n API call and implement a webhook POST request to trigger the workflow creation process upon user registration.
2025-06-19 20:57:26 +00:00
gpt-engineer-app[bot]
f719a4cb1e Fix: Ensure n8n workflow creation on signup
Ensured the n8n workflow creation process is correctly triggered after user registration, including correct API request details, dynamic data replacement, and saving workflow information.
2025-06-19 10:01:57 +00:00
gpt-engineer-app[bot]
176fe2c9f9 Fix: Ensure n8n workflow creation on signup
The n8n workflow creation was not triggered after user registration. This commit ensures the POST request to the n8n API is correctly configured to execute after a new user signs up.
2025-06-19 09:54:50 +00:00