Skip to content

Commit

Permalink
Add NINO to User admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Jan 9, 2024
1 parent a6677c9 commit 946cc2b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
</govuk-summary-list-row>
<govuk-summary-list-row>
<govuk-summary-list-row-key>National insurance number</govuk-summary-list-row-key>
<govuk-summary-list-row-value>@(!string.IsNullOrEmpty(Model.DqtNationalInsuranceNumber) ? "Provided" : "Not provided")</govuk-summary-list-row-value>
<govuk-summary-list-row-value>@Model.DqtNationalInsuranceNumber</govuk-summary-list-row-value>
</govuk-summary-list-row>
<govuk-summary-list-row>
<govuk-summary-list-row-key>TRN</govuk-summary-list-row-key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public UserModel(TeacherIdentityServerDbContext dbContext, IDqtApiClient dqtApiC

public DateOnly? DateOfBirth { get; set; }

public string? NationalInsuranceNumber { get; set; }

public string? DqtNationalInsuranceNumber { get; set; }

public string? Trn { get; set; }
Expand Down Expand Up @@ -70,6 +72,7 @@ public async Task<IActionResult> OnGet()
u.LastName,
u.PreferredName,
u.DateOfBirth,
u.NationalInsuranceNumber,
u.Trn,
u.Created,
u.UserType,
Expand Down Expand Up @@ -100,6 +103,7 @@ public async Task<IActionResult> OnGet()
CanChangeDqtRecord = !HaveDqtRecord;
MergedUserIds = user.MergedUserIds;
DateOfBirth = user.DateOfBirth;
NationalInsuranceNumber = user.NationalInsuranceNumber;
EffectiveVerificationLevel = user.EffectiveVerificationLevel;

if (user.Trn is not null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public async Task Get_ValidRequestForUserWithTrn_RendersExpectedContent()
Assert.NotNull(doc.GetElementByTestId("DqtSection"));
Assert.Equal($"{dqtFirstName} {dqtLastName}", doc.GetSummaryListValueForKey("DQT name"));
Assert.Equal(dqtDateOfBirth.ToString("d MMMM yyyy"), doc.GetElementByTestId("DqtSection")?.GetSummaryListValueForKey("Date of birth"));
Assert.Equal("Provided", doc.GetSummaryListValueForKey("National insurance number"));
Assert.Equal(dqtNino, doc.GetSummaryListValueForKey("National insurance number"));
Assert.Equal(user.Trn, doc.GetSummaryListValueForKey("TRN"));
}

Expand Down

0 comments on commit 946cc2b

Please sign in to comment.