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
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:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user