Skip to content

feat(portal): greet the teacher by full name on the dashboard (bd-2567) - #197

Merged
hatafatif merged 1 commit into
developfrom
bd-2567-fullname
Aug 13, 2026
Merged

feat(portal): greet the teacher by full name on the dashboard (bd-2567)#197
hatafatif merged 1 commit into
developfrom
bd-2567-fullname

Conversation

@hatafatif

Copy link
Copy Markdown
Collaborator

Welcome back, Ayesha!Welcome back, **Ayesha Khan**!

lastName was already returned by the API (portal.routes.js selects first_name AND last_name) and already on the User type — it was just never shown.

The interesting part is the missing surname

Built with filter-then-join rather than ${firstName} ${lastName}, because a blank surname is expected, not exceptional — data migrated from a system with one combined name field leaves last_name empty. Interpolation would render "Ayesha undefined" or leave a space dangling before the "!", and this heading is the first thing a teacher sees.

Ayesha + Khan   -> "Ayesha Khan"
Ayesha + null   -> "Ayesha"
Ayesha + "   "  -> "Ayesha"

I could not check from here whether last_name is actually populated for NIETE users (no DB access), so the empty case is treated as the likely path.

Red-first: 5 failing → 14 files / 76 tests green. Build verified.

Closes: bd-2567

🤖 Generated with Claude Code

"Welcome back, Ayesha!" -> "Welcome back, Ayesha Khan!"

`lastName` was already returned by the API (portal.routes.js selects
first_name AND last_name) and already on the User type — it was simply
never displayed.

Built by filter-then-join rather than `${firstName} ${lastName}`, because
a blank surname is expected rather than exceptional: data migrated from a
system with one combined name field leaves last_name empty, and
interpolation would render "Ayesha undefined" or leave a space dangling
before the "!". Both look broken, and this heading is the first thing a
teacher sees.

  Ayesha + Khan  -> "Ayesha Khan"
  Ayesha + null  -> "Ayesha"
  Ayesha + "   " -> "Ayesha"

Whether last_name is actually populated for NIETE users could not be
checked from here (no DB access), so the empty case is treated as the
likely path, not an edge case.

Tests red-first: 5 failing before, 14 files / 76 tests green after.
@hatafatif
hatafatif merged commit 974e946 into develop Aug 13, 2026
1 of 2 checks 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.

1 participant