In application/user-client/src/pages/Register.tsx line 113, the Alternative Contact First Name field is prefilled from nextOfKin?.lastName instead of nextOfKin?.firstName.
Verified two ways:
-
Direct via Swagger - sending an invite with prefill.profile.nextOfKin where firstName and lastName differ, the register form shows both First Name and Family Name as the last name value.
-
Via the actual admin UI - uploaded a CSV through the Participants page Import flow (ReactSpreadsheetImport wizard) with distinct next-of-kin firstName/lastName values. The wizard maps CSV columns to profile.nextOfKin.firstName / .lastName, populates the InviteModal, and after sending + clicking the invite link, the register form's Alternative Contact section shows both name fields as the last name value ("SmithLAST" in my test).
Manual invite entry via InviteModal only passes studyParticipant.externalId so that path isn't affected, but the CSV import path populates full profile.* prefill including nextOfKin.
Fix: change nextOfKin?.lastName to nextOfKin?.firstName on line 113. One-word fix.
In
application/user-client/src/pages/Register.tsxline 113, the Alternative Contact First Name field is prefilled fromnextOfKin?.lastNameinstead ofnextOfKin?.firstName.Verified two ways:
Direct via Swagger - sending an invite with
prefill.profile.nextOfKinwhere firstName and lastName differ, the register form shows both First Name and Family Name as the last name value.Via the actual admin UI - uploaded a CSV through the Participants page Import flow (ReactSpreadsheetImport wizard) with distinct next-of-kin firstName/lastName values. The wizard maps CSV columns to
profile.nextOfKin.firstName/.lastName, populates the InviteModal, and after sending + clicking the invite link, the register form's Alternative Contact section shows both name fields as the last name value ("SmithLAST" in my test).Manual invite entry via InviteModal only passes
studyParticipant.externalIdso that path isn't affected, but the CSV import path populates fullprofile.*prefill includingnextOfKin.Fix: change
nextOfKin?.lastNametonextOfKin?.firstNameon line 113. One-word fix.