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
This commit is contained in:
Cauê Faleiros
2026-03-02 10:26:20 -03:00
parent 76b919d857
commit b7e73fce3d
19 changed files with 1707 additions and 553 deletions

View File

@@ -1,7 +1,6 @@
import React, { useEffect, useState, useMemo } from 'react';
import { useParams, Link } from 'react-router-dom';
import { getAttendances, getUserById } from '../services/dataService';
import { CURRENT_TENANT_ID } from '../constants';
import { Attendance, User, FunnelStage } from '../types';
import { ArrowLeft, Mail, Phone, Clock, MessageSquare, ChevronLeft, ChevronRight, Eye } from 'lucide-react';
@@ -20,11 +19,12 @@ export const UserDetail: React.FC = () => {
const loadData = async () => {
try {
const tenantId = localStorage.getItem('ctms_tenant_id');
const u = await getUserById(id);
setUser(u);
if (u) {
const data = await getAttendances(CURRENT_TENANT_ID, {
if (u && tenantId) {
const data = await getAttendances(tenantId, {
userId: id,
dateRange: { start: new Date(0), end: new Date() } // All time
});