Skip to content

Commit

Permalink
Allow pre-pop to override saved data in RCS form #3369
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Dec 12, 2024
1 parent 08d0e57 commit d56cc3e
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 38 deletions.
21 changes: 18 additions & 3 deletions forms/other/regionalCapacityServicesReportV1.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
"target": "targetIndigenousParticipationPercentage",
"source-path": "periodTargets.targetIndigenousParticipationPercentage"
}
]
],
"merge": {
"targetIndigenousParticipationPercentage": {
"replaceExisting": true
}
}
},
{
"source": {
Expand All @@ -38,7 +43,12 @@
"target": "targetIndigenousProcurementPercentage",
"source-path": "periodTargets.targetIndigenousProcurementPercentage"
}
]
],
"merge": {
"targetIndigenousProcurementPercentage": {
"replaceExisting": true
}
}
},
{
"source": {
Expand All @@ -49,7 +59,12 @@
"target": "organisationPanelProjectValue",
"source-path": "totalContractValue"
}
]
],
"merge": {
"organisationPanelProjectValue": {
"replaceExisting": true
}
}
}
],
"dataModel": [
Expand Down
21 changes: 18 additions & 3 deletions forms/other/regionalCapacityServicesReportV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
"target": "targetIndigenousParticipationPercentage",
"source-path": "periodTargets.targetIndigenousParticipationPercentage"
}
]
],
"merge": {
"targetIndigenousParticipationPercentage": {
"replaceExisting": true
}
}
},
{
"source": {
Expand All @@ -38,7 +43,12 @@
"target": "targetIndigenousProcurementPercentage",
"source-path": "periodTargets.targetIndigenousProcurementPercentage"
}
]
],
"merge": {
"targetIndigenousProcurementPercentage": {
"replaceExisting": true
}
}
},
{
"source": {
Expand All @@ -49,7 +59,12 @@
"target": "organisationPanelProjectValue",
"source-path": "totalContractValue"
}
]
],
"merge": {
"organisationPanelProjectValue": {
"replaceExisting": true
}
}
}
],
"dataModel": [
Expand Down
79 changes: 47 additions & 32 deletions forms/other/regionalCapacityServicesReportV3.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,56 @@
"collapsedByDefault": false,
"templateName": "regionalCapacityServicesReport",
"template": {
"pre-populate": [
{
"source": {
"context-path": "owner"
},
"mapping": [
{
"target": "targetIndigenousParticipationPercentage",
"source-path": "periodTargets.targetIndigenousParticipationPercentage"
}
]
"pre-populate": [
{
"source": {
"context-path": "owner"
},
{
"source": {
"context-path": "owner"
},
"mapping": [
{
"target": "targetIndigenousProcurementPercentage",
"source-path": "periodTargets.targetIndigenousProcurementPercentage"
}
]
"mapping": [
{
"target": "targetIndigenousParticipationPercentage",
"source-path": "periodTargets.targetIndigenousParticipationPercentage"
}
],
"merge": {
"targetIndigenousParticipationPercentage": {
"replaceExisting": true
}
}
},
{
"source": {
"context-path": "owner"
},
{
"source": {
"context-path": "owner"
},
"mapping": [
{
"target": "organisationPanelProjectValue",
"source-path": "totalContractValue"
}
]
"mapping": [
{
"target": "targetIndigenousProcurementPercentage",
"source-path": "periodTargets.targetIndigenousProcurementPercentage"
}
],
"merge": {
"targetIndigenousProcurementPercentage": {
"replaceExisting": true
}
}
},
{
"source": {
"context-path": "owner"
},
"mapping": [
{
"target": "organisationPanelProjectValue",
"source-path": "totalContractValue"
}
],
"merge": {
"organisationPanelProjectValue": {
"replaceExisting": true
}
}
],
}
],
"dataModel": [
{
"name": "governanceAndFinancialFrameworksOnTrack",
Expand Down

1 comment on commit d56cc3e

@temi
Copy link
Contributor

@temi temi commented on d56cc3e Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please sign in to comment.