Skip to content

Commit

Permalink
Merge pull request #1584 from ever-co/fix/timer-suspended-status
Browse files Browse the repository at this point in the history
fix: User Deactivated Case for Timer
  • Loading branch information
evereq authored Oct 18, 2023
2 parents 3e451d9 + ea2d8ff commit 917eef1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/web/lib/features/timer/timer-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export function getTimerStatusValue(
member: OT_Member | undefined,
publicTeam?: boolean
): ITimerStatusEnum {
return member?.timerStatus === 'pause'
return !member?.employee?.isActive && !publicTeam
? 'suspended'
: member?.timerStatus === 'pause'
? 'pause'
: !timerStatus?.running &&
timerStatus?.lastLog &&
Expand All @@ -84,8 +86,6 @@ export function getTimerStatusValue(
moment().diff(moment(timerStatus?.lastLog?.startedAt), 'hours') < 24 &&
timerStatus?.lastLog?.source !== 'TEAMS'
? 'pause'
: !member?.employee?.isActive && !publicTeam
? 'suspended'
: member?.employee?.isOnline
? // && member?.timerStatus !== 'running'
'online'
Expand Down

0 comments on commit 917eef1

Please sign in to comment.