Skip to content

Commit 7221ade

Browse files
TD-5683 Resolving PR conflicts
1 parent 21bd1c8 commit 7221ade

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

DigitalLearningSolutions.Web/Controllers/TrackingSystem/Centre/SelfAssessmentReports/SelfAssessmentReportsController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.FeatureManagement;
1717
using Microsoft.FeatureManagement.Mvc;
1818
using System;
19+
using System.Linq;
1920
using System.Threading.Tasks;
2021
[FeatureGate(FeatureFlags.RefactoredTrackingSystem)]
2122
[Authorize(Policy = CustomPolicies.UserCentreAdmin)]
@@ -40,7 +41,7 @@ public SelfAssessmentReportsController(
4041
IClockUtility clockUtility,
4142
IConfiguration config,
4243
ISelfAssessmentService selfAssessmentService,
43-
ICentreSelfAssessmentsService centreSelfAssessmentsService
44+
ICentreSelfAssessmentsService centreSelfAssessmentsService,
4445
IFeatureManager featureManager
4546
)
4647
{
@@ -63,11 +64,10 @@ public async Task<IActionResult> IndexAsync()
6364
var categoryId = this.selfAssessmentService.GetSelfAssessmentCategoryId(1);
6465
var selfAssessments = centreSelfAssessmentsService.GetCentreSelfAssessments(centreId.Value);
6566
var dSATreportIsPublish = selfAssessments.Any(x => x.SelfAssessmentId == 1);
66-
var model = new SelfAssessmentReportsViewModel(selfAssessmentReportService.GetSelfAssessmentsForReportList((int)centreId, adminCategoryId), adminCategoryId, categoryId, dSATreportIsPublish); return View(model);
6767
var tableauFlag = await featureManager.IsEnabledAsync(FeatureFlags.TableauSelfAssessmentDashboards);
6868
var tableauQueryOverride = string.Equals(Request.Query["tableaulink"], "true", StringComparison.OrdinalIgnoreCase);
6969
var showTableauLink = tableauFlag || tableauQueryOverride;
70-
var model = new SelfAssessmentReportsViewModel(selfAssessmentReportService.GetSelfAssessmentsForReportList((int)centreId, adminCategoryId), adminCategoryId, categoryId, showTableauLink);
70+
var model = new SelfAssessmentReportsViewModel(selfAssessmentReportService.GetSelfAssessmentsForReportList((int)centreId, adminCategoryId), adminCategoryId, categoryId, dSATreportIsPublish, showTableauLink);
7171
return View(model);
7272
}
7373
[HttpGet]

DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Centre/Reports/SelfAssessmentReportsViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
public class SelfAssessmentReportsViewModel
77
{
88
public SelfAssessmentReportsViewModel(
9-
IEnumerable<SelfAssessmentSelect> selfAssessmentSelects, int? adminCategoryId, int categoryId, bool dSATreportIsPublish
10-
IEnumerable<SelfAssessmentSelect> selfAssessmentSelects, int? adminCategoryId, int categoryId, bool showTableauLink
9+
IEnumerable<SelfAssessmentSelect> selfAssessmentSelects, int? adminCategoryId, int categoryId, bool dSATreportIsPublish, bool showTableauLink
1110
)
1211
{
1312
SelfAssessmentSelects = selfAssessmentSelects;

DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/Index.cshtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
<h2>Excel learner activity reports</h2>
3434
<p class="nhsuk-lede-text">Download Excel competency self assessments activity reports for your centre.</p>
3535
<ul>
36-
@if((Model.DSATreportIsPublish) && ((Model.AdminCategoryId == null) || (Model.AdminCategoryId == Model.CategoryId)))
37-
{
38-
<li>
39-
<a asp-controller="SelfAssessmentReports" asp-action="DownloadDigitalCapabilityToExcel">Digital Skills Assessment Tool - Download report</a>
36+
@if ((Model.DSATreportIsPublish) && ((Model.AdminCategoryId == null) || (Model.AdminCategoryId == Model.CategoryId)))
37+
{
38+
<li>
39+
<a asp-controller="SelfAssessmentReports" asp-action="DownloadDigitalCapabilityToExcel">Digital Skills Assessment Tool - Download report</a>
4040

4141
</li>
4242
}

0 commit comments

Comments
 (0)