Skip to content

fix: flatten admin dashboard payload to include id attribute#179

Merged
jaejayrome merged 3 commits into
stagingfrom
fix/fix-v1-bug
Jun 14, 2026
Merged

fix: flatten admin dashboard payload to include id attribute#179
jaejayrome merged 3 commits into
stagingfrom
fix/fix-v1-bug

Conversation

@xGladiate

Copy link
Copy Markdown
Contributor

Description

This PR aims to resolve the bug where the links of the student / adviser / mentor names are not correct (they point to a wrong user).

To replicate,

a. Click on administrator dashboard, and then click on any adviser, the hyperlink goes to another person's profile.

b. Click on the user (Kabir for example it goes to https://nusskylab-v2-dev.comp.nus.edu.sg/users/12660 instead of https://nusskylab-v2-dev.comp.nus.edu.sg/users/14969) which shows no user is found.

image

@xGladiate xGladiate self-assigned this May 27, 2026
Copilot AI review requested due to automatic review settings May 27, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes admin dashboard user links by preserving the user id in flattened student, adviser, and mentor payloads while keeping role-specific IDs under studentId, adviserId, and mentorId.

Changes:

  • Adds shared flattening helpers for student, adviser, and mentor user payloads.
  • Replaces duplicated password-removal/flattening logic in dashboard evaluation payload generation.
  • Ensures flattened payloads include the user id needed for correct profile links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xGladiate
xGladiate requested a review from jaejayrome June 12, 2026 14:39

@jaejayrome jaejayrome left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good to me!

@jaejayrome
jaejayrome merged commit 7410569 into staging Jun 14, 2026
1 check passed
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.

3 participants