Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/projects/create/components/ProjectBasicDetailsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
/>
</div>
<div className="section-footer section-footer-spec">
Expand Down
9 changes: 8 additions & 1 deletion src/projects/detail/components/SpecSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const SpecSection = props => {
validate,
sectionNumber,
showHidden,
isCreation,
addAttachment,
updateAttachment,
removeAttachment,
Expand Down Expand Up @@ -238,7 +239,12 @@ const SpecSection = props => {
<p className="gray-text">
{description}
</p>
{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)}
</div>
</div>
)
Expand All @@ -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,
Expand Down