Amaresh: Promotion Eligibility "Review for This Week" and "Process Promotions" frontend - #5569
amaresh2001 wants to merge 7 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
shubhamjakhete
left a comment
There was a problem hiding this comment.
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.



Description
Makes the "Review for This Week" and "Process Promotions" buttons on
/pr-dashboard/promotion-eligibilityfully 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:
src/utils/URL.js: add endpoint constants for reviewer groups, PRs-needed override, PR ratings/entries, and the promotion preview endpoint.src/actions/promotionActions.js: add action functions for every new endpoint above, plusgetTeamsForPlacementfor the confirmation modal's team dropdown.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.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.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.src/components/HGNPRDashboard/PromotionEligibility.module.css: dark-mode styling for all of the above (every override needed!importantdue to a globalbody.dark-mode * { color: white !important; }rule in this app that beats any non!importantselector regardless of specificity).How to test:
sitaram/feature/promotion-eligibility-dashboard-backend) and run it locally on: 4500.npm install, and run the frontend on: 5173.Screenshots or videos of changes:
Note: