@ministryofjustice/hmpps-digital-prison-reporting-frontend 3.3.6 → 3.4.0

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/all.scss CHANGED
File without changes
File without changes
@@ -9,21 +9,21 @@
9
9
  {{ dprLoadingAnim() }}
10
10
 
11
11
  {{ govukCheckboxes({
12
- id: 'columns.' + columns.name,
13
- name: 'columns.' + columns.name,
14
- classes: "govuk-checkboxes--small",
15
- formGroup: {
16
- classes: "govuk-!-margin-bottom-3"
17
- },
18
- fieldset: {
19
- legend: {
20
- text: columns.text,
21
- classes: "govuk-label govuk-!-font-weight-bold"
22
- }
23
- },
24
- items: columns.options,
25
- values: columns.value
26
- }) }}
12
+ id: 'columns.' + columns.name,
13
+ name: 'columns.' + columns.name,
14
+ classes: "govuk-checkboxes--small",
15
+ formGroup: {
16
+ classes: "govuk-!-margin-bottom-3"
17
+ },
18
+ fieldset: {
19
+ legend: {
20
+ text: columns.text,
21
+ classes: "govuk-label govuk-!-font-weight-bold"
22
+ }
23
+ },
24
+ items: columns.options,
25
+ values: columns.value
26
+ }) }}
27
27
  </div>
28
28
 
29
29
  <div class="filter-actions">
@@ -20,7 +20,7 @@ class ReportQuery {
20
20
  this.columns = utils_1.default.getSelectedColumns(fields, columns);
21
21
  }
22
22
  else {
23
- this.columns = fields.map((f) => f.name);
23
+ this.columns = fields.filter((f) => f.visible).map((f) => f.name);
24
24
  }
25
25
  this.filters = {};
26
26
  Object.keys(queryParams)
@@ -42,7 +42,7 @@ export default class ReportQuery implements FilteredListRequest {
42
42
  typeof queryParams.columns === 'string' ? queryParams.columns.split(',') : (queryParams.columns as string[])
43
43
  this.columns = ColumnUtils.getSelectedColumns(fields, columns)
44
44
  } else {
45
- this.columns = fields.map((f) => f.name)
45
+ this.columns = fields.filter((f) => f.visible).map((f) => f.name)
46
46
  }
47
47
 
48
48
  this.filters = {}
@@ -76,6 +76,7 @@ export interface components {
76
76
  /** @enum {string} */
77
77
  type: 'string' | 'date' | 'long' | 'time' | 'HTML'
78
78
  mandatory: boolean
79
+ visible: boolean
79
80
  }
80
81
  FilterDefinition: {
81
82
  /** @enum {string} */
@@ -7,6 +7,7 @@ const createUrlForParameters = (currentQueryParams, updateQueryParams) => {
7
7
  if (updateQueryParams) {
8
8
  queryParams = {
9
9
  ...currentQueryParams,
10
+ selectedPage: '1',
10
11
  };
11
12
  Object.keys(updateQueryParams).forEach((q) => {
12
13
  if (updateQueryParams[q]) {
@@ -9,6 +9,7 @@ const createUrlForParameters = (
9
9
  if (updateQueryParams) {
10
10
  queryParams = {
11
11
  ...currentQueryParams,
12
+ selectedPage: '1',
12
13
  }
13
14
 
14
15
  Object.keys(updateQueryParams).forEach((q) => {
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.3.6",
4
+ "version": "3.4.0",
5
5
  "main": "dpr/assets/js/all.mjs",
6
6
  "sass": "dpr/all.scss",
7
7
  "engines": {
package/package.zip CHANGED
Binary file