Skip to content

Amaresh: Promotion Eligibility "Review for This Week" and "Process Promotions" frontend - #5569

Open
amaresh2001 wants to merge 7 commits into
developmentfrom
amaresh/promotion-eligibility-review-this-week
Open

amaresh2001 wants to merge 7 commits into
developmentfrom
amaresh/promotion-eligibility-review-this-week

Conversation

@amaresh2001

Copy link
Copy Markdown

Description

Screenshot 2026-09-18 at 1 13 02 PM Screenshot 2026-09-18 at 1 13 17 PM Screenshot 2026-09-18 at 1 13 37 PM Screenshot 2026-09-18 at 1 13 55 PM Screenshot 2026-09-18 at 1 14 10 PM Screenshot 2026-09-18 at 1 14 23 PM

Makes the "Review for This Week" and "Process Promotions" buttons on /pr-dashboard/promotion-eligibility fully functional, per the doc spec. Previously, "Review for This Week" was a stub toast ("Logic not implemented yet."), and "Process Promotions" promoted immediately with no preview, no team-placement info, and no way to catch/override a bad team match before committing it.

Related PRS (if any):

This frontend PR is related to the PR #2317 (branch sitaram/feature/promotion-eligibility-dashboard-backend).
To test this frontend PR, you need to check out the PR #2317 backend.

Main changes explained:

  • Update src/utils/URL.js: add endpoint constants for reviewer groups, PRs-needed override, PR ratings/entries, and the promotion preview endpoint.
  • Update src/actions/promotionActions.js: add action functions for every new endpoint above, plus getTeamsForPlacement for the confirmation modal's team dropdown.
  • Update src/components/HGNPRDashboard/PromotionEligibility.jsx: replace the "Review for This Week" stub with a group-selector dropdown that opens the new weekly grading modal; make "Required PRs" inline-editable for Owner role. Change "Process Promotions" to call a preview endpoint and open a confirmation modal instead of promoting immediately.
  • Create src/components/HGNPRDashboard/ReviewForThisWeekModal.jsx (+ .module.css): per-group weekly view: reviewer name, History, PRs Reviewed, PRs Needed, and a PR-entries list with a color-coded rating dropdown per entry (colors verified correct in dark mode), manual "add PR" and "import from weekly summary" actions.
  • Create src/components/HGNPRDashboard/PromotionConfirmationModal.jsx (+ .module.css): shows the promotion preview (committed hours, band, recommended team, warnings) before any write happens; lets the user override the recommended team per reviewer; disables the team dropdown with a "Loading teams…" placeholder until team options are fetched.
  • Update src/components/HGNPRDashboard/PromotionEligibility.module.css: dark-mode styling for all of the above (every override needed !important due to a global body.dark-mode * { color: white !important; } rule in this app that beats any non !important selector regardless of specificity).

How to test:

  1. Check out backend PR #2317 (sitaram/feature/promotion-eligibility-dashboard-backend) and run it locally on: 4500.
  2. Check out this branch, run npm install, and run the frontend on: 5173.
  3. Clear site data/cache.
  4. Log in and go to PR Dashboard → Promotion Eligibility.
  5. Click the group dropdown next to "Review for This Week", pick a group, verify the weekly grading modal opens with real reviewer data and PR entries; try rating a PR entry and adding a new one.
  6. As an Owner-role user, click a reviewer's "Required PRs" figure and verify it becomes editable and saves.
  7. Select one or more reviewers with "Remaining Weeks" = 0, click "Process Promotions", verify the confirmation modal opens with committed hours/band/recommended team/warnings; try overriding a team, then click Confirm and verify the row disappears, and the promotion applies.
  8. Verify the "Promote?" checkbox visibly fills in black with a checkmark when clicked.
  9. Repeat steps 5-8 with dark mode on and confirm all text/colors remain readable.

Screenshots or videos of changes:

Screenshot 2026-09-19 at 11 01 52 AM Screenshot 2026-09-19 at 11 02 47 AM Screenshot 2026-09-19 at 11 06 07 AM Screenshot 2026-09-19 at 11 06 23 AM Screenshot 2026-09-19 at 11 06 34 AM

Note:

@netlify

netlify Bot commented Sep 19, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 64deb68
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6aaed606cbe5860008598d8f
😎 Deploy Preview https://deploy-preview-5569--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

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Sep 21, 2026

@shubhamjakhete shubhamjakhete left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request Changes

The initial Promotion Eligibility request is still calling getPromotionEligibility() without passing currentUser.

The backend permission check requires req.body.requestor, so this request can return 403 and cause the page to show “Failed to load Reviewers.” This blocks the main Promotion Eligibility workflow before the new review and promotion functionality can be used.

Please pass the authenticated user/requestor to the initial getPromotionEligibility call and make sure the request runs after currentUser is available.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants