Skip to content

Commit

Permalink
part of #2 (Questionnaire fully dynamic and configurable)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-koenig committed Mar 4, 2024
1 parent 0aa8d60 commit 53b7bcf
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 296 deletions.
79 changes: 27 additions & 52 deletions config/breedfides/wizard.steps.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,23 @@ window.steps = [
label: 'Project Title',
type: 'text',
isaMapping: {
entity: 'investigation',
attribute: 'title'
jsonPath: 'title'
},
explanation: 'DM-3'
},
{
label: 'Project Description',
type: 'textarea',
isaMapping: {
entity: 'investigation',
attribute: 'description'
jsonPath: 'description'
},
explanation: 'DM-4'
},
{
label: 'Institution',
type: 'text',
isaMapping: {
entity: 'investigation',
attribute: 'comments',
jsonPath: 'comments',
commentName: 'Study Contact Institution'
},
explanation: 'DM-16'
Expand All @@ -34,8 +31,7 @@ window.steps = [
label: 'Institution Address',
type: 'text',
isaMapping: {
entity: 'investigation',
attribute: 'comments',
jsonPath: 'comments',
commentName: 'Study Contact Institution'
},
explanation: 'DM-16'
Expand All @@ -49,35 +45,35 @@ window.steps = [
label: 'Authors',
type: 'people',
isaMapping: {
entity: 'investigation',
attribute: 'people'
jsonPath: 'people'
},
explanation: 'DM-16',
componentConfig: {
showComments: false
}
}
],
//hook: 'addStudy' // not needed in BreedFides step config, as the study object is created due to prefilling in wizard.config.js
},
{
hooks: [
{
type: 'addStudy'
}
],
title: 'Please provide the Title and Location of your Study',
fields: [
{
label: 'Study title',
type: 'text',
isaMapping: {
entity: 'study',
attribute: 'title',
studyIndex: 0 // can also be omitted, in this case it is set to 0 by default
jsonPath: 'studies[0].title',
}
},
{
label: 'Location',
type: 'text',
isaMapping: {
entity: 'study',
attribute: 'comments',
jsonPath: 'studies[0].comments',
commentName: 'Study Experimental Site'
},
explanation: 'DM-18'
Expand All @@ -86,8 +82,7 @@ window.steps = [
label: 'Location Latitude',
type: 'text',
isaMapping: {
entity: 'study',
attribute: 'comments',
jsonPath: 'studies[0].comments',
commentName: 'Study Latitude'
},
explanation: 'DM-19'
Expand All @@ -96,8 +91,7 @@ window.steps = [
label: 'Location Longitude',
type: 'text',
isaMapping: {
entity: 'study',
attribute: 'comments',
jsonPath: 'studies[0].comments',
commentName: 'Study Longitude'
},
explanation: 'DM-20'
Expand All @@ -106,8 +100,7 @@ window.steps = [
label: 'Country',
type: 'text',
isaMapping: {
entity: 'study',
attribute: 'comments',
jsonPath: 'studies[0].comments',
commentName: 'Study Country'
},
explanation: 'DM-17'
Expand Down Expand Up @@ -135,31 +128,26 @@ window.steps = [
commentName: 'Study Data File Description'
}
}
],
hook: 'addProtocol',
hookParameters: {
protocolName: 'Growth',
protocolVersion: 'MIAPPE v1.1',
protocolDescription: 'How the plants were grown up.',
protocolParameters: ['Light intensity', 'Air temperature']
}
]
},*/
{
hooks: [
{
type: 'addProtocol',
parameters: {
protocolName: 'Growth',
protocolVersion: 'MIAPPE v1.1',
protocolDescription: 'How the plants were grown up.',
protocolParameters: ['Light intensity', 'Air temperature']
}
}
],
title: 'Please provide a brief summary of the Growth Conditions.',
hook: 'addProtocol',
hookParameters: {
protocolName: 'Growth',
protocolVersion: 'MIAPPE v1.1',
protocolDescription: 'How the plants were grown up.',
protocolParameters: ['Light intensity', 'Air temperature']
},
fields: [
{
label: 'Growth description',
type: 'textarea',
isaMapping: {
//entity: 'protocol',
//attribute: 'description',
jsonPath: 'studies[0].protocols[0].description'
},
explanation: 'DM-67'
Expand All @@ -168,29 +156,16 @@ window.steps = [
},
{
title: 'Please select constant Parameters for all Samples of the Experiment.',
level: 'Study',
component: 'ProtocolParametersSelect',
jsonPath: 'studies[0].protocols[0].parameters'
},
{
title: 'Select Factors that are different between the Samples.',
level: 'Study',
component: 'FactorsSelect',
jsonPath: 'studies[0].factors'
},
/*{
title: 'Growth Protocol',
level: 'Study',
component: 'StudyTemplateGenerator'
},
{
title: 'Materials',
level: 'Study',
component: 'Materials'
}*/
{
title: 'Upload template',
level: 'Study',
component: 'Uploader',
jsonPath: 'studies[0]'
}
Expand Down
Loading

0 comments on commit 53b7bcf

Please sign in to comment.