Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feedback from client for RCS form
fixed issue with validation triggering
  • Loading branch information
temi committed Nov 25, 2024
1 parent aafa048 commit 7fb8879
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
20 changes: 6 additions & 14 deletions forms/other/regionalCapacityServicesReport.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,28 +150,20 @@
{
"dataType": "number",
"name": "organisationFteWorkforce",
"description": "Enter total RDP staff (full time equivalent) deployed on Services for the Deed and all Contracts (including non-DCCEEW Contracts) during this reporting period.",
"description": "Enter total RDP staff (full time equivalent) deployed on Services for the Deed and all Contracts (including <span style='white-space: nowrap;'>non-DCCEEW</span> Contracts) during this reporting period.",
"validate": [
{
"rule": "required"
},
{
"rule": "min[0]"
},
{
"param": {
"expression": "organisationFteIndigenousWorkforce",
"type": "computed"
},
"rule": "min",
"message": "numeric value must be higher or equal to the numeric value entered for 'What was your organisation’s full time equivalent Indigenous workforce deployed on the Services this reporting period?'"
}
]
},
{
"dataType": "number",
"name": "organisationFteIndigenousWorkforce",
"description": "Enter total RDP Indigenous staff (full time equivalent) deployed on Services for the Deed and all Contracts (including non-DCCEEW Contracts) during this reporting period.",
"description": "Enter total RDP Indigenous staff (full time equivalent) deployed on Services for the Deed and all Contracts (including <span style='white-space: nowrap;'>non-DCCEEW</span> Contracts) during this reporting period.",
"validate": [
{
"rule": "required"
Expand All @@ -185,14 +177,14 @@
"type": "computed"
},
"rule": "max",
"message": "numeric value must be less than or equal to the numeric value entered for 'What was your organisation’s full time equivalent workforce deployed on the Services this reporting period?'"
"message": "Numeric value must be less than or equal to the numeric value entered for 'What was your organisation’s full time equivalent workforce deployed on the Services this reporting period?'"
}
]
},
{
"dataType": "number",
"name": "servicesContractedValueFirstNations",
"description": "Enter total dollar value (GST inclusive) of goods and services contracted to First Nations people/Indigenous enterprises, during this reporting period, for the Deed and all Contracts (including non-DCCEEW Contracts).",
"description": "Enter total dollar value (GST inclusive) of goods and services contracted to First Nations people/Indigenous enterprises, during this reporting period, for the Deed and all Contracts (including <span style='white-space: nowrap;'>non-DCCEEW</span> Contracts).",
"validate": [
{
"rule": "required"
Expand Down Expand Up @@ -544,7 +536,7 @@
"items": [
{
"type": "literal",
"source": "<b>Q5(c). Please complete workforce and supply chain data (Deed of Standing Offer Clause 38 Indigenous Procurement Policy). Please do not provide personal or commercial-in-confidence information when answering this question. Please retain documentation as evidence to support assurance activities undertaken to verify the reported information.</b>"
"source": "<b>Q5(c). Please complete workforce and supply chain data (Deed of Standing Offer Clause 38 Indigenous Procurement Policy). Please do not provide personal or <span style='white-space: nowrap;'>commercial-in-confidence</span> information when answering this question. Please retain documentation as evidence to support assurance activities undertaken to verify the reported information.</b>"
}
]
},
Expand Down Expand Up @@ -577,7 +569,7 @@
"css": "span7",
"preLabel": "What was the dollar value of Services contracted to First Nations people/Indigenous enterprises during this reporting period?",
"source": "servicesContractedValueFirstNations",
"type": "currency"
"type": "number"
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions grails-app/assets/javascripts/organisation.js
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ OrganisationPageViewModel = function (props, options) {
}

self.attachValidation = function() {
$("#organisation-targets").validationEngine('attach', {validationAttribute: "data-validation-engine"});
$("#organisation-targets > table").validationEngine('attach');
};

self.saveOrganisationConfiguration = function() {
Expand All @@ -762,7 +762,7 @@ OrganisationPageViewModel = function (props, options) {
};

self.saveCustomFields = function() {
if ($("#organisation-targets form").validationEngine('validate')) {
if ($("#organisation-targets > table").validationEngine('validate')) {
var json = JSON.parse(self.reportingTargets().modelAsJSON());
return saveOrganisation(json);
}
Expand Down
2 changes: 0 additions & 2 deletions grails-app/views/organisation/_serviceTargets.gsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- ko with:reportingTargets() -->
<h4>${title ?: "Organisation services and minimum targets"}</h4>
<!-- ko with: services -->
<form>
<table class="table service-targets validationEngineContainer">
<thead>
<tr>
Expand Down Expand Up @@ -75,7 +74,6 @@
%{-- </tr>--}%
%{-- </tfoot>--}%
</table>
</form>
<!-- /ko -->
<!-- /ko -->
<button class="btn btn-sm btn-primary" data-bind="click: saveCustomFields">Save changes</button>

0 comments on commit 7fb8879

Please sign in to comment.