From 4bee6a8e2f18e495be860852af0d5a35a06be013 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Fri, 20 Mar 2026 14:55:05 +0000 Subject: [PATCH] TD-6874: Implement GovNotify History in LH Admin UI --- .../GovNotifyDashboardController.cs | 120 ++++++++++++++++ .../Interfaces/IGovNotifyDashboardService.cs | 27 ++++ .../LearningHub.Nhs.AdminUI.csproj | 2 +- .../ServiceCollectionExtension.cs | 1 + .../Services/GovNotifyDashboardService.cs | 130 ++++++++++++++++++ .../Views/GovNotifyDashboard/Details.cshtml | 80 +++++++++++ .../Views/GovNotifyDashboard/Index.cshtml | 67 +++++++++ .../Views/Shared/_NavPartial.cshtml | 1 + .../Views/Shared/_NavSection.cshtml | 2 + ...rningHub.Nhs.WebUI.AutomatedUiTests.csproj | 2 +- .../LearningHub.Nhs.WebUI.csproj | 2 +- ...ngHub.Nhs.MessageQueueing.Database.sqlproj | 2 + .../GetAllMessageRequests.sql | 129 +++++++++++++++++ .../GetMessageRequestById.sql | 24 ++++ .../EntityFramework/MessageQueueDbContext.cs | 5 + .../LearningHub.Nhs.MessageQueueing.csproj | 2 +- .../Repositories/IMessageQueueRepository.cs | 19 +++ .../Repositories/MessageQueueRepository.cs | 46 ++++++- .../LearningHub.Nhs.MessagingService.csproj | 2 +- .../LearningHub.Nhs.OpenApi.Models.csproj | 2 +- ....Nhs.OpenApi.Repositories.Interface.csproj | 2 +- ...earningHub.Nhs.OpenApi.Repositories.csproj | 2 +- ...gHub.Nhs.OpenApi.Services.Interface.csproj | 2 +- .../Services/Messaging/IGovMessageService.cs | 18 ++- .../LearningHub.Nhs.OpenApi.Services.csproj | 2 +- .../Services/Messaging/GovMessageService.cs | 34 ++++- .../LearningHub.Nhs.OpenApi.Tests.csproj | 2 +- .../GovNotifyMessagingController.cs | 36 ++++- .../LearningHub.NHS.OpenAPI.csproj | 2 +- ...ub.Nhs.ReportApi.Services.Interface.csproj | 2 +- ...ub.Nhs.ReportApi.Services.UnitTests.csproj | 2 +- .../LearningHub.Nhs.ReportApi.Services.csproj | 2 +- .../LearningHub.Nhs.ReportApi.Shared.csproj | 2 +- .../LearningHub.Nhs.ReportApi.csproj | 2 +- .../LearningHub.Nhs.Api.csproj | 2 +- .../LearningHub.Nhs.Api.Shared.csproj | 2 +- .../LearningHub.Nhs.Api.UnitTests.csproj | 2 +- ...earningHub.Nhs.Repository.Interface.csproj | 2 +- .../LearningHub.Nhs.Repository.csproj | 2 +- .../LearningHub.Nhs.Services.Interface.csproj | 2 +- .../LearningHub.Nhs.Services.UnitTests.csproj | 2 +- .../LearningHub.Nhs.Services.csproj | 2 +- ...earningHub.Nhs.Migration.ConsoleApp.csproj | 2 +- ...LearningHub.Nhs.Migration.Interface.csproj | 2 +- .../LearningHub.Nhs.Migration.Models.csproj | 2 +- ...ub.Nhs.Migration.Staging.Repository.csproj | 2 +- ...LearningHub.Nhs.Migration.UnitTests.csproj | 2 +- .../LearningHub.Nhs.Migration.csproj | 2 +- 48 files changed, 757 insertions(+), 46 deletions(-) create mode 100644 AdminUI/LearningHub.Nhs.AdminUI/Controllers/GovNotifyDashboardController.cs create mode 100644 AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IGovNotifyDashboardService.cs create mode 100644 AdminUI/LearningHub.Nhs.AdminUI/Services/GovNotifyDashboardService.cs create mode 100644 AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Details.cshtml create mode 100644 AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Index.cshtml create mode 100644 MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetAllMessageRequests.sql create mode 100644 MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetMessageRequestById.sql diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/GovNotifyDashboardController.cs b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/GovNotifyDashboardController.cs new file mode 100644 index 000000000..d6826bcd2 --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/GovNotifyDashboardController.cs @@ -0,0 +1,120 @@ +using LearningHub.Nhs.AdminUI.Configuration; +using LearningHub.Nhs.AdminUI.Extensions; +using LearningHub.Nhs.AdminUI.Interfaces; +using LearningHub.Nhs.Models.Paging; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Linq; +using System; +using System.Threading.Tasks; +using LearningHub.Nhs.Models.GovNotifyMessaging; + +namespace LearningHub.Nhs.AdminUI.Controllers +{ + /// + /// Defines the . + /// + public class GovNotifyDashboardController : BaseController + { + /// + /// Defines the websettings. + /// + private readonly IOptions websettings; + + /// + /// Defines the govNotifyDashboardService. + /// + private IGovNotifyDashboardService govNotifyDashboardService; + + /// + /// Initializes a new instance of the class. + /// + /// The hostingEnvironment. + /// The govNotifyDashboardService. + /// The websettings. + public GovNotifyDashboardController(IWebHostEnvironment hostingEnvironment, + IGovNotifyDashboardService govNotifyDashboardService, + IOptions websettings) + : base(hostingEnvironment) + { + this.websettings = websettings; + this.govNotifyDashboardService = govNotifyDashboardService; + } + + /// + /// Initial call to get paginated result. + /// + /// The . + public async Task Index() + { + return await this.GetMessageRequests( + new PagingRequestModel + { + Page = 1, + PageSize = this.websettings.Value.DefaultPageSize, + SortColumn = "CreatedAt", + SortDirection = "D", + }); + } + + /// + /// Get paginated result based on the filters. + /// + /// + /// The . + [HttpPost] + public async Task Index(string pagingRequestModel) + { + var requestModel = JsonConvert.DeserializeObject(pagingRequestModel); + return await this.GetMessageRequests(requestModel); + } + + /// + /// Get message request details by id. + /// + /// + /// The . + [HttpGet] + public async Task Details(int id) + { + var notification = await this.govNotifyDashboardService.GetMessageRequestById(id); + return this.View(notification); + } + + private async Task GetMessageRequests(PagingRequestModel requestModel) + { + requestModel.Sanitize(); + requestModel.PageSize = this.websettings.Value.DefaultPageSize; + + var model = new TablePagingViewModel + { + Results = await this.govNotifyDashboardService.GetPagedAsync(requestModel), + SortColumn = requestModel.SortColumn, + SortDirection = requestModel.SortDirection, + Filter = requestModel.Filter, + }; + + model.Paging = new PagingViewModel + { + CurrentPage = requestModel.Page, + HasItems = model.Results.Items.Any(), + PageSize = this.websettings.Value.DefaultPageSize, + TotalItems = model.Results.TotalItemCount, + }; + + model.ListPageHeader = new ListPageHeaderViewModel + { + TotalItemCount = model.Results.TotalItemCount, + DisplayedCount = model.Results.Items.Count(), + DefaultPageSize = this.websettings.Value.DefaultPageSize, + FilterCount = model.Filter != null ? model.Filter.Count() : 0, + CreateRequired = false, + }; + + return this.View(model); + } + } +} diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IGovNotifyDashboardService.cs b/AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IGovNotifyDashboardService.cs new file mode 100644 index 000000000..0a5368a13 --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IGovNotifyDashboardService.cs @@ -0,0 +1,27 @@ +namespace LearningHub.Nhs.AdminUI.Interfaces +{ + using LearningHub.Nhs.Models.Common; + using LearningHub.Nhs.Models.GovNotifyMessaging; + using LearningHub.Nhs.Models.Paging; + using System.Threading.Tasks; + + /// + /// Defines the . + /// + public interface IGovNotifyDashboardService + { + /// + /// The GetPagedAsync. + /// + /// The pagingRequestModel. + /// The . + Task> GetPagedAsync(PagingRequestModel pagingRequestModel); + + /// + /// Get Message Request By Id. + /// + /// id. + /// The . + Task GetMessageRequestById(int id); + } +} diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index a8f070053..a868c30dd 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -89,7 +89,7 @@ - + diff --git a/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs b/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs index 9137a55e7..f6e098c3e 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs @@ -107,6 +107,7 @@ public static void ConfigureServices(this IServiceCollection services, IConfigur services.AddTransient(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); // Configure Azure Search services.Configure(configuration.GetSection("AzureSearch")); diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Services/GovNotifyDashboardService.cs b/AdminUI/LearningHub.Nhs.AdminUI/Services/GovNotifyDashboardService.cs new file mode 100644 index 000000000..e82a1c468 --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/Services/GovNotifyDashboardService.cs @@ -0,0 +1,130 @@ +using LearningHub.Nhs.AdminUI.Interfaces; +using LearningHub.Nhs.Models.Common; +using LearningHub.Nhs.Models.Paging; +using Newtonsoft.Json; +using System.Threading.Tasks; +using System; +using LearningHub.Nhs.Models.GovNotifyMessaging; +using Newtonsoft.Json.Converters; +using System.Collections.Generic; + +namespace LearningHub.Nhs.AdminUI.Services +{ + /// + /// Defines the . + /// + public class GovNotifyDashboardService: BaseService, IGovNotifyDashboardService + { + /// + /// Initializes a new instance of the class. + /// + /// + /// + public GovNotifyDashboardService(ILearningHubHttpClient learningHubHttpClient, IOpenApiHttpClient openApiHttpClient) + :base(learningHubHttpClient, openApiHttpClient) + { + } + + /// + /// The GetPagedAsync. + /// + /// The pagingRequestModel. + /// The . + public async Task> GetPagedAsync(PagingRequestModel pagingRequestModel) + { + try + { + PagedResultSet viewmodel = null; + var sortDirection = " "; + + if (string.IsNullOrEmpty(pagingRequestModel.SortColumn)) + { + pagingRequestModel.SortColumn = " "; + } + + if (string.IsNullOrEmpty(pagingRequestModel.SortDirection)) + { + pagingRequestModel.SortDirection = " "; + } + else + { + sortDirection = pagingRequestModel.SortDirection == "A" ? "ASC" : + pagingRequestModel.SortDirection == "D" ? "DESC" : "ASC"; + } + + var settings = new JsonSerializerSettings + { + Converters = new List + { + new StringEnumConverter() + } + }; + + var filter = JsonConvert.SerializeObject(pagingRequestModel.Filter, settings); + var client = await this.OpenApiHttpClient.GetClientAsync(); + + var request = $"GovNotifyMessage/GetMessageRequests" + + $"/{pagingRequestModel.Page}" + + $"/{pagingRequestModel.PageSize}" + + $"/{pagingRequestModel.SortColumn}" + + $"/{sortDirection}" + +$"/{Uri.EscapeDataString(filter)}"; + + var response = await client.GetAsync(request).ConfigureAwait(false); + + if (response.IsSuccessStatusCode) + { + var result = response.Content.ReadAsStringAsync().Result; + viewmodel = JsonConvert.DeserializeObject>(result); + } + else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized + || + response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + throw new Exception("AccessDenied"); + } + + return viewmodel; + } + catch (Exception ex) + { + return null; + } + } + + /// + /// Get message request details by id. + /// + /// id. + /// The . + public async Task GetMessageRequestById(int id) + { + try + { + MessageRequestViewModel viewmodel = null; + var client = await this.OpenApiHttpClient.GetClientAsync(); + + var request = $"GovNotifyMessage/GetMessageRequestById/{id}"; + var response = await client.GetAsync(request).ConfigureAwait(false); + + if (response.IsSuccessStatusCode) + { + var result = response.Content.ReadAsStringAsync().Result; + viewmodel = JsonConvert.DeserializeObject(result); + } + else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized + || + response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + throw new Exception("AccessDenied"); + } + + return viewmodel; + } + catch (Exception ex) + { + return null; + } + } + } +} diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Details.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Details.cshtml new file mode 100644 index 000000000..fcffc0eae --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Details.cshtml @@ -0,0 +1,80 @@ +@model LearningHub.Nhs.Models.GovNotifyMessaging.MessageRequestViewModel +@using LearningHub.Nhs.AdminUI.Services + +@{ + ViewData["Title"] = "Details"; +} +@section SideMenu { + @{ + await Html.RenderPartialAsync("_NavSection"); + } +} + +
+ +
+
+
ID @Model.Id
+
+
+ Recipient +
+
+ @Html.DisplayFor(model => model.Recipient) +
+
+ Request type +
+
+ @Html.DisplayFor(model => model.RequestType) +
+
+ Request status +
+
+ @Html.DisplayFor(model => model.RequestStatus) +
+
+ Retry count +
+
+ @Html.DisplayFor(model => model.RetryCount) +
+
+ Created date +
+
+ @Html.DisplayFor(model => model.CreatedAt) +
+
+ Deliver after date +
+
+ @Html.DisplayFor(model => model.DeliverAfter) +
+
+ Sent Date +
+
+ @Html.DisplayFor(model => model.SentAt) +
+
+ Last attempt date +
+
+ @Html.DisplayFor(model => model.LastAttemptAt) +
+
+ Error message +
+
+ @Html.Raw(OutputSanitizer.SanitizeOutputHtml(Model.ErrorMessage)) +
+
+
+
+ +
+ diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Index.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Index.cshtml new file mode 100644 index 000000000..a1a83b1b4 --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/GovNotifyDashboard/Index.cshtml @@ -0,0 +1,67 @@ +@using LearningHub.Nhs.Models.GovNotifyMessaging +@using LearningHub.Nhs.Models.Enums +@using LearningHub.Nhs.AdminUI.Controllers +@model LearningHub.Nhs.Models.Paging.TablePagingViewModel + +@{ + ViewData["Title"] = "GovNotify Dashboard"; + ViewData["CurrentPage"] = Model.Paging.CurrentPage; +} + +@section SideMenu { + @{ + await Html.RenderPartialAsync("_NavSection"); + } +} +@{ + await Html.RenderPartialAsync("_ListPageHeader", Model.ListPageHeader); +} + +
+ + + + + + + + + + + + + @if (Model.Paging.HasItems) + { + foreach (var request in Model.Results.Items) + { + + + + + + + + + } + } + +
IdRequestTypeRecipientRequestStatusRetryCountCreated Date
@request.Id@request.RequestType + @Html.ActionLink(request.Recipient, "Details", new { id = request.Id }) + @request.RequestStatus@request.RetryCount@request.CreatedAt.LocalDateTime.ToString("dd/MM/yyyy HH:mm:ss")
+
+@{ + await Html.RenderPartialAsync("_PagingControls", Model.Paging); +} + + +@section Scripts { + + +} \ No newline at end of file diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavPartial.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavPartial.cshtml index 6a6e66a26..4373eb821 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavPartial.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavPartial.cshtml @@ -13,6 +13,7 @@ switch (controller) { case "notifications": + case "govnotifydashboard": case "externalsystem": case "log": case "roadmap": diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavSection.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavSection.cshtml index 924c58475..3285d08db 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavSection.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_NavSection.cshtml @@ -5,6 +5,7 @@ switch (controller) { case "notifications": + case "govnotifydashboard": case "externalsystem": case "log": case "release": @@ -45,6 +46,7 @@
  • Release management
  • Cache management
  • Service updates and releases
  • +
  • GovNotify Dashboard
  • break; case "users": diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj index 23b92859c..fe1c6b73b 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj index f0521282a..1da7ce929 100644 --- a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj +++ b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj @@ -112,7 +112,7 @@ - + diff --git a/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/LearningHub.Nhs.MessageQueueing.Database.sqlproj b/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/LearningHub.Nhs.MessageQueueing.Database.sqlproj index 36694de1f..502e072a3 100644 --- a/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/LearningHub.Nhs.MessageQueueing.Database.sqlproj +++ b/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/LearningHub.Nhs.MessageQueueing.Database.sqlproj @@ -73,6 +73,8 @@ + + diff --git a/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetAllMessageRequests.sql b/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetAllMessageRequests.sql new file mode 100644 index 000000000..a6ce589dc --- /dev/null +++ b/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetAllMessageRequests.sql @@ -0,0 +1,129 @@ +------------------------------------------------------------------------------- +-- Author Arunima George +-- Created 18-03-2026 +-- Purpose Get paginated message requests. +-- +-- Modification History +-- +-- 18-03-2026 Arunima George Initial Revision +------------------------------------------------------------------------------- + +CREATE PROCEDURE [dbo].[GetAllMessageRequests] + @offSet int, + @fetchRows int, + @SortColumn NVARCHAR(50) = 'CreatedAt', + @SortDirection NVARCHAR(4) = 'DESC', + @Filters NVARCHAR(MAX) = NULL, + @totalCount INT OUTPUT +AS +BEGIN +SET NOCOUNT ON; + +IF @SortColumn NOT IN ( +'Id','RequestType','Recipient','RequestStatus', +'RetryCount','CreatedAt' +) +SET @SortColumn = 'CreatedAt' + +IF @SortDirection NOT IN ('ASC','DESC') +SET @SortDirection = 'DESC' + +IF @Filters IS NULL OR @Filters = '' OR @Filters = 'null' +BEGIN + SET @Filters = '[]' +END + +DECLARE @WhereClause NVARCHAR(MAX) = '' + +------------------------------------------------ +-- Build WHERE clause from JSON filters +------------------------------------------------ + +SELECT @WhereClause = +STRING_AGG( + CASE + WHEN FilterType = 'Text' + THEN QUOTENAME(ColumnName) + ' LIKE ''%' + FilterValue + '%''' + + WHEN FilterType = 'Number' + THEN + CASE ColumnName + WHEN 'Id' THEN 'qr.Id' + WHEN 'RetryCount' THEN 'qr.RetryCount' + END + + ' = ' + FilterValue + + WHEN FilterType = 'Date' + THEN + CASE ColumnName + WHEN 'CreatedAt' THEN + 'qr.CreatedAt >= ''' + FilterValue + ''' AND qr.CreatedAt < DATEADD(DAY,1,''' + FilterValue + ''')' + END + + ELSE NULL + END +,' AND ') +FROM OPENJSON(@Filters) +WITH +( + ColumnName NVARCHAR(50) '$.Column', + FilterType NVARCHAR(50) '$.Type', + FilterValue NVARCHAR(200) '$.Value' +) + +------------------------------------------------ +-- Base Query +------------------------------------------------ + +DECLARE @SQL NVARCHAR(MAX) + +SET @SQL = ' +SELECT + qr.Id, + rt.RequestType, + qr.Recipient, + rs.RequestStatus, + qr.RetryCount, + qr.CreatedAt, + qr.DeliverAfter, + qr.SentAt, + qr.LastAttemptAt, + qr.ErrorMessage +FROM QueueRequests qr +JOIN RequestType rt ON qr.RequestTypeId = rt.Id +JOIN RequestStatus rs ON qr.Status = rs.Id +' + +IF @WhereClause IS NOT NULL AND LEN(@WhereClause) > 0 +BEGIN + SET @SQL = @SQL + ' WHERE ' + @WhereClause +END + + +------------------------------------------------ +-- Total Count +------------------------------------------------ + +DECLARE @CountSQL NVARCHAR(MAX) + +SET @CountSQL = 'SELECT @TotalCount = COUNT(*) FROM (' + @SQL + ') A' + +EXEC sp_executesql +@CountSQL, +N'@TotalCount INT OUTPUT', +@TotalCount OUTPUT + + +------------------------------------------------ +-- Pagination Query +------------------------------------------------ + +SET @SQL = @SQL + ' + ORDER BY ' + QUOTENAME(@SortColumn) + ' ' + @SortDirection + ' + OFFSET ' + CAST(@Offset AS NVARCHAR) + ' ROWS + FETCH NEXT ' + CAST(@fetchRows AS NVARCHAR) + ' ROWS ONLY' + +EXEC(@SQL) + +END +GO diff --git a/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetMessageRequestById.sql b/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetMessageRequestById.sql new file mode 100644 index 000000000..03ade3260 --- /dev/null +++ b/MessageQueueing/LearningHub.Nhs.MessageQueueing.Database/Stored Procedures/GetMessageRequestById.sql @@ -0,0 +1,24 @@ +------------------------------------------------------------------------------- +-- Author Arunima George +-- Created 18-03-2026 +-- Purpose To get message request details by id. +-- +-- Modification History +-- +-- 18-03-2026 Arunima George Initial Revision +------------------------------------------------------------------------------- + +CREATE PROCEDURE [dbo].[GetMessageRequestById] +@id int +AS +BEGIN +SET NOCOUNT ON; + select qr.Id,rt.RequestType,Recipient,rs.RequestStatus,RetryCount,CreatedAt,DeliverAfter,SentAt,LastAttemptAt,ErrorMessage + from dbo.QueueRequests qr + left join RequestType as rt on rt.Id = qr.RequestTypeId + left join RequestStatus as rs on rs.Id = qr.Status + where qr.Id = @Id + + +END +GO diff --git a/MessageQueueing/LearningHub.Nhs.MessageQueueing/EntityFramework/MessageQueueDbContext.cs b/MessageQueueing/LearningHub.Nhs.MessageQueueing/EntityFramework/MessageQueueDbContext.cs index f6c1d5870..d889ebf3f 100644 --- a/MessageQueueing/LearningHub.Nhs.MessageQueueing/EntityFramework/MessageQueueDbContext.cs +++ b/MessageQueueing/LearningHub.Nhs.MessageQueueing/EntityFramework/MessageQueueDbContext.cs @@ -35,5 +35,10 @@ public MessageQueueDbContextOptions Options /// Gets or sets the PendingMessageRequests. /// public virtual DbSet PendingMessageRequests { get; set; } + + /// + /// Gets or sets the MessageRequestViewModel. + /// + public virtual DbSet MessageRequestViewModel { get; set; } } } diff --git a/MessageQueueing/LearningHub.Nhs.MessageQueueing/LearningHub.Nhs.MessageQueueing.csproj b/MessageQueueing/LearningHub.Nhs.MessageQueueing/LearningHub.Nhs.MessageQueueing.csproj index 2b17c70d3..a304ded70 100644 --- a/MessageQueueing/LearningHub.Nhs.MessageQueueing/LearningHub.Nhs.MessageQueueing.csproj +++ b/MessageQueueing/LearningHub.Nhs.MessageQueueing/LearningHub.Nhs.MessageQueueing.csproj @@ -7,7 +7,7 @@ - + diff --git a/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/IMessageQueueRepository.cs b/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/IMessageQueueRepository.cs index 825b61972..2685e4009 100644 --- a/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/IMessageQueueRepository.cs +++ b/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/IMessageQueueRepository.cs @@ -2,6 +2,7 @@ { using System.Collections.Generic; using System.Threading.Tasks; + using LearningHub.Nhs.Models.Common; using LearningHub.Nhs.Models.Entities.GovNotifyMessaging; using LearningHub.Nhs.Models.GovNotifyMessaging; @@ -43,5 +44,23 @@ public interface IMessageQueueRepository /// The email request. /// The . Task SaveSingleEmailTransactions(SingleEmailRequest request); + + /// + /// The GetPaginatedMessageRequests. + /// + /// offSet count. + /// fetchRows count. + /// sort column. + /// sort direction. + /// filter. + /// The . + Task> GetPaginatedMessageRequests(int? offSet, int? fetchRows, string sortColumn, string sortDirection, string filter); + + /// + /// Get Message Request By Id. + /// + /// id. + /// The . + Task GetMessageRequestById(int id); } } diff --git a/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/MessageQueueRepository.cs b/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/MessageQueueRepository.cs index 2089c41fa..071e6f364 100644 --- a/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/MessageQueueRepository.cs +++ b/MessageQueueing/LearningHub.Nhs.MessageQueueing/Repositories/MessageQueueRepository.cs @@ -3,9 +3,12 @@ using System; using System.Collections.Generic; using System.Data; + using System.Linq; using System.Threading.Tasks; + using AutoMapper; using LearningHub.Nhs.MessageQueueing.EntityFramework; using LearningHub.Nhs.MessageQueueing.Helpers; + using LearningHub.Nhs.Models.Common; using LearningHub.Nhs.Models.Entities.GovNotifyMessaging; using LearningHub.Nhs.Models.GovNotifyMessaging; using Microsoft.Data.SqlClient; @@ -17,14 +20,17 @@ public class MessageQueueRepository : IMessageQueueRepository { private readonly MessageQueueDbContext dbContext; + private readonly IMapper mapper; /// /// Initializes a new instance of the class. /// /// The context. - public MessageQueueRepository(MessageQueueDbContext dbContext) + /// mapper. + public MessageQueueRepository(MessageQueueDbContext dbContext, IMapper mapper) { this.dbContext = dbContext; + this.mapper = mapper; } /// @@ -88,5 +94,43 @@ public async Task SaveSingleEmailTransactions(SingleEmailRequest request) var param4 = new SqlParameter("@p4", SqlDbType.NVarChar) { Value = request.ErrorMessage == null ? DBNull.Value : request.ErrorMessage }; await this.dbContext.Database.ExecuteSqlRawAsync("dbo.SaveSingleEmailTransactions @p0, @p1, @p2, @p3, @p4", param0, param1, param2, param3, param4); } + + /// + /// The Get Paginated MessageRequests. + /// + /// offset count. + /// fetch rows. + /// sort column. + /// sort direction. + /// filter. + /// The . + public async Task> GetPaginatedMessageRequests(int? offSet, int? fetchRows, string sortColumn, string sortDirection, string filter) + { + var result = new PagedResultSet(); + var param0 = new SqlParameter("@offSet", SqlDbType.Int) { Value = offSet }; + var param1 = new SqlParameter("@fetchRows", SqlDbType.Int) { Value = fetchRows }; + var param2 = new SqlParameter("@sortColumn", SqlDbType.Text) { Value = sortColumn }; + var param3 = new SqlParameter("@sortDirection", SqlDbType.Text) { Value = sortDirection }; + var param4 = new SqlParameter("@filter", SqlDbType.Text) { Value = filter }; + var param5 = new SqlParameter("@totalCount", SqlDbType.Int) { Direction = ParameterDirection.Output }; + var requests = await this.dbContext.MessageRequestViewModel.FromSqlRaw("dbo.GetAllMessageRequests @offSet,@fetchRows,@sortColumn,@sortDirection,@filter,@totalCount output ", param0, param1, param2, param3, param4, param5) + .AsNoTracking().ToListAsync(); + result.TotalItemCount = (int)param5.Value; + result.Items = mapper.Map>(requests); + return result; + } + + /// + /// Get Message Request By Id. + /// + /// id. + /// The . + public async Task GetMessageRequestById(int id) + { + var param0 = new SqlParameter("@id", SqlDbType.Int) { Value = id }; + var result = await this.dbContext.MessageRequestViewModel.FromSqlRaw("dbo.GetMessageRequestById @id", param0).AsNoTracking().ToListAsync(); + MessageRequestViewModel messageRequestViewModel = result.AsEnumerable().FirstOrDefault(); + return messageRequestViewModel; + } } } diff --git a/MessagingService/LearningHub.Nhs.MessagingService/LearningHub.Nhs.MessagingService.csproj b/MessagingService/LearningHub.Nhs.MessagingService/LearningHub.Nhs.MessagingService.csproj index b8d67123b..c1bef3c93 100644 --- a/MessagingService/LearningHub.Nhs.MessagingService/LearningHub.Nhs.MessagingService.csproj +++ b/MessagingService/LearningHub.Nhs.MessagingService/LearningHub.Nhs.MessagingService.csproj @@ -8,7 +8,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj index ae9a622e6..50dba8227 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj @@ -17,7 +17,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj index acfceeb83..e9ab9a72c 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj @@ -17,7 +17,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj index 33302f623..e1944021f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj @@ -24,7 +24,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj index 802661079..509e9e928 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj @@ -17,7 +17,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/Messaging/IGovMessageService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/Messaging/IGovMessageService.cs index 0de40c83e..4dd4a0969 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/Messaging/IGovMessageService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/Messaging/IGovMessageService.cs @@ -1,12 +1,9 @@ namespace LearningHub.Nhs.OpenApi.Services.Interface.Services.Messaging { using System; - using System.Collections.Generic; using System.Threading.Tasks; + using LearningHub.Nhs.Models.Common; using LearningHub.Nhs.Models.GovNotifyMessaging; - using LearningHub.Nhs.Models.Messaging; - using LearningHub.Nhs.Models.Validation; - using Microsoft.AspNetCore.Mvc; /// /// The IGovMessageService interface. @@ -27,5 +24,18 @@ public interface IGovMessageService /// The QueueRequestList. /// The . Task QueueRequestsAsync(QueueMessageList request); + + /// + /// Get Message Requests. + /// + /// The . + Task> GetMessageRequests(int page, int pageSize, string sortColumn, string sortDirection, string filter); + + /// + /// Get Message request by Id + /// + /// + /// The . + Task GetMessageRequestById(int id); } } diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index 87ce9883d..e3d2b217c 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -33,7 +33,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Messaging/GovMessageService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Messaging/GovMessageService.cs index 558b9bc4c..77328c256 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Messaging/GovMessageService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Messaging/GovMessageService.cs @@ -1,19 +1,17 @@ namespace LearningHub.Nhs.OpenApi.Services.Services.Messaging { using System; - using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; + using AutoMapper; using LearningHub.Nhs.MessageQueueing.Repositories; using LearningHub.Nhs.MessagingService.Interfaces; + using LearningHub.Nhs.Models.Common; using LearningHub.Nhs.Models.Entities.GovNotifyMessaging; using LearningHub.Nhs.Models.Entities.Messaging; using LearningHub.Nhs.Models.Enums.GovNotifyMessaging; using LearningHub.Nhs.Models.GovNotifyMessaging; - using LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Messaging; - using LearningHub.Nhs.OpenApi.Services.Interface.HttpClients; using LearningHub.Nhs.OpenApi.Services.Interface.Services.Messaging; - using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Newtonsoft.Json; @@ -24,6 +22,7 @@ public class GovMessageService : BaseService, IGovMessageService { private readonly IMessageQueueRepository messageQueueRepository; private readonly IGovNotifyService messageService; + private readonly IMapper mapper; /// /// Initializes a new instance of the class. @@ -31,14 +30,17 @@ public class GovMessageService : BaseService, IGovMessageService /// The logger. /// The message repository. /// The message Service. + /// mapper. public GovMessageService( ILogger logger, IMessageQueueRepository messageQueueRepository, - IGovNotifyService messageService) + IGovNotifyService messageService, + IMapper mapper) : base(logger) { this.messageQueueRepository = messageQueueRepository; this.messageService = messageService; + this.mapper = mapper; } /// @@ -101,5 +103,27 @@ public async Task QueueRequestsAsync(QueueMessageList request) await this.messageQueueRepository.QueueMessagesAsync(requests); } + + /// + /// Get paginated Message Requests. + /// + /// The . + public async Task> GetMessageRequests(int page, int pageSize, string sortColumn, string sortDirection, string filter) + { + int? offset = (page - 1) * pageSize; + var result = await this.messageQueueRepository.GetPaginatedMessageRequests(offset, pageSize, sortColumn, sortDirection, filter); + return result; + } + + /// + /// Get message request details by Id. + /// + /// + /// The . + public async Task GetMessageRequestById(int id) + { + var result = await this.messageQueueRepository.GetMessageRequestById(id); + return result; + } } } diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj index 27ab96576..6e8a17e14 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs index 37b41f1cc..e7600ff23 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs @@ -2,18 +2,14 @@ { using System; using System.Collections.Generic; - using System.Linq; using System.Threading.Tasks; using LearningHub.Nhs.MessageQueueing.Repositories; using LearningHub.Nhs.MessagingService.Interfaces; - using LearningHub.Nhs.Models.Entities.GovNotifyMessaging; - using LearningHub.Nhs.Models.Entities.Hierarchy; + using LearningHub.Nhs.Models.Common; using LearningHub.Nhs.Models.GovNotifyMessaging; using LearningHub.Nhs.OpenApi.Services.Interface.Services.Messaging; - using LearningHub.Nhs.OpenApi.Services.Services.Messaging; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; - using Newtonsoft.Json; /// /// GovNotify Messaging Controller. @@ -156,5 +152,35 @@ public async Task MessageFailedUpdate([FromBody] GovNotifyRespons await this.messageQueueRepository.MessageDeliveryFailed(response); return this.Ok(); } + + /// + /// Get Message Requests. + /// + /// page. + /// page size. + /// sort column name. + /// sort direction. + /// filter. + /// The . + [Route("GetMessageRequests/{page}/{pageSize}/{sortColumn}/{sortDirection}/{filter}")] + [HttpGet] + public async Task GetMessageRequests(int page, int pageSize, string sortColumn, string sortDirection, string filter) + { + PagedResultSet pagedResultSet = await this.govMessageService.GetMessageRequests(page, pageSize, sortColumn, sortDirection, filter); + return this.Ok(pagedResultSet); + } + + /// + /// Get message request details by id. + /// + /// id. + /// The . + [Route("GetMessageRequestById/{id}")] + [HttpGet] + public async Task GetMessageRequestById(int id) + { + MessageRequestViewModel requestDetails = await this.govMessageService.GetMessageRequestById(id); + return this.Ok(requestDetails); + } } } diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj index 7d5ab0178..59cf60f26 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj @@ -19,7 +19,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj index 79f6af7f9..50db9fa47 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj @@ -16,7 +16,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj index c8ca7a2ae..ea5cd2e1f 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj @@ -18,7 +18,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj index 89bca5ef2..5dace4683 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj @@ -19,7 +19,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj index ae1444ed9..37a35de0a 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj @@ -17,7 +17,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj index c19afef98..1e3ed8d43 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj @@ -20,7 +20,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index 0462105ff..2c379eb4c 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -29,7 +29,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj index 8d695c492..b3683e53f 100644 --- a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj +++ b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj index 100e6600d..ef48b8165 100644 --- a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj @@ -11,7 +11,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj index 8273e219f..593f2f0ce 100644 --- a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj @@ -10,7 +10,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj index a2628d76c..1df61ce1c 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj index 73e99b72e..3c9841066 100644 --- a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj @@ -16,7 +16,7 @@ - + all diff --git a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj index 6b02d693a..d5b1d8f97 100644 --- a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj index d27db0e89..2592a3ed4 100644 --- a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj +++ b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj index 1a8367ea1..c770b02d6 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj @@ -25,7 +25,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj index 56c3518c1..7d52af93a 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj index e4a707d63..f4cca3755 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj @@ -10,7 +10,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj index a6d13b605..ccec994bb 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj index 2e25b373f..244e4c832 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj index e21f1b8e1..929806ad3 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive