Skip to content

Commit

Permalink
Fixed paths for context data #3369
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Dec 9, 2024
1 parent 22fb5df commit 3dac5be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions forms/other/regionalCapacityServicesReport.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"pre-populate": [
{
"source": {
"context-path": ""
"context-path": "owner"
},
"mapping": [
{
"target": "targetIndigenousParticipationPercentage",
"source-path": "targetIndigenousParticipationPercentage"
"source-path": "periodTargets.targetIndigenousParticipationPercentage"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class EditOrViewReportCommand implements Validateable {

ReportLifecycleListener listener = reportService.reportLifeCycleListener(model.report)
if (listener) {
model.putAll(listener.getContextData(entity, model.report))
model.context.putAll(listener.getContextData(entity, model.report))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RegionalCapacityServicesReportLifecycleListener extends ReportLifecycleLis
Map getContextData(Map organisation, Map report) {
List outputTargets = organisation.custom?.details?.services?.targets
Map periodTargets = getTargetsForReportPeriod(report, outputTargets)
BigDecimal budget = new BigDecimal(0) // TODO get budget from the correct period of the budget table
[periodTargets:periodTargets, budget:budget]
BigDecimal funding = new BigDecimal(0) // TODO get budget from the correct period of the budget table
[periodTargets:periodTargets, totalContractValue:funding]
}
}

0 comments on commit 3dac5be

Please sign in to comment.