@ministryofjustice/hmpps-digital-prison-reporting-frontend 3.28.0 → 3.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dpr/assets/js/all.mjs +2 -2
- package/dpr/components/async-request-list/utils.js +1 -1
- package/dpr/components/async-request-list/utils.ts +1 -1
- package/dpr/components/async-request-list/view.njk +1 -1
- package/dpr/components/download-feeback-form/view.njk +0 -12
- package/dpr/components/download-message/view.njk +2 -2
- package/dpr/components/recently-viewed-list/utils.js +1 -1
- package/dpr/components/recently-viewed-list/utils.ts +1 -1
- package/dpr/components/recently-viewed-list/view.njk +1 -1
- package/dpr/components/report-actions/utils.js +3 -0
- package/dpr/components/report-actions/utils.ts +3 -0
- package/package.json +1 -1
- package/package.zip +0 -0
package/dpr/assets/js/all.mjs
CHANGED
|
@@ -1410,7 +1410,7 @@ class DprAsyncRequestList extends DprPollingStatusClass {
|
|
|
1410
1410
|
meta.map(async (metaData) => {
|
|
1411
1411
|
if (metaData.status !== 'EXPIRED') {
|
|
1412
1412
|
const response = await this.getExpiredStatus('/getRequestedExpiredStatus/', metaData, this.csrfToken);
|
|
1413
|
-
if (response.isExpired) {
|
|
1413
|
+
if (response && response.isExpired) {
|
|
1414
1414
|
window.location.reload();
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
@@ -1500,7 +1500,7 @@ class DprRecentlyViewedList extends DprPollingStatusClass {
|
|
|
1500
1500
|
meta.map(async (metaData) => {
|
|
1501
1501
|
if (metaData.status !== 'EXPIRED') {
|
|
1502
1502
|
const response = await this.getExpiredStatus('/getExpiredStatus/', metaData, this.csrfToken);
|
|
1503
|
-
if (response.isExpired) {
|
|
1503
|
+
if (response && response.isExpired) {
|
|
1504
1504
|
window.location.reload();
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
@@ -112,7 +112,7 @@ exports.default = {
|
|
|
112
112
|
var _a;
|
|
113
113
|
const userId = ((_a = res.locals.user) === null || _a === void 0 ? void 0 : _a.uuid) ? res.locals.user.uuid : 'userId';
|
|
114
114
|
const report = await (0, reportStatusHelper_1.getExpiredStatus)({ req, res, services });
|
|
115
|
-
if (report.isExpired) {
|
|
115
|
+
if (report && report.isExpired) {
|
|
116
116
|
await services.asyncReportsStore.setToExpired(report.executionId, userId);
|
|
117
117
|
}
|
|
118
118
|
return report.isExpired;
|
|
@@ -108,7 +108,7 @@ export default {
|
|
|
108
108
|
getExpiredStatus: async ({ req, res, services }: AsyncReportUtilsParams) => {
|
|
109
109
|
const userId = res.locals.user?.uuid ? res.locals.user.uuid : 'userId'
|
|
110
110
|
const report = await getExpiredStatus({ req, res, services })
|
|
111
|
-
if (report.isExpired) {
|
|
111
|
+
if (report && report.isExpired) {
|
|
112
112
|
await services.asyncReportsStore.setToExpired(report.executionId, userId)
|
|
113
113
|
}
|
|
114
114
|
return report.isExpired
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% from "../user-list-content/view.njk" import dprUserList %}
|
|
2
2
|
|
|
3
3
|
{% macro dprAsyncRequestList(args) %}
|
|
4
|
-
<div id="dpr-async-request-component" data-dpr-module="async-request-list" data-request-data='{{ meta | dump | safe }}' data-csrf-token="{{ csrfToken }}">
|
|
4
|
+
<div id="dpr-async-request-component" data-dpr-module="async-request-list" data-request-data='{{ args.meta | dump | safe }}' data-csrf-token="{{ args.csrfToken }}">
|
|
5
5
|
{{ dprUserList(args) }}
|
|
6
6
|
</div>
|
|
7
7
|
{% endmacro %}
|
|
@@ -135,18 +135,6 @@
|
|
|
135
135
|
}
|
|
136
136
|
}) }}
|
|
137
137
|
|
|
138
|
-
<h2 class="govuk-fieldset__legend govuk-fieldset__legend--l">Can you provide your outputs?</h2>
|
|
139
|
-
|
|
140
|
-
<p>If you have previously downloaded reports in the past, and produced any outputs from the data. e.g visualisations, combined reports, documents etc. we would be interested in seeing them.</p>
|
|
141
|
-
<p>Please email us at <a href="mailto:digitalprisonreporting@digital.justice.gov.uk?subject=DPR%20Download%20Feedback%20Documents">digitalprisonreporting@digital.justice.gov.uk</a> with your attachments.</p>
|
|
142
|
-
|
|
143
|
-
{{ govukWarningText({
|
|
144
|
-
text: "Do not send any documents that contain sensitive data",
|
|
145
|
-
iconFallbackText: "Warning",
|
|
146
|
-
classes: 'govuk-!-margin-bottom-8'
|
|
147
|
-
}) }}
|
|
148
|
-
|
|
149
|
-
|
|
150
138
|
{{ govukButton({
|
|
151
139
|
text: "Submit feedback",
|
|
152
140
|
classes: "govuk-button--primary govuk-!-margin-bottom-0",
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
{% set tableId = reportData.tableId %}
|
|
8
8
|
{% set html %}
|
|
9
9
|
<h2 class="govuk-heading-m govuk-!-margin-bottom-2">Download coming soon</h2>
|
|
10
|
-
<p class="govuk-body">
|
|
10
|
+
<p class="govuk-body">You cannot download reports from this service currently. This functionality will be available very soon. You can still download reports in NOMIS in the meantime.</p>
|
|
11
11
|
|
|
12
12
|
{# NOTE: 👇🏽 Below is the messaging + link to the feedback form. Uncomment once form is completed 👇🏽 #}
|
|
13
13
|
<h2 class="govuk-heading-s govuk-!-margin-bottom-2">Help us improve our service</h2>
|
|
14
|
-
<p class="govuk-body">We would like to understand more about your reasons for downloading this report. Please take
|
|
14
|
+
<p class="govuk-body">We would like to understand more about your reasons for downloading this report. Please take a moment to fill out a feedback form and help us improve our service to you, and provide features that will better suit your needs.</p>
|
|
15
15
|
<a href="/download/{{reportId}}/{{variantId}}/{{tableId}}/feedback" class="govuk-button govuk-!-margin-bottom-1" data-module="govuk-button">
|
|
16
16
|
Leave feedback
|
|
17
17
|
</a>
|
|
@@ -70,7 +70,7 @@ exports.default = {
|
|
|
70
70
|
var _a;
|
|
71
71
|
const report = await (0, reportStatusHelper_1.getExpiredStatus)({ req, res, services });
|
|
72
72
|
const userId = ((_a = res.locals.user) === null || _a === void 0 ? void 0 : _a.uuid) ? res.locals.user.uuid : 'userId';
|
|
73
|
-
if (report.isExpired) {
|
|
73
|
+
if (report && report.isExpired) {
|
|
74
74
|
await services.recentlyViewedStoreService.setToExpired(report.executionId, userId);
|
|
75
75
|
}
|
|
76
76
|
return report.isExpired;
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
const report = await getExpiredStatus({ req, res, services })
|
|
62
62
|
const userId = res.locals.user?.uuid ? res.locals.user.uuid : 'userId'
|
|
63
63
|
|
|
64
|
-
if (report.isExpired) {
|
|
64
|
+
if (report && report.isExpired) {
|
|
65
65
|
await services.recentlyViewedStoreService.setToExpired(report.executionId, userId)
|
|
66
66
|
}
|
|
67
67
|
return report.isExpired
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% from "../user-list-content/view.njk" import dprUserList %}
|
|
2
2
|
|
|
3
3
|
{% macro dprRecentlyViewedList(args) %}
|
|
4
|
-
<div id="dpr-recently-viewed-component" data-dpr-module="recently-viewed-list" data-request-data='{{ meta | dump | safe }}' data-csrf-token="{{ csrfToken }}">
|
|
4
|
+
<div id="dpr-recently-viewed-component" data-dpr-module="recently-viewed-list" data-request-data='{{ args.meta | dump | safe }}' data-csrf-token="{{ args.csrfToken }}">
|
|
5
5
|
{{ dprUserList(args) }}
|
|
6
6
|
</div>
|
|
7
7
|
{% endmacro %}
|
|
@@ -66,6 +66,9 @@ const initReportActions = ({ reportName, variantName, printable, url, executionI
|
|
|
66
66
|
href: url,
|
|
67
67
|
});
|
|
68
68
|
// Downloadable
|
|
69
|
+
// NOTE: Temporarily disabling for release 25
|
|
70
|
+
// eslint-disable-next-line no-param-reassign
|
|
71
|
+
downloadable = false;
|
|
69
72
|
actions.push({
|
|
70
73
|
...BUTTON_TEMPLATES.downloadable,
|
|
71
74
|
disabled: !downloadable,
|
|
@@ -87,6 +87,9 @@ const initReportActions = ({
|
|
|
87
87
|
})
|
|
88
88
|
|
|
89
89
|
// Downloadable
|
|
90
|
+
// NOTE: Temporarily disabling for release 25
|
|
91
|
+
// eslint-disable-next-line no-param-reassign
|
|
92
|
+
downloadable = false
|
|
90
93
|
actions.push({
|
|
91
94
|
...BUTTON_TEMPLATES.downloadable,
|
|
92
95
|
disabled: !downloadable,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ministryofjustice/hmpps-digital-prison-reporting-frontend",
|
|
3
3
|
"description": "The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.",
|
|
4
|
-
"version": "3.28.
|
|
4
|
+
"version": "3.28.2",
|
|
5
5
|
"main": "dpr/assets/js/all.mjs",
|
|
6
6
|
"sass": "dpr/all.scss",
|
|
7
7
|
"engines": {
|
package/package.zip
CHANGED
|
Binary file
|