feat: fix profile viewing and implement real user login state
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m47s

This commit is contained in:
Cauê Faleiros
2026-02-25 11:04:51 -03:00
parent a175315437
commit 456f13c930
6 changed files with 66 additions and 37 deletions

View File

@@ -20,11 +20,12 @@ export const UserDetail: React.FC = () => {
const loadData = async () => {
try {
const tenantId = localStorage.getItem('ctms_tenant_id') || CURRENT_TENANT_ID;
const u = await getUserById(id);
setUser(u);
if (u) {
const data = await getAttendances(CURRENT_TENANT_ID, {
const data = await getAttendances(tenantId, {
userId: id,
dateRange: { start: new Date(0), end: new Date() } // All time
});