Sayali: resolve duplicate badge assignment and fix checkbox display for existing badges in dark mode#5223
Conversation
…existing badges in dark mode
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @HemanthNidamanuru , I tested locally and the badge assignment is working correctly on my end with no team codes errors. The 'retrieve team codes' toast is unrelated to this PR it comes from fetchTeamCodeAllUsers calling the WEEKLY_SUMMARIES_TEAM_CODES backend endpoint. Please ensure your backend is running on port 4500 with npm run build then npm start and try again. |
HemanthNidamanuru
left a comment
There was a problem hiding this comment.
Hi,
I retested this locally. Badge assignment works correctly for most users. Existing badges show as checked, newly assigned badge appears with count 1, and no duplicates in Select Featured. Dark mode and dates dropdown look good.
One issue: clicking "Assign Badges" throws an error for some users. This needs to be fixed before merging.
PR.5223.mp4
PR.5223.-.2.mp4
There was a problem hiding this comment.
Navigate to any User Profile
In "Assign Badges" existing badges show as checked
Existing badges did not get duplicated
Newly assigned badge appears with count 1
Dates dropdown displays the dates of badge earned .
'retrieve team codes' toast shows up even after re-running the backend.
Badge report is also downloadable.
|
https://github.com/user-attachments/assets/2ffa08a9-1fe8-4fb1-a368-29de112610b4 |
HemanthNidamanuru
left a comment
There was a problem hiding this comment.
Hi,
I retested this PR locally. Badge assignment works correctly for most users. Existing badges show as checked, newly assigned badges appear with count 1, and there are no duplicates in Select Featured. Dark mode and the dates dropdown also look good.
However, badge update is still failing for some users and needs to be fixed before merging.
|
|
Thank you all, merging! |










Description
Fixes #3237 (Priority Medium)
Main changes explained:
returnUpdatedBadgesCollectionSingleUserinbadgeManagement.jsto use immutable approach preventing duplicate entries on all existing badges when a new badge is assignede.targethyperlink inAssignTableRow.jsxpropExistBadgesprop name mismatch inUserProfile/AssignBadgePopup.jsxisSelectedlogic so existing badges show as checked when modal opensBadgeReport.jsxHow to test:
npm installandnpm run start:localScreenshots:
Note:
This PR finishes the work started in PR #3237 from scratch with a cleaner fix.