@ministryofjustice/hmpps-digital-prison-reporting-frontend 3.32.13 → 3.32.15
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/components/_async/async-report/utils.js +2 -1
- package/dpr/components/_async/async-report/utils.ts +3 -1
- package/dpr/components/_reports/report-actions/types.d.ts +1 -0
- package/dpr/routes/download.js +3 -1
- package/dpr/routes/download.ts +3 -1
- package/package.json +1 -1
- package/package.zip +0 -0
|
@@ -169,7 +169,7 @@ const getReport = async ({ req, res, services }) => {
|
|
|
169
169
|
return { renderData };
|
|
170
170
|
};
|
|
171
171
|
const setActions = (csrfToken, variant, requestData, columns, canDownload, count, currentUrl, currentQueryParams) => {
|
|
172
|
-
const { reportName, name, id, variantId, reportId, executionId, dataProductDefinitionsPath, url } = requestData;
|
|
172
|
+
const { reportName, name, id, variantId, reportId, tableId, executionId, dataProductDefinitionsPath, url } = requestData;
|
|
173
173
|
const requestUrl = url.request.fullUrl;
|
|
174
174
|
const { printable } = variant;
|
|
175
175
|
const ID = variantId || id;
|
|
@@ -180,6 +180,7 @@ const setActions = (csrfToken, variant, requestData, columns, canDownload, count
|
|
|
180
180
|
csrfToken,
|
|
181
181
|
reportId,
|
|
182
182
|
id: ID,
|
|
183
|
+
tableId,
|
|
183
184
|
columns: columns.value,
|
|
184
185
|
definitionPath: dataProductDefinitionsPath,
|
|
185
186
|
loadType: UserReports_1.LoadType.ASYNC,
|
|
@@ -245,7 +245,8 @@ const setActions = (
|
|
|
245
245
|
currentUrl: string,
|
|
246
246
|
currentQueryParams: string,
|
|
247
247
|
) => {
|
|
248
|
-
const { reportName, name, id, variantId, reportId, executionId, dataProductDefinitionsPath, url } =
|
|
248
|
+
const { reportName, name, id, variantId, reportId, tableId, executionId, dataProductDefinitionsPath, url } =
|
|
249
|
+
requestData
|
|
249
250
|
const requestUrl = url.request.fullUrl
|
|
250
251
|
const { printable } = variant
|
|
251
252
|
const ID = variantId || id
|
|
@@ -257,6 +258,7 @@ const setActions = (
|
|
|
257
258
|
csrfToken,
|
|
258
259
|
reportId,
|
|
259
260
|
id: ID,
|
|
261
|
+
tableId,
|
|
260
262
|
columns: columns.value,
|
|
261
263
|
definitionPath: dataProductDefinitionsPath,
|
|
262
264
|
loadType: LoadType.ASYNC,
|
package/dpr/routes/download.js
CHANGED
|
@@ -69,7 +69,9 @@ function routes({ router, layoutPath, services, templatePath = 'dpr/views/', })
|
|
|
69
69
|
const userId = ((_a = res.locals.user) === null || _a === void 0 ? void 0 : _a.uuid) ? res.locals.user.uuid : 'userId';
|
|
70
70
|
const { reportId, variantId } = req.params;
|
|
71
71
|
const { reportName, variantName, reportUrl, reportSearch } = req.query;
|
|
72
|
-
const reportHref = reportSearch
|
|
72
|
+
const reportHref = reportSearch
|
|
73
|
+
? `${reportUrl}?reportSearch=${decodeURIComponent(reportSearch)}`
|
|
74
|
+
: `${reportUrl}`;
|
|
73
75
|
await services.downloadPermissionService.saveDownloadPermissionData(userId, reportId, variantId);
|
|
74
76
|
res.render(`${templatePath}feedback-form-success`, {
|
|
75
77
|
title: 'success',
|
package/dpr/routes/download.ts
CHANGED
|
@@ -87,7 +87,9 @@ export default function routes({
|
|
|
87
87
|
const userId = res.locals.user?.uuid ? res.locals.user.uuid : 'userId'
|
|
88
88
|
const { reportId, variantId } = req.params
|
|
89
89
|
const { reportName, variantName, reportUrl, reportSearch } = req.query
|
|
90
|
-
const reportHref = reportSearch
|
|
90
|
+
const reportHref = reportSearch
|
|
91
|
+
? `${reportUrl}?reportSearch=${decodeURIComponent(<string>reportSearch)}`
|
|
92
|
+
: `${reportUrl}`
|
|
91
93
|
|
|
92
94
|
await services.downloadPermissionService.saveDownloadPermissionData(userId, reportId, variantId)
|
|
93
95
|
|
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.32.
|
|
4
|
+
"version": "3.32.15",
|
|
5
5
|
"main": "dpr/assets/js/all.mjs",
|
|
6
6
|
"sass": "dpr/all.scss",
|
|
7
7
|
"engines": {
|
package/package.zip
CHANGED
|
Binary file
|