Skip to content

Commit 37864f8

Browse files
committed
Merge branch 'DLS-Release-v1.2.0' into UAT
2 parents 1636ea0 + 4bd1f4b commit 37864f8

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ public void SubmitFrameworkReview(int frameworkId, int reviewId, bool signedOff,
21082108
AU1.Email AS OwnerEmail,
21092109
FW.FrameworkName
21102110
FROM FrameworkReviews AS FR
2111-
INNER JOIN FrameworkCollaborators AS FC ON FR.FrameworkCollaboratorID = FC.ID AND FWC.IsDeleted = 0
2111+
INNER JOIN FrameworkCollaborators AS FC ON FR.FrameworkCollaboratorID = FC.ID AND FC.IsDeleted = 0
21122112
INNER JOIN AdminUsers AS AU ON FC.AdminID = AU.AdminID
21132113
INNER JOIN Frameworks AS FW ON FR.FrameworkID = FW.ID
21142114
INNER JOIN AdminUsers AS AU1 ON FW.OwnerAdminID = AU1.AdminID
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
async function setTableauParams(): Promise<void> {
2+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3+
const viz = document.getElementById('tableau-viz') as any;
4+
const adminIdElement = document.getElementById('hf-adminid') as HTMLInputElement | null;
5+
const emailElement = document.getElementById('hf-email') as HTMLInputElement | null;
6+
7+
if (!viz) {
8+
// console.error('Tableau Viz element not found.');
9+
return;
10+
}
11+
12+
if (!adminIdElement || !emailElement) {
13+
// console.error('Hidden input fields for adminid or email not found.');
14+
return;
15+
}
16+
17+
const adminId = adminIdElement.value;
18+
const email = emailElement.value;
19+
20+
// Listen for the `firstinteractive` event from the Web Component
21+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
22+
viz.addEventListener('firstinteractive', async (event: Event) => {
23+
await viz.workbook.changeParameterValueAsync('adminid', adminId);
24+
await viz.workbook.changeParameterValueAsync('email', email);
25+
});
26+
}
27+
28+
// Run the function after the page loads
29+
document.addEventListener('DOMContentLoaded', () => {
30+
setTableauParams();
31+
});

DigitalLearningSolutions.Web/Views/Support/RequestSupportTicket/RequestSummary.cshtml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="nhsuk-u-reading-width">
3030
<h1 class="nhsuk-heading-xl">@Model.RequestType</h1>
3131
<form class="nhsuk-u-margin-bottom-3" method="post" asp-action="SetRequestSummary" asp-all-route-data="@cancelLinkData">
32-
<vc:text-input asp-for="RequestSubject"
32+
<vc:text-input asp-for="RequestSubject"
3333
label="Enter a summary of your problem or request"
3434
populate-with-current-value="true"
3535
type="text"
@@ -38,15 +38,17 @@
3838
autocomplete="given-name"
3939
css-class=""
4040
required="true" />
41+
<nhs-form-group nhs-validation-for="RequestDescription">
4142
<vc:text-area asp-for="RequestDescription"
4243
label="Describe your problem or request"
4344
populate-with-current-value="true"
4445
rows="5"
4546
spell-check="false"
4647
hint-text="If you are reporting a problem, please tell us exactly where it occurs and steps to recreate it. If you need to add screenshots, you will be able to do this in the next step."
47-
css-class="html-editor"
48-
character-count="null" />
49-
48+
css-class=""
49+
character-count="null">
50+
</vc:text-area>
51+
</nhs-form-group>
5052
<button class="nhsuk-button" type="submit">Next</button>
5153
</form>
5254

DigitalLearningSolutions.Web/Views/Support/RequestSupportTicket/TypeOfRequest.cshtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<div id="form-group">
3030
<form method="post" asp-route-ResponseTypes="@Model.RequestTypes" asp-action="setRequestType" asp-all-route-data="@cancelLinkData">
3131
<div>
32+
<nhs-form-group nhs-validation-for="Id">
3233
<fieldset class="nhsuk-fieldset">
3334
<legend class="nhsuk-fieldset__legend nhsuk-fieldset__legend--l">
3435
<h1 class="nhsuk-fieldset__heading">
@@ -54,7 +55,8 @@
5455
seperator = seperator + 1;
5556
}
5657
</div>
57-
</fieldset>
58+
</fieldset>
59+
</nhs-form-group>
5860
<button class="nhsuk-button nhsuk-u-margin-top-6" id="save-button" type="submit">
5961
Next
6062
</button>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
<tableau-viz id='tableau-viz'
2424
src='@srcUrl' token='@jwtToken' toolbar='bottom'>
2525
If the dashboard doesn't appear after a few seconds, <a href="#">reload the page</a>
26-
<viz-parameter name="aid" value="@aid"></viz-parameter>
27-
<viz-parameter name="email" value="@email"></viz-parameter>
2826
</tableau-viz>
27+
<input type="hidden" id="hf-email" value="@email" />
28+
<input type="hidden" id="hf-adminid" value="@aid" />
2929
@section scripts {
3030
@* We are not using Yarn/npm for the Tableau JS becaue of errors during installation relating to a missing dependency *@
3131
<script type="module" src="@tableauServerUrl/javascripts/api/tableau.embedding.3.latest.min.js"></script>
32+
<script src="@Url.Content("~/js/trackingSystem/tableaureports.js")" asp-append-version="true"></script>
3233
}
3334
</feature>
3435
<feature name="@(FeatureFlags.TableauSelfAssessmentDashboards)" negate="true">

0 commit comments

Comments
 (0)