diff --git a/apps/web/app/hooks/features/useTimeDailyActivity.ts b/apps/web/app/hooks/features/useTimeDailyActivity.ts index 59aa81626..7b2fa9251 100644 --- a/apps/web/app/hooks/features/useTimeDailyActivity.ts +++ b/apps/web/app/hooks/features/useTimeDailyActivity.ts @@ -23,7 +23,7 @@ export function useTimeDailyActivity(type: string) { const todayStart = moment().startOf('day').toDate(); const todayEnd = moment().endOf('day').toDate(); const employeeId = profile.member?.employeeId ?? ''; - if (profile.userProfile?.id === user?.id) { + if (profile.userProfile?.id === user?.id || user?.role?.name?.toUpperCase() == 'MANAGER') { queryCall({ tenantId: user?.tenantId ?? '', organizationId: user?.employee.organizationId ?? '', @@ -48,6 +48,7 @@ export function useTimeDailyActivity(type: string) { profile.member?.employeeId, profile.userProfile?.id, user?.id, + user?.role?.name, user?.tenantId, user?.employee.organizationId, queryCall, diff --git a/apps/web/app/hooks/features/useTimeSlot.ts b/apps/web/app/hooks/features/useTimeSlot.ts index 92b2267d4..cb919849a 100644 --- a/apps/web/app/hooks/features/useTimeSlot.ts +++ b/apps/web/app/hooks/features/useTimeSlot.ts @@ -21,7 +21,7 @@ export function useTimeSlots() { const todayStart = moment().startOf('day').toDate(); const todayEnd = moment().endOf('day').toDate(); const employeeId = profile.member?.employeeId ?? ''; - if (profile.userProfile?.id === user?.id) { + if (profile.userProfile?.id === user?.id || user?.role?.name?.toUpperCase() == 'MANAGER') { queryCall({ tenantId: user?.tenantId ?? '', organizationId: user?.employee.organizationId ?? '', @@ -39,6 +39,7 @@ export function useTimeSlots() { profile.member?.employeeId, profile.userProfile?.id, user?.id, + user?.role?.name, user?.tenantId, user?.employee.organizationId, queryCall,