Skip to content

Commit d33eb31

Browse files
authored
Merge pull request #1556 from TechnologyEnhancedLearning/TD-6100-Reset
TD-6100 uniffied reporting iteration 1
2 parents e155788 + 7af543d commit d33eb31

File tree

64 files changed

+3260
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3260
-17
lines changed

LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1111
</PropertyGroup>
12+
1213
<ItemGroup>
1314
<PackageReference Include="elfhHub.Nhs.Models" Version="3.0.14" />
1415
<PackageReference Include="FluentAssertions" Version="6.12.0" />
15-
<PackageReference Include="LearningHub.Nhs.Models" Version="4.0.3" />
16+
<PackageReference Include="LearningHub.Nhs.Models" Version="4.0.10" />
1617
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.13" />
1718
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
1819
<PackageReference Include="Selenium.Axe" Version="4.0.19" />

LearningHub.Nhs.WebUI/Configuration/Settings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,10 @@ public Settings()
265265
/// Gets or sets AllCataloguePageSize.
266266
/// </summary>
267267
public int AllCataloguePageSize { get; set; }
268+
269+
/// <summary>
270+
/// Gets or sets the StatMandId.
271+
/// </summary>
272+
public int StatMandId { get; set; } = 12;
268273
}
269274
}

LearningHub.Nhs.WebUI/Controllers/ReportsController.cs

Lines changed: 429 additions & 0 deletions
Large diffs are not rendered by default.

LearningHub.Nhs.WebUI/Helpers/CommonValidationErrorMessages.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,5 +259,10 @@ public static class CommonValidationErrorMessages
259259
/// Security question Required.
260260
/// </summary>
261261
public const string SecurityQuestionRequired = "Please select a security question";
262+
263+
/// <summary>
264+
/// Course Required.
265+
/// </summary>
266+
public const string CourseRequired = "Select a course";
262267
}
263268
}

LearningHub.Nhs.WebUI/Interfaces/IFileService.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ public interface IFileService
5353
/// <param name="filePaths">.</param>
5454
/// <returns>The <see cref="Task"/>.</returns>
5555
Task PurgeResourceFile(ResourceVersionExtendedViewModel vm = null, List<string> filePaths = null);
56+
57+
/// <summary>
58+
/// The DownloadBlobFile.
59+
/// </summary>
60+
/// <param name="uri">uri.</param>
61+
/// <returns>The <see cref="Task"/>.</returns>
62+
Task<(Stream Stream, string FileName, string ContentType)> DownloadBlobFileAsync(string uri);
5663
}
5764
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
namespace LearningHub.Nhs.WebUI.Interfaces
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Threading.Tasks;
6+
using elfhHub.Nhs.Models.Common;
7+
using LearningHub.Nhs.Models.Common;
8+
using LearningHub.Nhs.Models.Databricks;
9+
using LearningHub.Nhs.Models.Paging;
10+
11+
/// <summary>
12+
/// Defines the <see cref="IRegionService" />.
13+
/// </summary>
14+
public interface IReportService
15+
{
16+
/// <summary>
17+
/// The GetReporterPermission.
18+
/// </summary>
19+
/// <returns>A <see cref="Task{TResult}"/> representing the result of the asynchronous operation.</returns>
20+
Task<bool> GetReporterPermission();
21+
22+
/// <summary>
23+
/// The GetCourseCompletionReport.
24+
/// </summary>
25+
/// <param name="requestModel">The requestModel.<see cref="int"/>.</param>
26+
/// <returns>The <see cref="Task{LearningHubValidationResult}"/>.</returns>
27+
Task<DatabricksDetailedViewModel> GetCourseCompletionReport(DatabricksRequestModel requestModel);
28+
29+
/// <summary>
30+
/// The GetReportHistory.
31+
/// </summary>
32+
/// <param name="requestModel">The requestModel.<see cref="int"/>.</param>
33+
/// <returns>The <see cref="Task{LearningHubValidationResult}"/>.</returns>
34+
Task<PagedResultSet<ReportHistoryModel>> GetReportHistory(PagingRequestModel requestModel);
35+
36+
/// <summary>
37+
/// The GetReportHistory.
38+
/// </summary>
39+
/// <param name="reportHistoryId">The reportHistoryId.<see cref="int"/>.</param>
40+
/// <returns>The <see cref="Task{LearningHubValidationResult}"/>.</returns>
41+
Task<ReportHistoryModel> GetReportHistoryById(int reportHistoryId);
42+
43+
/// <summary>
44+
/// The QueueReportDownload.
45+
/// </summary>
46+
/// <param name="reportHistoryId">The reportHistoryId.<see cref="int"/>.</param>
47+
/// <returns>The <see cref="Task{LearningHubValidationResult}"/>.</returns>
48+
Task<bool> QueueReportDownload(int reportHistoryId);
49+
50+
/// <summary>
51+
/// The DownloadReport.
52+
/// </summary>
53+
/// <param name="reportHistoryId">reportHistoryId.</param>
54+
/// <returns>The <see cref="Task{LearningHubValidationResult}"/>.</returns>
55+
Task<ReportHistoryModel> DownloadReport(int reportHistoryId);
56+
}
57+
}

LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
<PackageReference Include="HtmlAgilityPack" Version="1.11.72" />
114114
<PackageReference Include="IdentityModel" Version="4.6.0" />
115115
<PackageReference Include="LearningHub.Nhs.Caching" Version="2.0.0" />
116-
<PackageReference Include="LearningHub.Nhs.Models" Version="4.0.3" />
116+
<PackageReference Include="LearningHub.Nhs.Models" Version="4.0.10" />
117117
<PackageReference Include="linqtotwitter" Version="6.9.0" />
118118
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0" />
119119
<PackageReference Include="Microsoft.ApplicationInsights.EventCounterCollector" Version="2.21.0" />
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
namespace LearningHub.Nhs.WebUI.Models.DynamicCheckbox
2+
{
3+
/// <summary>
4+
/// DynamicCheckboxItemViewModel.
5+
/// </summary>
6+
public class DynamicCheckboxItemViewModel
7+
{
8+
/// <summary>
9+
/// Gets or sets a value.
10+
/// </summary>
11+
public string Value { get; set; }
12+
13+
/// <summary>
14+
/// Gets or sets a Label.
15+
/// </summary>
16+
public string Label { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets a HintText.
20+
/// </summary>
21+
public string? HintText { get; set; }
22+
23+
/// <summary>
24+
/// Gets or sets a value indicating whether gets or sets a selected.
25+
/// </summary>
26+
public bool Selected { get; set; }
27+
}
28+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
namespace LearningHub.Nhs.WebUI.Models.DynamicCheckbox
2+
{
3+
using System.Collections.Generic;
4+
5+
/// <summary>
6+
/// DynamicCheckboxesViewModel.
7+
/// </summary>
8+
public class DynamicCheckboxesViewModel
9+
{
10+
/// <summary>
11+
/// Gets or sets a Label.
12+
/// </summary>
13+
public string Label { get; set; }
14+
15+
/// <summary>
16+
/// Gets or sets a HintText.
17+
/// </summary>
18+
public string HintText { get; set; }
19+
20+
/// <summary>
21+
/// Gets or sets a ErrorMessage.
22+
/// </summary>
23+
public string ErrorMessage { get; set; }
24+
25+
/// <summary>
26+
/// Gets or sets a value indicating whether gets or sets a Required.
27+
/// </summary>
28+
public bool Required { get; set; }
29+
30+
/// <summary>
31+
/// Gets or sets a CssClass.
32+
/// </summary>
33+
public string CssClass { get; set; }
34+
35+
/// <summary>
36+
/// Gets or sets SelectedValues.
37+
/// </summary>
38+
public List<string> SelectedValues { get; set; } = [];
39+
40+
/// <summary>
41+
/// Gets or sets a Checkboxes.
42+
/// </summary>
43+
public List<DynamicCheckboxItemViewModel> Checkboxes { get; set; } = [];
44+
}
45+
}

LearningHub.Nhs.WebUI/Models/NavigationModel.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ public class NavigationModel
7575
/// </summary>
7676
public bool ShowBrowseCatalogues { get; set; }
7777

78+
/// <summary>
79+
/// Gets or sets a value indicating whether to show reports.
80+
/// </summary>
81+
public bool ShowReports { get; set; }
82+
7883
/// <summary>
7984
/// Gets or sets a value indicating whether ShowHome.
8085
/// </summary>

0 commit comments

Comments
 (0)