@ministryofjustice/hmpps-digital-prison-reporting-frontend 3.37.2 → 3.37.3
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.
|
@@ -24,10 +24,9 @@ class ParentChildDataTableBuilder extends DataTableBuilder_1.default {
|
|
|
24
24
|
sectionedData = this.splitChildDataIntoSections(sectionKeys, sectionedData);
|
|
25
25
|
const childDataTableBuilders = this.createChildDataTableBuilders();
|
|
26
26
|
return sectionKeys.flatMap((key) => {
|
|
27
|
-
var _a;
|
|
28
27
|
const sectionData = sectionedData[key.sortKey];
|
|
29
|
-
const parentSectionData =
|
|
30
|
-
return
|
|
28
|
+
const parentSectionData = sectionData.parent;
|
|
29
|
+
return [header].concat(parentSectionData.map((r) => this.mapRow(r))).concat(this.variant.childVariants
|
|
31
30
|
.filter((childVariant) => sectionData[childVariant.id])
|
|
32
31
|
.map((childVariant) => {
|
|
33
32
|
const dataTable = childDataTableBuilders[childVariant.id].buildTable(sectionData[childVariant.id]);
|
|
@@ -67,7 +66,6 @@ class ParentChildDataTableBuilder extends DataTableBuilder_1.default {
|
|
|
67
66
|
};
|
|
68
67
|
}, {}),
|
|
69
68
|
}))
|
|
70
|
-
.sort(this.sortKeyComparison())
|
|
71
69
|
.reduce((previousValue, sortKey) => {
|
|
72
70
|
if (previousValue.find((v) => v.sortKey === sortKey.sortKey)) {
|
|
73
71
|
return previousValue;
|
|
@@ -37,9 +37,9 @@ export default class ParentChildDataTableBuilder extends DataTableBuilder {
|
|
|
37
37
|
|
|
38
38
|
return sectionKeys.flatMap((key) => {
|
|
39
39
|
const sectionData = sectionedData[key.sortKey]
|
|
40
|
-
const parentSectionData = sectionData.parent
|
|
40
|
+
const parentSectionData = sectionData.parent
|
|
41
41
|
|
|
42
|
-
return
|
|
42
|
+
return [header].concat(parentSectionData.map((r) => this.mapRow(r))).concat(
|
|
43
43
|
this.variant.childVariants
|
|
44
44
|
.filter((childVariant) => sectionData[childVariant.id])
|
|
45
45
|
.map((childVariant) => {
|
|
@@ -90,7 +90,6 @@ export default class ParentChildDataTableBuilder extends DataTableBuilder {
|
|
|
90
90
|
}, {}),
|
|
91
91
|
}),
|
|
92
92
|
)
|
|
93
|
-
.sort(this.sortKeyComparison())
|
|
94
93
|
.reduce((previousValue: ParentChildSortKey[], sortKey: ParentChildSortKey) => {
|
|
95
94
|
if (previousValue.find((v) => v.sortKey === sortKey.sortKey)) {
|
|
96
95
|
return previousValue
|
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.
|
|
4
|
+
"version": "3.37.3",
|
|
5
5
|
"main": "dpr/assets/js/all.mjs",
|
|
6
6
|
"sass": "dpr/all.scss",
|
|
7
7
|
"engines": {
|
package/package.zip
CHANGED
|
Binary file
|