Skip to content

Sayali: add promotion confirmation display box with batch promotion to PR grading screen#5152

Open
sayali-2308 wants to merge 1 commit intodevelopmentfrom
Sayali_Promotion_Confirmation_Frontend
Open

Sayali: add promotion confirmation display box with batch promotion to PR grading screen#5152
sayali-2308 wants to merge 1 commit intodevelopmentfrom
Sayali_Promotion_Confirmation_Frontend

Conversation

@sayali-2308
Copy link
Copy Markdown
Contributor

@sayali-2308 sayali-2308 commented Apr 15, 2026

image

Description

Implements #(PRIORITY URGENT) — PR Review Team Analytics Dashboard: Make a display box for confirming promotions (Frontend)

Related PRS (if any):

No backend PR needed — backend endpoints (GET /api/promotion-details/:reviewerId and POST /promote-members) were already implemented.

Main changes explained:

  • Created src/components/PRGradingScreen/PromotionConfirmationBox.jsx — new modal component that displays reviewer details, team info, weekly PR stats table, total PRs, avg PRs/week, and consistency flag when promoting a reviewer
  • Updated src/components/PRGradingScreen/PRGradingScreen.jsx — added 🏆 Promote button per reviewer, wired to GET /api/promotion-details/:reviewerId to fetch real data, added batch promotion with checkboxes + "Promote Selected" button, added batch confirmation modal, and added POST /promote-members API call on confirm for audit logging

How to test:

  1. Check out branch Sayali_Promotion_Confirmation_Frontend
  2. Run npm install and npm run start:local
  3. Clear site data/cache
  4. Log in as admin (devadmin@hgn.net)
  5. Go to Other Links → PR Team Analytics → navigate to localhost:5173/pr-grading-screen
  6. Verify 🏆 Promote button appears under each reviewer name
  7. Click Promote — verify confirmation modal shows reviewer info, weekly PR stats, consistency flag
  8. Click ✅ Confirm Promotion — verify button changes to ✅ Promoted
  9. Select multiple reviewers using checkboxes — verify "Promote Selected" bar appears at bottom
  10. Click Promote Selected — verify batch confirmation modal shows all selected names
  11. Click ✅ Confirm All — verify all selected show ✅ Promoted
  12. Verify all above works in [dark mode]

Screenshots or videos of changes:

image image image image image image image

Note:

  1. Backend endpoints (GET /api/promotion-details/:reviewerId and POST /promote-members) were already fully implemented — no backend changes were required for this task.
  2. The promotion confirmation modal fetches real data from GET /api/promotion-details/:reviewerId. If the API call fails (e.g. reviewer not yet in promotionDetails collection), it gracefully falls back to local data from the grading screen so the UI never breaks.
  3. The consistency flag (✅ Consistent / ⚠️ Inconsistent) is a visual indicator only it does not block the admin from confirming a promotion. This is intentional per task requirements.
  4. Batch promotion calls POST /promote-members with all selected reviewer IDs, which logs the promotion action via PromotionEligibility model and logger.logInfo for auditing.
  5. The ✅ Promoted state is session-only (resets on page refresh) persistence would require a separate backend field which is out of scope for this task.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 15, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit a1d853e
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69df301f98fadd000813513b
😎 Deploy Preview https://deploy-preview-5152--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@sonarqubecloud
Copy link
Copy Markdown

@sayali-2308 sayali-2308 added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Apr 15, 2026
@rapolusidhartha
Copy link
Copy Markdown

image I dont see any Promote button under each reviewer name image I could only press the option add image The Add button is working properly image The Dark Mode is also working Good Need lot of changes to this work

Copy link
Copy Markdown

@rapolusidhartha rapolusidhartha left a comment

Choose a reason for hiding this comment

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

The Promote button doesn't appears under each reviewer name
And no Confirm Promotion too
Need lot of changes to this work

Copy link
Copy Markdown

@Rajasrivatsansrinivasan Rajasrivatsansrinivasan left a comment

Choose a reason for hiding this comment

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

Reviewed PR #5152

Image Image Image

. Checked out the branch locally and tested the PR grading screen promotion flow. Verified that the Promote button appears for reviewers, the single promotion confirmation modal displays reviewer and weekly PR details correctly, confirming promotion updates the reviewer state to Promoted, and batch selection with Promote Selected and Confirm All also works as expected. Also confirmed the UI remains usable in dark mode. Approving.

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