Skip to content

Sphurthy - implemented 🔥 fix for timeoff status#5317

Open
sphurthy wants to merge 3 commits into
developmentfrom
sphurthy-timeoff-hotfix
Open

Sphurthy - implemented 🔥 fix for timeoff status#5317
sphurthy wants to merge 3 commits into
developmentfrom
sphurthy-timeoff-hotfix

Conversation

@sphurthy
Copy link
Copy Markdown
Contributor

@sphurthy sphurthy commented Jun 2, 2026

Description

https://www.loom.com/share/86f58e5b27a3496e998d82ed9f2b89e7

Related PRS (if any):

None

Main changes explained:

  • Update src/components/TeamMemberTasks/TeamMemberTask.jsx: removed the blanket opacity: 0.4 / pointerEvents: none style that was applied to the whole Review button wrapper when the task owner was on time off (it dimmed and froze the control for all viewers, including reviewers). Now passes the onTimeOff value down to ReviewButton instead.
  • Update src/components/TeamMemberTasks/ReviewButton.jsx: added an onTimeOff prop and scoped the gating to only the candidate's own "Submit for Review" action (user.personId === myUserId && reviewStatus === 'Unsubmitted'). Uses the native disabled={isSubmitting || Boolean(onTimeOff)} attribute plus an explanatory title tooltip, so the disable is real (not keyboard-bypassable) and reviewers' dropdown actions stay usable.

How to test:

  1. Check out this branch
  2. Run npm install and npm start to run this PR locally (point it at a running backend)
  3. Clear site data/cache and hard refresh
  4. Log in as an Admin/Owner
  5. Set up data: assign a task to a test user (Projects → WBS → Add/Edit Task → add them as a Resource), then schedule that user's time off for this week (User Management → "Requested Time Off" → pick this week's Sunday, duration 1, reason ≥ 10 words)
  6. Go to Dashboard → Tasks (Team Member Tasks) and confirm the user's row shows "… Is Not Available this Week"
  7. Verify case A (candidate, own task): logged in as that user, with an Unsubmitted task → "Submit for Review" is disabled, and hovering shows the tooltip "You can't submit a task for review while you're on time off this week."
  8. Verify case B (reviewer — the main fix): as Admin/Manager/Mentor viewing that same user's Submitted task → the "Ready for Review" dropdown opens and works (View Link, Edit Link, Mark as complete and remove, More work needed)
  9. Verify keyboard can't bypass it: in case A, Tab to the disabled button and press Enter/Space → nothing happens (no modal opens)
  10. Verify case C (next week): a user with time off scheduled for next week → their "Submit for Review" button stays active
  11. Verify this new behavior works in [dark mode]

Screenshots or videos of changes:

1 2 3

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 2, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 743a2f3
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a205cbe4356990008fc3a35
😎 Deploy Preview https://deploy-preview-5317--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 3, 2026

@one-community one-community changed the title Sphurthy - implemented hotfix for timeoff status Sphurthy - implemented 🔥 fix for timeoff status Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant