From e7bf8976e9d7507b7efefdd42f0b251b14ebf394 Mon Sep 17 00:00:00 2001 From: Idris Abu Date: Thu, 4 Jul 2024 12:18:15 +0100 Subject: [PATCH 1/3] Changes to display enrolment status on the delegate tab --- .../EPR.RegulatorService.Frontend.Web.csproj | 9 +- .../_DelegatedPersons.cy.Designer.cs | 62 +++++++++ .../_DelegatedPersons.cy.resx | 126 ++++++++++++++++++ .../_DelegatedPersons.en.Designer.cs | 61 +++++++++ .../_DelegatedPersons.en.resx | 26 ++++ .../_DelegatedPersons.cshtml | 21 ++- 6 files changed, 302 insertions(+), 3 deletions(-) create mode 100644 src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.Designer.cs create mode 100644 src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.resx create mode 100644 src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.Designer.cs create mode 100644 src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.resx diff --git a/src/EPR.RegulatorService.Frontend.Web/EPR.RegulatorService.Frontend.Web.csproj b/src/EPR.RegulatorService.Frontend.Web/EPR.RegulatorService.Frontend.Web.csproj index fbeee125..a296153b 100644 --- a/src/EPR.RegulatorService.Frontend.Web/EPR.RegulatorService.Frontend.Web.csproj +++ b/src/EPR.RegulatorService.Frontend.Web/EPR.RegulatorService.Frontend.Web.csproj @@ -8,7 +8,7 @@ 8c277499-f889-42f1-b2d9-569b72dd51ae - + S3903 @@ -47,6 +47,13 @@ + + _ApprovedPerson.en.Designer.cs + ResXFileCodeGenerator + + + Designer + diff --git a/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.Designer.cs b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.Designer.cs new file mode 100644 index 00000000..82771663 --- /dev/null +++ b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace EPR.RegulatorService.Frontend.Web.Resources.Views.Shared.Partials { + using System; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class _DelegatedPersons_cy + { + + private static System.Resources.ResourceManager resourceMan; + + private static System.Globalization.CultureInfo resourceCulture; + + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal _DelegatedPersons_cy() { + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Resources.ResourceManager ResourceManager { + get { + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("EPR.RegulatorService.Frontend.Web.Resources.Views.Shared.Partials._ApprovedPerson" + + "_en", typeof(_ApprovedPerson_en).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static string Enrolment_Status_Pending { + get { + return ResourceManager.GetString("Enrolment.Status.Pending", resourceCulture); + } + } + + internal static string Enrolment_Status_Awaiting { + get { + return ResourceManager.GetString("Enrolment.Status.Awaiting", resourceCulture); + } + } + } +} diff --git a/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.resx b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.resx new file mode 100644 index 00000000..bf871728 --- /dev/null +++ b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cy.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + WAPPLICATION PENDING + + + WAPPLICATION AWAITING APPROVAL + + diff --git a/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.Designer.cs b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.Designer.cs new file mode 100644 index 00000000..bc033076 --- /dev/null +++ b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.Designer.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace EPR.RegulatorService.Frontend.Web.Resources.Views.Shared.Partials { + using System; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class _DelegatedPersons_en { + + private static System.Resources.ResourceManager resourceMan; + + private static System.Globalization.CultureInfo resourceCulture; + + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal _DelegatedPersons_en() { + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Resources.ResourceManager ResourceManager { + get { + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("EPR.RegulatorService.Frontend.Web.Resources.Views.Shared.Partials._ApprovedPerson" + + "_en", typeof(_ApprovedPerson_en).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static string Enrolment_Status_Pending { + get { + return ResourceManager.GetString("Enrolment.Status.Pending", resourceCulture); + } + } + + internal static string Enrolment_Status_Awaiting { + get { + return ResourceManager.GetString("Enrolment.Status.Awaiting", resourceCulture); + } + } + } +} diff --git a/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.resx b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.resx new file mode 100644 index 00000000..65772a7e --- /dev/null +++ b/src/EPR.RegulatorService.Frontend.Web/Resources/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.en.resx @@ -0,0 +1,26 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + APPLICATION PENDING + + + APPLICATION AWAITING APPROVAL + + \ No newline at end of file diff --git a/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml b/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml index 71d71625..50a29384 100644 --- a/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml +++ b/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml @@ -1,10 +1,27 @@ -@model List +@using EPR.RegulatorService.Frontend.Core.Enums +@model List @foreach (var user in Model) {
-

@user.FirstName @user.LastName

+ @*

@user.FirstName @user.LastName

*@ +

+ @user.FirstName @user.LastName + @if (user.UserEnrolments.Any(e => + e.EnrolmentStatusId is (int)EnrolmentStatus.Invited or (int)EnrolmentStatus.Nominated)) + { + + @Localizer["Enrolment.Status.Pending"] + + } + @if (user.UserEnrolments.Any(e => e.EnrolmentStatusId == (int)EnrolmentStatus.Pending)) + { + + @Localizer["Enrolment.Status.Awaiting"] + + } +

From 5111ad1d7dcc703cba63a875fe924bc1938a2c02 Mon Sep 17 00:00:00 2001 From: Idris Abu Date: Thu, 11 Jul 2024 10:16:20 +0100 Subject: [PATCH 2/3] Resolution of review comment in _DelegatedPersons.cshtml --- .../Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml b/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml index 50a29384..bad602bd 100644 --- a/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml +++ b/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml @@ -5,7 +5,6 @@ {
- @*

@user.FirstName @user.LastName

*@

@user.FirstName @user.LastName @if (user.UserEnrolments.Any(e => From 74ea9ef37fb71f65a4267fe6f6907397ebfe6b37 Mon Sep 17 00:00:00 2001 From: "Simon Crowder (ext)" <155532504+scdefra@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:36:47 +0100 Subject: [PATCH 3/3] Resolved feedback --- .../Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml b/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml index bad602bd..119433c0 100644 --- a/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml +++ b/src/EPR.RegulatorService.Frontend.Web/Views/Shared/Partials/ManageApprovedUser/_DelegatedPersons.cshtml @@ -8,7 +8,7 @@

@user.FirstName @user.LastName @if (user.UserEnrolments.Any(e => - e.EnrolmentStatusId is (int)EnrolmentStatus.Invited or (int)EnrolmentStatus.Nominated)) + e.EnrolmentStatusId == (int)EnrolmentStatus.Invited || e.EnrolmentStatusId == (int)EnrolmentStatus.Nominated)) { @Localizer["Enrolment.Status.Pending"]