diff --git a/src/projects/create/components/ProjectBasicDetailsForm.js b/src/projects/create/components/ProjectBasicDetailsForm.js index 3c0eee8bf..511bef36a 100644 --- a/src/projects/create/components/ProjectBasicDetailsForm.js +++ b/src/projects/create/components/ProjectBasicDetailsForm.js @@ -94,6 +94,7 @@ class ProjectBasicDetailsForm extends Component { // TODO we shoudl not update the props (section is coming from props) // further, it is not used for this component as we are not rendering spec screen section here validate={() => {}}//dummy + isCreation />
diff --git a/src/projects/detail/components/SpecSection.jsx b/src/projects/detail/components/SpecSection.jsx index 96c8f1007..0c8356fe7 100644 --- a/src/projects/detail/components/SpecSection.jsx +++ b/src/projects/detail/components/SpecSection.jsx @@ -72,6 +72,7 @@ const SpecSection = props => { validate, sectionNumber, showHidden, + isCreation, addAttachment, updateAttachment, removeAttachment, @@ -238,7 +239,12 @@ const SpecSection = props => {

{description}

- {subSections.filter((subSection) => showHidden || !subSection.hidden).map(renderSubSection)} + {subSections.filter((subSection) => ( + // hide section marked with hiddenOnCreation during creation process + (!isCreation || !subSection.hiddenOnCreation) && + // hide hidden section, unless we not force to show them + (showHidden || !subSection.hidden) + )).map(renderSubSection)}
) @@ -248,6 +254,7 @@ SpecSection.propTypes = { project: PropTypes.object.isRequired, sectionNumber: PropTypes.number.isRequired, showHidden: PropTypes.bool, + isCreation: PropTypes.bool, addAttachment: PropTypes.func.isRequired, updateAttachment: PropTypes.func.isRequired, removeAttachment: PropTypes.func.isRequired,