Commit Graph

23 Commits

Author SHA1 Message Date
Cauê Faleiros
7ab54053db feat: implement customizable funnel stages per tenant
- Modified attendances.funnel_stage in DB from ENUM to VARCHAR.

- Created tenant_funnels table and backend API routes to manage custom stages.

- Added /admin/funnels page for Admins/Managers to create, edit, order, and color-code their funnel stages.

- Updated Dashboard, UserDetail, and AttendanceDetail to fetch and render dynamic funnel stages instead of hardcoded enums.

- Added defensive checks and logging to GET /users/:idOrSlug to fix sporadic 500 errors during impersonation handoffs.
2026-03-13 10:25:23 -03:00
Cauê Faleiros
bf157687d4 fix: resolve race conditions during impersonation handoff by reloading directly from dataService 2026-03-11 15:33:38 -03:00
Cauê Faleiros
684b98bd0e fix: resolve HashRouter reload issues during impersonation handoffs
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m2s
- Updated Layout and SuperAdmin to explicitly set window.location.hash before triggering window.location.reload() to guarantee correct routing after state resets.
2026-03-11 14:54:35 -03:00
Cauê Faleiros
89f250a43b fix: correct redirect url when exiting impersonation mode
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m3s
- Now correctly routes the Super Admin back to /#/super-admin instead of the standard root dashboard.
2026-03-11 14:42:04 -03:00
Cauê Faleiros
671633b813 style: remove hover requirement for action buttons across all tables
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m6s
- Action buttons (Edit, Delete, Impersonate) are now permanently visible for better UX and discoverability.
2026-03-11 14:37:23 -03:00
Cauê Faleiros
b7f9efd0d1 feat: implement tenant impersonation for super admins
Some checks failed
Build and Deploy / build-and-push (push) Failing after 1m38s
- Added POST /api/impersonate/:tenantId to generate a specialized tenant-scoped JWT.

- Added UI button in SuperAdmin page to trigger impersonation.

- Saved original super_admin token to localStorage to allow returning without re-login.

- Added 'Retornar ao Painel Central' button in sidebar to quickly revert to super admin status.
2026-03-10 16:20:06 -03:00
Cauê Faleiros
ab35cf9126 fix: resolve smtp authentication error and notification issues
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m12s
- Stripped literal quotes from SMTP credentials in nodemailer config to prevent '535 Incorrect auth data' in Docker Swarm.

- Reduced notification polling interval from 60s to 10s for real-time updates.

- Fixed browser autoplay block for audio notifications by properly initializing the audio context.
2026-03-10 14:37:24 -03:00
Cauê Faleiros
d3587344a3 fix: resolve notification sound autoplay block and polling delay
- Prevented sound from triggering on initial page load.

- Confirmed polling interval is set to 10 seconds for real-time alerts.
2026-03-10 11:09:03 -03:00
Cauê Faleiros
754c1e2a21 feat: add user preference for audio notifications and play sound on new alerts
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m53s
- Added sound_enabled column to users table with a default of true.

- Implemented a pleasant pop sound (notification.mp3) that plays when a new unread notification arrives.

- Added a toggle in the User Profile page allowing users to enable/disable the sound.
2026-03-10 10:38:03 -03:00
Cauê Faleiros
ccbba312bb feat: implement persistent notification system
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m38s
- Added notifications table with auto-migration on startup.

- Created backend endpoints for fetching and managing notifications.

- Implemented interactive notification tray in the header with unread badges.

- Added automated triggers for organization creation and user registration completion.
2026-03-09 17:08:41 -03:00
Cauê Faleiros
ec7cb18928 feat: customize search placeholder based on user role
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m10s
- Agents see 'Buscar atendimentos...'

- Super admins see 'Buscar membros, equipes, atendimentos ou organizações...'

- Admin and managers see 'Buscar membros, equipes ou atendimentos...'
2026-03-09 16:29:41 -03:00
Cauê Faleiros
12d24e9255 feat: refine global search RBAC and fix image loading
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m24s
- Restricted Agent search to Attendances only.

- Enabled Super Admin search for Organizations (Tenants).

- Fixed user avatar URL construction in search results.

- Added Organizations category to search dropdown for Super Admins.
2026-03-09 16:09:41 -03:00
Cauê Faleiros
13bcfc1314 feat: enhance global search UI and positioning
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m55s
- Moved search bar to the left/center for better accessibility.

- Increased search bar width to max-w-2xl.

- Refined search results dropdown layout and styling.
2026-03-09 15:54:49 -03:00
Cauê Faleiros
c07967188a feat: implement categorized global search with RBAC
- Added /api/search endpoint with strict role-based data isolation.

- Created searchGlobal function in dataService.

- Refined header UI with an interactive, categorized search results dropdown.
2026-03-09 15:25:12 -03:00
Cauê Faleiros
000bc38712 fix: remove duplicated layout titles and use singular team terminology for managers
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m48s
2026-03-09 11:07:18 -03:00
Cauê Faleiros
3481e698bc fix: change sidebar label to 'Meu Time' for managers
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m10s
2026-03-06 16:34:54 -03:00
Cauê Faleiros
38eb55793f feat: complete fine-grained RBAC rules across all roles
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m52s
- Restricted Agent view to own dashboard and hid management tabs.

- Allowed Managers to create teams and members but restricted them from editing roles or emails.

- Allowed Admins to update their own email via profile.

- Protected Admin roles from being modified by anyone other than Super Admins.
2026-03-06 13:27:43 -03:00
Cauê Faleiros
c4bd4d58a1 feat: complete UI/UX refinement, email flow updates, and deep black theme
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m18s
- Updated all email templates to a clean light theme and changed button text to 'Finalizar Cadastro'.

- Enforced a strict 15-minute expiration on all auth/reset tokens.

- Created SetupAccount flow distinct from ResetPassword to capture user name during admin init.

- Refined dark mode to a premium True Black (Onyx) palette using Zinc.

- Fixed Dashboard KPI visibility and true period-over-period trend logic.

- Enhanced TeamManagement with global tenant filtering for Super Admins.

- Implemented secure User URL routing via slugs instead of raw UUIDs.

- Enforced strict Agent-level RBAC for viewing attendances.
2026-03-05 15:33:03 -03:00
Cauê Faleiros
d5b57835a7 fix: resolve super_admin privileges and tenant management issues
- Fixed real backend deletion for tenants

- Allowed super_admins to manage other super_admins in Global Users

- Filtered teams based on selected tenant in user creation

- Protected system tenant from deletion
2026-03-04 11:36:47 -03:00
Cauê Faleiros
20bdf510fd feat: implement secure multi-tenancy, RBAC, and premium dark mode
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m54s
- Enforced tenant isolation and Role-Based Access Control across all API routes

- Implemented secure profile avatar upload using multer and UUIDs

- Redesigned UI with a premium "Onyx & Gold" Charcoal dark mode

- Added Funnel Stage and Origin filters to Dashboard and User Detail pages

- Replaced "Referral" with "Indicação" across the platform and database

- Optimized Dockerfile and local environment setup for reliable deployments

- Fixed frontend syntax errors and improved KPI/Chart visualizations
2026-03-03 17:16:55 -03:00
Cauê Faleiros
b7e73fce3d feat: replace mock system with real backend, RBAC, and Teams management
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m3s
- Implemented real JWT authentication and persistent user sessions
- Replaced all hardcoded mock data with dynamic MySQL-backed API calls
- Created new 'Times' (Teams) dashboard with performance metrics
- Renamed 'Equipe' to 'Membros' and centralized team management
- Added Role-Based Access Control (RBAC) for Admin/Manager/Agent roles
- Implemented secure invite-only member creation and password setup flow
- Enhanced Login with password visibility and real-time validation
- Added safe delete confirmation modal and custom Toast notifications
2026-03-02 10:26:20 -03:00
Cauê Faleiros
dda606ef9b feat: implement real user profile viewing and auth state 2026-02-26 10:18:27 -03:00
farelos
3250ad7537 feat: Implement backend API and basic frontend structure
Adds initial backend API endpoints for fetching users and attendances, including basic filtering. Sets up the frontend routing with a layout component and includes placeholder pages for dashboard, users, and login. Refactors the README for local development setup.
2026-02-23 10:36:00 -03:00