Skip to content

Commit b12e913

Browse files
authored
Merge pull request #2705 from TechnologyEnhancedLearning/Develop/Fixes/TD-4221-'Confirmresults'linkisnotshowingforfewaccountson'SupervisorDashboard'
TD-4221 'Confirm results' link is not showing for few accounts on 'Supervisor Dashboard'
2 parents b6fb19a + d066df3 commit b12e913

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed

DigitalLearningSolutions.Data/DataServices/SupervisorService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ public IEnumerable<SupervisorDashboardToDoItem> GetSupervisorDashboardToDoItemsF
560560
AND sasv.CandidateAssessmentSupervisorID = cas.ID AND sar.DateTime = (
561561
SELECT TOP 1 sar2.DateTime
562562
FROM SelfAssessmentResults AS sar2
563-
WHERE sar2.SelfAssessmentID = sar.SelfAssessmentID AND sar2.CompetencyID = co.ID AND sar2.Result != 0 ORDER BY sar2.ID DESC
563+
WHERE sar2.ID = sar.ID AND sar2.SelfAssessmentID = sar.SelfAssessmentID AND sar2.CompetencyID = co.ID AND sar2.Result != 0 ORDER BY sar2.ID DESC
564564
)
565565
WHERE (sd.SupervisorAdminID = @adminId) AND (cas.Removed IS NULL) AND (sasv.Verified IS NULL) AND (sd.Removed IS NULL)
566566
GROUP BY sa.ID, ca.ID, sd.ID, u.FirstName, u.LastName, sa.Name,cast(sasv.Requested as date)", new { adminId }

DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,86 @@
33
<h2>Framework structure</h2>
44
@if (Model.FrameworkCompetencyGroups.Any())
55
{
6-
foreach (var frameworkCompetencyGroup in Model.FrameworkCompetencyGroups)
7-
{
8-
<partial name="../Shared/_CompetencyGroupCard.cshtml" model="new CompetencyGroupCardViewModel
6+
foreach (var frameworkCompetencyGroup in Model.FrameworkCompetencyGroups)
7+
{
8+
<partial name="../Shared/_CompetencyGroupCard.cshtml" model="new CompetencyGroupCardViewModel
99
{
1010
CanModify = Model.DetailFramework.UserRole > 1,
1111
FrameworkCompetencyGroup =frameworkCompetencyGroup,
1212
CompetencyFlags = Model.CompetencyFlags
1313
}"
14-
view-data='@new ViewDataDictionary(ViewData)
14+
view-data='new ViewDataDictionary(ViewData)
1515
{
16-
{ "VocabSingular", @Model.VocabSingular() },
17-
{ "VocabPlural", @Model.VocabPlural() },
18-
{ "GroupCount", @Model.FrameworkCompetencyGroups.Count() }
16+
{ "VocabSingular", Model.VocabSingular() },
17+
{ "VocabPlural", Model.VocabPlural() },
18+
{ "GroupCount", Model.FrameworkCompetencyGroups.Count() }
1919
}' />
20-
}
20+
}
2121
}
2222
else
2323
{
24-
@if (!Model.FrameworkCompetencies.Any())
25-
{
26-
<div class="nhsuk-warning-callout callout-green">
27-
<h3 class="nhsuk-warning-callout__label">
28-
<span role="text">
29-
This is an empty framework.
30-
</span>
31-
</h3>
32-
@if (Model.DetailFramework.UserRole <= 1)
33-
{
34-
<p>This framework doesn't contain any @Model.VocabSingular().ToLower() groups or @Model.VocabPlural().ToLower().</p>
35-
}
36-
@if (Model.DetailFramework.UserRole > 1)
37-
{
38-
<p>Start adding @Model.VocabSingular().ToLower() groups and @Model.VocabPlural().ToLower() to this framework using the buttons below.</p>
39-
<p>Use the <strong>Details</strong> tab above to view and edit the framework details and working group.</p>
40-
}
41-
@if (Model.DetailFramework.UserRole > 0)
42-
{
43-
<p>Use the <strong>Comments</strong> tab to view, add and respond to comments from working group members on this framework.</p>
44-
}
45-
@if (Model.DetailFramework.UserRole > 1)
46-
{
47-
<p>When you are ready, use the <strong>Send for Review</strong> button above to request review and sign off of your framework.</p>
48-
}
49-
</div>
50-
}
51-
else
52-
{
53-
<p>No @Model.VocabSingular().ToLower() groups in this framework.</p>
54-
}
24+
@if (!Model.FrameworkCompetencies.Any())
25+
{
26+
<div class="nhsuk-warning-callout callout-green">
27+
<h3 class="nhsuk-warning-callout__label">
28+
<span role="text">
29+
This is an empty framework.
30+
</span>
31+
</h3>
32+
@if (Model.DetailFramework.UserRole <= 1)
33+
{
34+
<p>This framework doesn't contain any @Model.VocabSingular().ToLower() groups or @Model.VocabPlural().ToLower().</p>
35+
}
36+
@if (Model.DetailFramework.UserRole > 1)
37+
{
38+
<p>Start adding @Model.VocabSingular().ToLower() groups and @Model.VocabPlural().ToLower() to this framework using the buttons below.</p>
39+
<p>Use the <strong>Details</strong> tab above to view and edit the framework details and working group.</p>
40+
}
41+
@if (Model.DetailFramework.UserRole > 0)
42+
{
43+
<p>Use the <strong>Comments</strong> tab to view, add and respond to comments from working group members on this framework.</p>
44+
}
45+
@if (Model.DetailFramework.UserRole > 1)
46+
{
47+
<p>When you are ready, use the <strong>Send for Review</strong> button above to request review and sign off of your framework.</p>
48+
}
49+
</div>
50+
}
51+
else
52+
{
53+
<p>No @Model.VocabSingular().ToLower() groups in this framework.</p>
54+
}
5555
}
5656
<div id="fc-ungrouped">
57-
@if (Model.FrameworkCompetencies.Any())
58-
{
59-
60-
foreach (var frameworkCompetency in Model.FrameworkCompetencies)
57+
@if (Model.FrameworkCompetencies.Any())
6158
{
62-
<partial name="../Shared/_CompetencyCard.cshtml" model="new CompetencyCardViewModel()
59+
60+
foreach (var frameworkCompetency in Model.FrameworkCompetencies)
61+
{
62+
<partial name="../Shared/_CompetencyCard.cshtml" model="new CompetencyCardViewModel()
6363
{
6464
CanModify = Model.DetailFramework.UserRole > 1,
6565
FrameworkCompetencyGroupId = null,
6666
FrameworkCompetency = frameworkCompetency,
6767
CompetencyFlags = Model.CompetencyFlags.Where(c => c.CompetencyId == frameworkCompetency.CompetencyID)
6868
}"
69-
view-data='@new ViewDataDictionary(ViewData)
69+
view-data='new ViewDataDictionary(ViewData)
7070
{
71-
{ "VocabSingular", @Model.VocabSingular() },
72-
{"VocabPlural", @Model.VocabPlural() }
71+
{ "VocabSingular", Model.VocabSingular() },
72+
{"VocabPlural", Model.VocabPlural() }
7373
}' />
74-
}
74+
}
7575

76-
}
76+
}
7777
</div>
7878
@if (Model.DetailFramework.UserRole > 1)
7979
{
80-
<div class="nhsuk-grid-row nhsuk-u-margin-top-3">
81-
<div class="nhsuk-grid-column-full">
82-
<a class="nhsuk-button" asp-action="AddEditFrameworkCompetencyGroup" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add @Model.VocabSingular().ToLower() group</a>
83-
<a class="nhsuk-button nhsuk-button--secondary" asp-action="AddEditFrameworkCompetency" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add ungrouped @Model.VocabSingular().ToLower()</a>
84-
<a class="nhsuk-button nhsuk-button--secondary" asp-action="ImportCompetencies" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])" asp-route-tabname="@(ViewContext.RouteData.Values["tabname"])">Import @Model.VocabPlural().ToLower() from Excel</a>
80+
<div class="nhsuk-grid-row nhsuk-u-margin-top-3">
81+
<div class="nhsuk-grid-column-full">
82+
<a class="nhsuk-button" asp-action="AddEditFrameworkCompetencyGroup" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add @Model.VocabSingular().ToLower() group</a>
83+
<a class="nhsuk-button nhsuk-button--secondary" asp-action="AddEditFrameworkCompetency" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add ungrouped @Model.VocabSingular().ToLower()</a>
84+
<a class="nhsuk-button nhsuk-button--secondary" asp-action="ImportCompetencies" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])" asp-route-tabname="@(ViewContext.RouteData.Values["tabname"])">Import @Model.VocabPlural().ToLower() from Excel</a>
85+
</div>
8586
</div>
86-
</div>
8787
}
8888

0 commit comments

Comments
 (0)