@ministryofjustice/hmpps-digital-prison-reporting-frontend 3.37.0 → 3.37.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.
@@ -66,7 +66,7 @@ const initDataSources = ({ req, services, token, userId, }) => {
66
66
  }).toRecordWithFilterPrefix(true);
67
67
  const { tableId: childTableId } = requestedReport.childExecutionData.find((e) => e.variantId === childVariant.id);
68
68
  return services.reportingService
69
- .getAsyncReport(token, reportId, reportVariantId, childTableId, query)
69
+ .getAsyncReport(token, reportId, childVariant.id, childTableId, query)
70
70
  .then((data) => ({
71
71
  id: childVariant.id,
72
72
  data,
@@ -102,7 +102,7 @@ export const initDataSources = ({
102
102
  )
103
103
 
104
104
  return services.reportingService
105
- .getAsyncReport(token, reportId, reportVariantId, childTableId, query)
105
+ .getAsyncReport(token, reportId, childVariant.id, childTableId, query)
106
106
  .then((data: Array<Dict<string>>) => ({
107
107
  id: childVariant.id,
108
108
  data,
@@ -38,7 +38,7 @@ export const updateStore = async ({
38
38
  services: Services
39
39
  queryData?: SetQueryFromFiltersResult
40
40
  executionData: ExecutionData
41
- childExecutionData: Array<ExecutionData>
41
+ childExecutionData: Array<ChildReportExecutionData>
42
42
  }): Promise<string> => {
43
43
  const { search, id, type } = req.body
44
44
  const userId = res.locals.user?.uuid ? res.locals.user.uuid : 'userId'
@@ -129,7 +129,7 @@ const requestReport = async ({
129
129
  reportingService: ReportingService
130
130
  }): Promise<{
131
131
  executionData: ExecutionData
132
- childExecutionData: Array<ExecutionData>
132
+ childExecutionData: Array<ChildReportExecutionData>
133
133
  queryData: SetQueryFromFiltersResult
134
134
  }> => {
135
135
  const { reportId, id, dataProductDefinitionsPath } = req.body
@@ -183,7 +183,7 @@ const requestDashboard = async ({
183
183
  token: string
184
184
  dashboardService: DashboardService
185
185
  reportingService: ReportingService
186
- }): Promise<{ executionData: ExecutionData; childExecutionData: Array<ExecutionData> }> => {
186
+ }): Promise<{ executionData: ExecutionData; childExecutionData: Array<ChildReportExecutionData> }> => {
187
187
  const { reportId, id, dataProductDefinitionsPath } = req.body
188
188
  const { executionId, tableId } = await dashboardService.requestAsyncDashboard(token, reportId, id, {
189
189
  dataProductDefinitionsPath,
@@ -260,7 +260,7 @@ export default {
260
260
  const { type } = req.body
261
261
 
262
262
  let executionData: ExecutionData
263
- let childExecutionData: Array<ExecutionData>
263
+ let childExecutionData: Array<ChildReportExecutionData>
264
264
  let queryData: SetQueryFromFiltersResult
265
265
 
266
266
  const requestArgs = {
@@ -11,7 +11,7 @@ import Dict = NodeJS.Dict
11
11
  import { getDpdPathSuffix } from './urlHelper'
12
12
  import { SetQueryFromFiltersResult } from '../components/_async/async-filters-form/types'
13
13
  import { DashboardMetricDefinition } from '../types/Dashboards'
14
- import { ExecutionData } from '../types/ExecutionData'
14
+ import { ChildReportExecutionData, ExecutionData } from '../types/ExecutionData'
15
15
 
16
16
  export default class UserStoreItemBuilder {
17
17
  userStoreItem: UserReportData
@@ -79,7 +79,7 @@ export default class UserStoreItemBuilder {
79
79
  return this
80
80
  }
81
81
 
82
- addChildExecutionData = (childExecutionData: Array<ExecutionData>) => {
82
+ addChildExecutionData = (childExecutionData: Array<ChildReportExecutionData>) => {
83
83
  this.userStoreItem = {
84
84
  ...this.userStoreItem,
85
85
  childExecutionData,
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.37.0",
4
+ "version": "3.37.2",
5
5
  "main": "dpr/assets/js/all.mjs",
6
6
  "sass": "dpr/all.scss",
7
7
  "engines": {
package/package.zip CHANGED
Binary file