@ministryofjustice/hmpps-digital-prison-reporting-frontend 3.32.13 → 3.32.14

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.
@@ -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 ? `${reportUrl}${decodeURIComponent(reportSearch)}` : `${reportUrl}`;
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',
@@ -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 ? `${reportUrl}${decodeURIComponent(<string>reportSearch)}` : `${reportUrl}`
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.13",
4
+ "version": "3.32.14",
5
5
  "main": "dpr/assets/js/all.mjs",
6
6
  "sass": "dpr/all.scss",
7
7
  "engines": {
package/package.zip CHANGED
Binary file