Skip to content

Commit

Permalink
label change and targets fixed to 2 decimal places #3369
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Dec 10, 2024
1 parent 9a9caa5 commit f4066f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion grails-app/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function OrganisationServicesViewModel(serviceIds, allServices, outputTargets, p
target.targetDate = ko.observable().extend({simpleDate:false});

target.periodTargets = _.map(periods, function (period) {
return {period: period.value, target: ko.observable(0)};
// TODO in the future, allowing a score to specifiy the number of decimal places would be useful
return {period: period.value, target: ko.observable(0).extend({numericString:2})};
});

function evaluateAndAssignAverage() {
Expand Down
4 changes: 2 additions & 2 deletions grails-app/views/organisation/_serviceTargets.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<th class="index" rowspan="2"></th>
<th class="service required" rowspan="2">${serviceName ?: "Service"}</th>
<th class="score required" rowspan="2" style="width: 20px">Target measure</th>
<th class="budget-cell required" rowspan="2">Overall target (%) <g:if test="${totalHelpText}"> <fc:iconHelp> ${totalHelpText} </fc:iconHelp></g:if></th>
<th class="budget-cell required" rowspan="2">Overall % target <g:if test="${totalHelpText}"> <fc:iconHelp> ${totalHelpText} </fc:iconHelp></g:if></th>
<g:if test="${showTargetDate}">
<th class="target-date required" rowspan="2">
Delivery date <g:if test="${deliveryHelpText}"> <fc:iconHelp> ${deliveryHelpText} </fc:iconHelp> </g:if>
</th>
</g:if>
<!-- ko if: periods && periods.length -->
<th data-bind="attr:{colspan:periods.length+1}">${periodTargetsLabel ?: " % Targets by date"}</th>
<th data-bind="attr:{colspan:periods.length+1}">${periodTargetsLabel ?: " % targets by date"}</th>
<!-- /ko -->
</tr>
<!-- ko if: periods && periods.length -->
Expand Down

0 comments on commit f4066f5

Please sign in to comment.