Skip to content

Commit

Permalink
Fixed DataSetSpec #2957
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Sep 11, 2023
1 parent d68a728 commit ee249ad
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions grails-app/views/dataSet/_editDataSet.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@
</div>
</div>

%{-- Not every project will have the option to select EMSA protocols --}%
<!-- ko if:projectProtocols().length > 0 -->
<div class="form-group row">
<label for="protocol" class="col-sm-5 col-form-label required">9a. What EMSA protocol was used when collecting the data?</label>
<div class="col-sm-7">
<select class="form-control" id="protocol" data-validation-engine="validate[required]" data-bind="options:projectProtocols, optionsText:'label', optionsValue:'value', optionsCaption:'Please select...', value:protocol">
</select>
</div>
</div>
<!-- /ko -->

<div class="form-group row">
<label for="measurementTypes" class="col-sm-5 col-form-label required">9b. What types of measurements or observations does the dataset include? <br/>To select more than one answer, hold down the ‘CTRL’ button whilst selecting an option from the drop-down list</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ class DatasetSpec extends StubbedCasSpec{
set.programOutcome = "5. By 2023, there is an increase in the awareness and adoption of land management practices that improve and protect the condition of soil, biodiversity and vegetation."
set.investmentPriorities = ["Soil acidification"]
set.type = "Baseline dataset associated with a project outcome"
set.projectBaseline = 'b1'
set.protocol = 'guid-1'
set.measurementTypes = ["Soil erosion"]
set.methods = ["Genetic sampling", "Area sampling"]
set.methodDescription = "Method description"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class DatasetPageModule extends Module{
investmentPriorities {$('#investmentPriority')}
serviceAndOutcomes {$('#projectOutcomes')}
type{$("#type")}
projectBaseline{ $('#projectBaseline')}
protocol{$('#protocol')}
measurementTypes {$("#measurementTypes")}
methods {$("#methods")}
methodDescription {$("#methodDescription")}
Expand Down
9 changes: 8 additions & 1 deletion src/integration-test/resources/dataset3/loadDataSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,13 @@ createProject({
otherOutcomes: ["Partnerships and engagement is built between stakeholders responsible for managing natural resources",
"More primary producers adopt risk management practices to improve their sustainability and resilience",
"More primary producers and agricultural communities are experimenting with adaptive or transformative NRM practices, systems and approaches that link and contribute to building drought resilience"]
},
baseline: {
rows: [
{
code:'b1', baseline:'baseline 1', protocols:['Category 1', 'Category 2']
}
]
}
}
}
Expand Down Expand Up @@ -1493,7 +1500,7 @@ const monitorProject = {
baseline: {
rows: [
{
protocols:['Category 1', 'Category 2']
code:'b1', baseline:'baseline 1', protocols:['Category 1', 'Category 2']
}
]
}
Expand Down

0 comments on commit ee249ad

Please sign in to comment.