File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ class ProjectBasicDetailsForm extends Component {
9494 // TODO we shoudl not update the props (section is coming from props)
9595 // further, it is not used for this component as we are not rendering spec screen section here
9696 validate = { ( ) => { } } //dummy
97+ isCreation
9798 />
9899 </ div >
99100 < div className = "section-footer section-footer-spec" >
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ const SpecSection = props => {
7272 validate,
7373 sectionNumber,
7474 showHidden,
75+ isCreation,
7576 addAttachment,
7677 updateAttachment,
7778 removeAttachment,
@@ -238,7 +239,12 @@ const SpecSection = props => {
238239 < p className = "gray-text" >
239240 { description }
240241 </ p >
241- { subSections . filter ( ( subSection ) => showHidden || ! subSection . hidden ) . map ( renderSubSection ) }
242+ { subSections . filter ( ( subSection ) => (
243+ // hide section marked with hiddenOnCreation during creation process
244+ ( ! isCreation || ! subSection . hiddenOnCreation ) &&
245+ // hide hidden section, unless we not force to show them
246+ ( showHidden || ! subSection . hidden )
247+ ) ) . map ( renderSubSection ) }
242248 </ div >
243249 </ div >
244250 )
@@ -248,6 +254,7 @@ SpecSection.propTypes = {
248254 project : PropTypes . object . isRequired ,
249255 sectionNumber : PropTypes . number . isRequired ,
250256 showHidden : PropTypes . bool ,
257+ isCreation : PropTypes . bool ,
251258 addAttachment : PropTypes . func . isRequired ,
252259 updateAttachment : PropTypes . func . isRequired ,
253260 removeAttachment : PropTypes . func . isRequired ,
You can’t perform that action at this time.
0 commit comments