diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml index 7db2feff5..c3e2823f6 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml @@ -73,6 +73,10 @@ Change + + National insurance number + @Model.NationalInsuranceNumber + Date of birth @(Model.DateOfBirth.HasValue ? Model.DateOfBirth.Value.ToString("d MMMM yyyy") : "") @@ -131,7 +135,7 @@ National insurance number - @(!string.IsNullOrEmpty(Model.DqtNationalInsuranceNumber) ? "Provided" : "Not provided") + @Model.DqtNationalInsuranceNumber TRN diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml.cs index 2d56f50bf..b92f95ffe 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/User.cshtml.cs @@ -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; } @@ -70,6 +72,7 @@ public async Task OnGet() u.LastName, u.PreferredName, u.DateOfBirth, + u.NationalInsuranceNumber, u.Trn, u.Created, u.UserType, @@ -100,6 +103,7 @@ public async Task OnGet() CanChangeDqtRecord = !HaveDqtRecord; MergedUserIds = user.MergedUserIds; DateOfBirth = user.DateOfBirth; + NationalInsuranceNumber = user.NationalInsuranceNumber; EffectiveVerificationLevel = user.EffectiveVerificationLevel; if (user.Trn is not null) diff --git a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/EndpointTests/Admin/UserTests.cs b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/EndpointTests/Admin/UserTests.cs index 36a738244..2b5979c97 100644 --- a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/EndpointTests/Admin/UserTests.cs +++ b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/EndpointTests/Admin/UserTests.cs @@ -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.GetElementByTestId("DqtSection")?.GetSummaryListValueForKey("National insurance number")); Assert.Equal(user.Trn, doc.GetSummaryListValueForKey("TRN")); }