diff --git a/DigitalLearningSolutions.Data.Tests/DataServices/UserDataServiceTests.cs b/DigitalLearningSolutions.Data.Tests/DataServices/UserDataServiceTests.cs index 1cf090ee11..c08f4644c5 100644 --- a/DigitalLearningSolutions.Data.Tests/DataServices/UserDataServiceTests.cs +++ b/DigitalLearningSolutions.Data.Tests/DataServices/UserDataServiceTests.cs @@ -367,5 +367,40 @@ public void GetNumberOfActiveApprovedDelegatesAtCentre_returns_expected_count() // Then count.Should().Be(3420); } + + [Test] + public void GetDelegateUserCardsByCentreId_populates_DelegateUser_fields_correctly() + { + // Given + var expected = UserTestHelper.GetDefaultDelegateUser( + dateRegistered: DateTime.Parse("2010-09-22 06:52:09.080"), + jobGroupName: "Nursing / midwifery" + ); + + // When + var userCards = userDataService.GetDelegateUserCardsByCentreId(2); + + // Then + var userCard = userCards.Single(user => user.Id == 2); + userCard.Should().BeEquivalentTo(expected); + userCard.Active.Should().BeTrue(); + userCard.SelfReg.Should().BeFalse(); + userCard.ExternalReg.Should().BeFalse(); + userCard.AdminId.Should().BeNull(); + } + + [Test] + public void GetDelegateUserCardsByCentreId_populates_DelegateUserCard_admin_fields_correctly() + { + // When + var userCards = userDataService.GetDelegateUserCardsByCentreId(279); + + // Then + var userCard = userCards.Single(user => user.Id == 97055); + userCard.Active.Should().BeTrue(); + userCard.SelfReg.Should().BeTrue(); + userCard.ExternalReg.Should().BeFalse(); + userCard.AdminId.Should().Be(74); + } } } diff --git a/DigitalLearningSolutions.Data/DataServices/UserDataService.cs b/DigitalLearningSolutions.Data/DataServices/UserDataService.cs index 71a5a5661e..350d2c62b4 100644 --- a/DigitalLearningSolutions.Data/DataServices/UserDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/UserDataService.cs @@ -12,6 +12,7 @@ public interface IUserDataService public AdminUser? GetAdminUserById(int id); public DelegateUser? GetDelegateUserById(int id); public List GetAdminUsersByCentreId(int centreId); + public List GetDelegateUserCardsByCentreId(int centreId); public AdminUser? GetAdminUserByUsername(string username); public List GetDelegateUsersByUsername(string username); public AdminUser? GetAdminUserByEmailAddress(string emailAddress); @@ -175,6 +176,43 @@ FROM AdminUsers AS au return users; } + public List GetDelegateUserCardsByCentreId(int centreId) + { + return connection.Query( + @"SELECT + cd.CandidateID AS Id, + cd.CandidateNumber, + ct.CentreName, + cd.CentreID, + cd.DateRegistered, + ct.Active AS CentreActive, + cd.EmailAddress, + cd.FirstName, + cd.LastName, + cd.Password, + cd.Approved, + cd.Answer1, + cd.Answer2, + cd.Answer3, + cd.Answer4, + cd.Answer5, + cd.Answer6, + jg.JobGroupName, + cd.SelfReg, + cd.ExternalReg, + cd.Active, + (SELECT AdminID + FROM AdminUsers au + WHERE au.Email = cd.EmailAddress AND au.CentreID = cd.CentreID + ) AS AdminID + FROM Candidates AS cd + INNER JOIN Centres AS ct ON ct.CentreID = cd.CentreID + INNER JOIN JobGroups AS jg ON jg.JobGroupID = cd.JobGroupID + WHERE cd.CentreId = @centreId AND cd.Approved = 1", + new { centreId } + ).ToList(); + } + public AdminUser? GetAdminUserByUsername(string username) { var user = connection.Query( diff --git a/DigitalLearningSolutions.Data/Models/User/DelegateUserCard.cs b/DigitalLearningSolutions.Data/Models/User/DelegateUserCard.cs new file mode 100644 index 0000000000..a59101e3cc --- /dev/null +++ b/DigitalLearningSolutions.Data/Models/User/DelegateUserCard.cs @@ -0,0 +1,10 @@ +namespace DigitalLearningSolutions.Data.Models.User +{ + public class DelegateUserCard : DelegateUser + { + public bool SelfReg { get; set; } + public bool ExternalReg { get; set; } + public bool Active { get; set; } + public int? AdminId { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs b/DigitalLearningSolutions.Web.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs index 056dccd61c..96f4e3b96c 100644 --- a/DigitalLearningSolutions.Web.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs +++ b/DigitalLearningSolutions.Web.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs @@ -1,56 +1,57 @@ -namespace DigitalLearningSolutions.Web.AutomatedUiTests.AccessibilityTests -{ - using DigitalLearningSolutions.Web.AutomatedUiTests.TestHelpers; - using Xunit; - - public class BasicAccessibilityTests : AccessibilityTestsBase - { - public BasicAccessibilityTests(SeleniumServerFactory factory) : base(factory) { } - - [Theory] - [InlineData("/Home/Welcome", "Welcome - Digital Learning Solutions")] - [InlineData("/Home/Products", "Products - Digital Learning Solutions")] - [InlineData("/Home/LearningContent", "Learning Content - Digital Learning Solutions")] - [InlineData("/Login", "Log in")] - [InlineData("/ForgotPassword", "Reset your password")] - [InlineData("/ResetPassword/Error", "Something went wrong...")] - public void Page_has_no_accessibility_errors(string url, string pageTitle) - { - // when - Driver.Navigate().GoToUrl(BaseUrl + url); - - // then - AnalyzePageHeadingAndAccessibility(pageTitle); - } - - [Theory] - [InlineData("/MyAccount", "My account")] - [InlineData("/MyAccount/EditDetails", "Edit details")] - [InlineData("/TrackingSystem/Centre/Administrators", "Centre administrators")] - [InlineData("/TrackingSystem/Centre/Dashboard", "Centre dashboard")] - [InlineData("/TrackingSystem/Centre/Ranking", "Centre ranking")] - [InlineData("/TrackingSystem/Centre/ContractDetails", "Contract details")] - [InlineData("/TrackingSystem/CentreConfiguration", "Centre configuration")] - [InlineData("/TrackingSystem/CentreConfiguration/EditCentreManagerDetails", "Edit centre manager details")] - [InlineData("/TrackingSystem/CentreConfiguration/EditCentreWebsiteDetails", "Edit centre content on DLS website")] - [InlineData("/TrackingSystem/CentreConfiguration/RegistrationPrompts", "Manage delegate registration prompts")] - [InlineData("/TrackingSystem/CentreConfiguration/RegistrationPrompts/1/Remove", "Remove delegate registration prompt")] - [InlineData("/TrackingSystem/Centre/Reports", "Centre reports")] - [InlineData("/TrackingSystem/Centre/TopCourses", "Top courses")] - [InlineData("/TrackingSystem/Delegates/Approve", "Approve delegate registrations")] - [InlineData("/NotificationPreferences", "Notification preferences")] - [InlineData("/NotificationPreferences/Edit/AdminUser", "Update notification preferences")] - [InlineData("/NotificationPreferences/Edit/DelegateUser", "Update notification preferences")] - [InlineData("/ChangePassword", "Change password")] - [InlineData("/TrackingSystem/Support", "Support")] - public void Authenticated_page_has_no_accessibility_errors(string url, string pageTitle) - { - // when - Driver.LogUserInAsAdminAndDelegate(BaseUrl); - Driver.Navigate().GoToUrl(BaseUrl + url); - - // then - AnalyzePageHeadingAndAccessibility(pageTitle); - } - } -} +namespace DigitalLearningSolutions.Web.AutomatedUiTests.AccessibilityTests +{ + using DigitalLearningSolutions.Web.AutomatedUiTests.TestHelpers; + using Xunit; + + public class BasicAccessibilityTests : AccessibilityTestsBase + { + public BasicAccessibilityTests(SeleniumServerFactory factory) : base(factory) { } + + [Theory] + [InlineData("/Home/Welcome", "Welcome - Digital Learning Solutions")] + [InlineData("/Home/Products", "Products - Digital Learning Solutions")] + [InlineData("/Home/LearningContent", "Learning Content - Digital Learning Solutions")] + [InlineData("/Login", "Log in")] + [InlineData("/ForgotPassword", "Reset your password")] + [InlineData("/ResetPassword/Error", "Something went wrong...")] + public void Page_has_no_accessibility_errors(string url, string pageTitle) + { + // when + Driver.Navigate().GoToUrl(BaseUrl + url); + + // then + AnalyzePageHeadingAndAccessibility(pageTitle); + } + + [Theory] + [InlineData("/MyAccount", "My account")] + [InlineData("/MyAccount/EditDetails", "Edit details")] + [InlineData("/TrackingSystem/Centre/Administrators", "Centre administrators")] + [InlineData("/TrackingSystem/Centre/Dashboard", "Centre dashboard")] + [InlineData("/TrackingSystem/Centre/Ranking", "Centre ranking")] + [InlineData("/TrackingSystem/Centre/ContractDetails", "Contract details")] + [InlineData("/TrackingSystem/CentreConfiguration", "Centre configuration")] + [InlineData("/TrackingSystem/CentreConfiguration/EditCentreManagerDetails", "Edit centre manager details")] + [InlineData("/TrackingSystem/CentreConfiguration/EditCentreWebsiteDetails", "Edit centre content on DLS website")] + [InlineData("/TrackingSystem/CentreConfiguration/RegistrationPrompts", "Manage delegate registration prompts")] + [InlineData("/TrackingSystem/CentreConfiguration/RegistrationPrompts/1/Remove", "Remove delegate registration prompt")] + [InlineData("/TrackingSystem/Centre/Reports", "Centre reports")] + [InlineData("/TrackingSystem/Delegates/All", "Delegates")] + [InlineData("/TrackingSystem/Centre/TopCourses", "Top courses")] + [InlineData("/TrackingSystem/Delegates/Approve", "Approve delegate registrations")] + [InlineData("/NotificationPreferences", "Notification preferences")] + [InlineData("/NotificationPreferences/Edit/AdminUser", "Update notification preferences")] + [InlineData("/NotificationPreferences/Edit/DelegateUser", "Update notification preferences")] + [InlineData("/ChangePassword", "Change password")] + [InlineData("/TrackingSystem/Support", "Support")] + public void Authenticated_page_has_no_accessibility_errors(string url, string pageTitle) + { + // when + Driver.LogUserInAsAdminAndDelegate(BaseUrl); + Driver.Navigate().GoToUrl(BaseUrl + url); + + // then + AnalyzePageHeadingAndAccessibility(pageTitle); + } + } +} diff --git a/DigitalLearningSolutions.Web.Tests/ViewModels/TrackingSystem/Delegates/AllDelegates/SearchableDelegateViewModelTests.cs b/DigitalLearningSolutions.Web.Tests/ViewModels/TrackingSystem/Delegates/AllDelegates/SearchableDelegateViewModelTests.cs new file mode 100644 index 0000000000..d0625b03d1 --- /dev/null +++ b/DigitalLearningSolutions.Web.Tests/ViewModels/TrackingSystem/Delegates/AllDelegates/SearchableDelegateViewModelTests.cs @@ -0,0 +1,80 @@ +namespace DigitalLearningSolutions.Web.Tests.ViewModels.TrackingSystem.Delegates.AllDelegates +{ + using System; + using System.Collections.Generic; + using DigitalLearningSolutions.Data.Models.User; + using DigitalLearningSolutions.Web.ViewModels.Common; + using DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates; + using FluentAssertions; + using NUnit.Framework; + + public class SearchableDelegateViewModelTests + { + private readonly List customFields = new List(); + + [Test] + public void SearchableDelegateViewModel_sets_active_tag_name_correctly() + { + // Given + var activeUser = new DelegateUserCard { Active = true }; + var inactiveUser = new DelegateUserCard { Active = false }; + + // When + var activeModel = new SearchableDelegateViewModel(activeUser, customFields); + var inactiveModel = new SearchableDelegateViewModel(inactiveUser, customFields); + + // Then + activeModel.ActiveTagName.Should().Be("Active"); + inactiveModel.ActiveTagName.Should().Be("Inactive"); + } + + [Test] + public void SearchableDelegateViewModel_sets_password_tag_name_correctly() + { + // Given + var pwSetUser = new DelegateUserCard { Password = "pw" }; + var pwNotSetUser = new DelegateUserCard { Password = null }; + + // When + var pwSetModel = new SearchableDelegateViewModel(pwSetUser, customFields); + var pwNotSetModel = new SearchableDelegateViewModel(pwNotSetUser, customFields); + + // Then + pwSetModel.PasswordTagName.Should().Be("Password set"); + pwNotSetModel.PasswordTagName.Should().Be("Password not set"); + } + + [Test] + public void SearchableDelegateViewModel_sets_regstatus_tag_name_correctly() + { + // Given + var selfRegUser = new DelegateUserCard { SelfReg = true, ExternalReg = false }; + var selfRegExternalUser = new DelegateUserCard { SelfReg = true, ExternalReg = true }; + var centreRegUser = new DelegateUserCard { SelfReg = false }; + + // When + var selfRegModel = new SearchableDelegateViewModel(selfRegUser, customFields); + var selfRegExternalModel = new SearchableDelegateViewModel(selfRegExternalUser, customFields); + var centreRegModel = new SearchableDelegateViewModel(centreRegUser, customFields); + + // Then + selfRegModel.RegStatusTagName.Should().Be("Self registered"); + selfRegExternalModel.RegStatusTagName.Should().Be("Self registered (External)"); + centreRegModel.RegStatusTagName.Should().Be("Registered by centre"); + } + + [Test] + public void SearchableDelegateViewModel_sets_reg_date_string_correctly() + { + // Given + var date = new DateTime(2021, 05, 13); + var user = new DelegateUserCard { DateRegistered = date }; + + // When + var model = new SearchableDelegateViewModel(user, customFields); + + // Then + model.RegistrationDate.Should().Be("13/05/2021"); + } + } +} diff --git a/DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates/AllDelegatesController.cs b/DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates/AllDelegatesController.cs new file mode 100644 index 0000000000..ac32c287e9 --- /dev/null +++ b/DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates/AllDelegatesController.cs @@ -0,0 +1,39 @@ +namespace DigitalLearningSolutions.Web.Controllers.TrackingSystem.Delegates +{ + using System.Linq; + using DigitalLearningSolutions.Data.DataServices; + using DigitalLearningSolutions.Web.Helpers; + using DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates; + using Microsoft.AspNetCore.Authorization; + using Microsoft.AspNetCore.Mvc; + + [Authorize(Policy = CustomPolicies.UserCentreAdmin)] + [Route("TrackingSystem/Delegates/All")] + public class AllDelegatesController : Controller + { + private readonly CustomPromptHelper customPromptHelper; + private readonly IUserDataService userDataService; + + public AllDelegatesController(IUserDataService userDataService, CustomPromptHelper customPromptHelper) + { + this.userDataService = userDataService; + this.customPromptHelper = customPromptHelper; + } + + public IActionResult Index() + { + var centreId = User.GetCentreId(); + var delegateUsers = userDataService.GetDelegateUserCardsByCentreId(centreId).Take(10); + var searchableDelegateViewModels = delegateUsers.Select( + delegateUser => + { + var customFields = customPromptHelper.GetCustomFieldViewModelsForCentre(centreId, delegateUser); + return new SearchableDelegateViewModel(delegateUser, customFields); + } + ); + var model = new AllDelegatesViewModel(centreId, searchableDelegateViewModels); + + return View(model); + } + } +} diff --git a/DigitalLearningSolutions.Web/Helpers/CustomPromptHelper.cs b/DigitalLearningSolutions.Web/Helpers/CustomPromptHelper.cs index 9689152191..be5ff28d55 100644 --- a/DigitalLearningSolutions.Web/Helpers/CustomPromptHelper.cs +++ b/DigitalLearningSolutions.Web/Helpers/CustomPromptHelper.cs @@ -2,6 +2,7 @@ { using System.Collections.Generic; using System.Linq; + using DigitalLearningSolutions.Data.Models.User; using DigitalLearningSolutions.Data.Services; using DigitalLearningSolutions.Web.ViewModels.Common; using Microsoft.AspNetCore.Mvc.ModelBinding; @@ -62,6 +63,19 @@ public List GetCustomFieldViewModelsForCentre( ).ToList(); } + public List GetCustomFieldViewModelsForCentre(int centreId, DelegateUser delegateUser) + { + return GetCustomFieldViewModelsForCentre( + centreId, + delegateUser.Answer1, + delegateUser.Answer2, + delegateUser.Answer3, + delegateUser.Answer4, + delegateUser.Answer5, + delegateUser.Answer6 + ); + } + public void ValidateCustomPrompts( int centreId, string? answer1, diff --git a/DigitalLearningSolutions.Web/Styles/trackingSystem/allDelegates.scss b/DigitalLearningSolutions.Web/Styles/trackingSystem/allDelegates.scss new file mode 100644 index 0000000000..228a4d421a --- /dev/null +++ b/DigitalLearningSolutions.Web/Styles/trackingSystem/allDelegates.scss @@ -0,0 +1,29 @@ +@import "~nhsuk-frontend/packages/core/all"; + +.all-delegates-button-group { + text-align: right; + + @media (max-width: 1024px) { + width: 100%; + text-align: unset; + margin-bottom: nhsuk-spacing(4); + } +} + +.all-delegates-button { + padding-top: nhsuk-spacing(2); + padding-bottom: nhsuk-spacing(2); + + @media (max-width: 1024px) { + margin-top: nhsuk-spacing(1); + margin-bottom: nhsuk-spacing(1); + } + + @media (max-width: 425px) { + width: calc(50% - 4px); + } + + @media (max-width: 375px) { + width: 100%; + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Delegates/AllDelegatesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Delegates/AllDelegatesViewModel.cs new file mode 100644 index 0000000000..dd2045ce83 --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Delegates/AllDelegatesViewModel.cs @@ -0,0 +1,19 @@ +namespace DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates +{ + using System.Collections.Generic; + + public class AllDelegatesViewModel + { + public AllDelegatesViewModel( + int centreId, + IEnumerable searchableDelegateViewModels + ) + { + CentreId = centreId; + Delegates = searchableDelegateViewModels; + } + + public int CentreId { get; set; } + public IEnumerable Delegates { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Delegates/SearchableDelegateViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Delegates/SearchableDelegateViewModel.cs new file mode 100644 index 0000000000..ad10620c25 --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Delegates/SearchableDelegateViewModel.cs @@ -0,0 +1,59 @@ +namespace DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates +{ + using System.Collections.Generic; + using System.Globalization; + using DigitalLearningSolutions.Data.Models.User; + using DigitalLearningSolutions.Web.ViewModels.Common; + + /* TODO: Search and sort functionality is part of HEEDLS-491. + Filename includes 'Searchable' to avoid having to change name later */ + + public class SearchableDelegateViewModel + { + public SearchableDelegateViewModel(DelegateUserCard delegateUser, List customFields) + { + Id = delegateUser.Id; + Name = delegateUser.SearchableName; + CandidateNumber = delegateUser.CandidateNumber; + + IsSelfReg = delegateUser.SelfReg; + IsExternalReg = delegateUser.ExternalReg; + IsActive = delegateUser.Active; + IsAdmin = delegateUser.AdminId.HasValue; + IsPasswordSet = delegateUser.Password != null; + + Email = delegateUser.EmailAddress; + JobGroup = delegateUser.JobGroupName; + if (delegateUser.DateRegistered.HasValue) + { + CultureInfo originalCulture = CultureInfo.CurrentCulture; + CultureInfo.CurrentCulture = new CultureInfo("en-GB"); + RegistrationDate = delegateUser.DateRegistered.Value.ToShortDateString(); + CultureInfo.CurrentCulture = originalCulture; + } + + CustomFields = customFields; + } + + public int Id { get; set; } + public string Name { get; set; } + public string CandidateNumber { get; set; } + + public bool IsSelfReg { get; set; } + public bool IsExternalReg { get; set; } + public bool IsActive { get; set; } + public bool IsAdmin { get; set; } + public bool IsPasswordSet { get; set; } + + public string RegStatusTagName => + IsSelfReg ? "Self registered" + (IsExternalReg ? " (External)" : "") : "Registered by centre"; + public string ActiveTagName => IsActive ? "Active" : "Inactive"; + public string PasswordTagName => IsPasswordSet ? "Password set" : "Password not set"; + + public string? Email { get; set; } + public string? JobGroup { get; set; } + public string? RegistrationDate { get; set; } + + public List CustomFields { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Dashboard/_DashboardTopCardGroup.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Dashboard/_DashboardTopCardGroup.cshtml index a0b7734af3..f415858e76 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Dashboard/_DashboardTopCardGroup.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Dashboard/_DashboardTopCardGroup.cshtml @@ -12,7 +12,7 @@

@Model.NumberOfDelegates Delegates

- Delegates + Delegates diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/AllDelegates/Index.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/AllDelegates/Index.cshtml new file mode 100644 index 0000000000..00e6641f16 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/AllDelegates/Index.cshtml @@ -0,0 +1,68 @@ +@inject IConfiguration Configuration +@using DigitalLearningSolutions.Web.Models.Enums +@using DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates +@using Microsoft.Extensions.Configuration +@model AllDelegatesViewModel + + + +@{ + ViewData["Title"] = "Delegates"; + ViewData["Application"] = "Tracking System"; + ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/TrackingSystem/Centre/Dashboard"; + ViewData["HeaderPathName"] = "Tracking System"; +} + +@section NavMenuItems { + +} + +
+
+ +
+ +
+ + +
+
+ @if (!Model.Delegates.Any()) { + + } else { +
+ @foreach (var delegateModel in Model.Delegates) { + + } +
+ } +
+
+ + +
+
diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/AllDelegates/_SearchableDelegateCard.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/AllDelegates/_SearchableDelegateCard.cshtml new file mode 100644 index 0000000000..d0bacf2832 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/AllDelegates/_SearchableDelegateCard.cshtml @@ -0,0 +1,68 @@ +@using DigitalLearningSolutions.Web.ViewModels.Common +@using DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates +@model SearchableDelegateViewModel +@{ + var activeTagCss = Model.IsActive ? "nhsuk-tag nhsuk-tag--green" : "nhsuk-tag nhsuk-tag--red"; + var passwordTagCss = Model.IsPasswordSet ? "nhsuk-tag nhsuk-tag--green" : "nhsuk-tag nhsuk-tag--red"; +} + +@*TODO: Search and sort functionality is part of HEEDLS-491. + Filename includes 'Searchable' to avoid having to change name later*@ + +
+
+ + + @Model.Name (@Model.CandidateNumber) + + + +
+
+ @(Model.ActiveTagName) + @(Model.RegStatusTagName) + @(Model.PasswordTagName) + @if (Model.IsAdmin) { + Admin + } +
+ +
+
+
Name
+
@Model.Name
+
+ +
+
Email
+
@Model.Email
+
+ +
+
ID
+
@Model.CandidateNumber
+
+ +
+
Registration date
+
@Model.RegistrationDate
+
+ +
+
Job group
+
@Model.JobGroup
+
+ + @foreach (CustomFieldViewModel customField in Model.CustomFields) { +
+
@customField.CustomPrompt
+
@customField.Answer
+
+ } +
+ + Manage delegate + Set password +
+
+
diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/Shared/_DelegatesSideNavMenu.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/Shared/_DelegatesSideNavMenu.cshtml index 4cb7a51564..e73d03900b 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/Shared/_DelegatesSideNavMenu.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/Shared/_DelegatesSideNavMenu.cshtml @@ -7,8 +7,9 @@

Delegates

    - diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Shared/_NavMenuItems.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Shared/_NavMenuItems.cshtml index efcf472149..78863eda52 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Shared/_NavMenuItems.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Shared/_NavMenuItems.cshtml @@ -7,19 +7,19 @@
  • Centre - +
  • - + Delegates - +
  • Course setup - +
  • } @@ -27,7 +27,7 @@
  • Admin - +
  • }