File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/app/submission/objects Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -97,11 +97,13 @@ export class SubmissionObjectEffects {
9797 const sectionId = selfLink . substr ( selfLink . lastIndexOf ( '/' ) + 1 ) ;
9898 const config = sectionDefinition . _links . config ? ( sectionDefinition . _links . config . href || sectionDefinition . _links . config ) : '' ;
9999 // A section is enabled if it is mandatory or contains data in its section payload
100- // except for detect duplicate steps which will be hidden with no data unless overridden in config, even if mandatory
101- const enabled = ( sectionDefinition . mandatory && ( sectionDefinition . sectionType !== SectionsType . Duplicates ) )
102- || ( isNotEmpty ( action . payload . sections ) && action . payload . sections . hasOwnProperty ( sectionId )
103- && ( sectionDefinition . sectionType === SectionsType . Duplicates && ( alwaysDisplayDuplicates ( ) || isNotEmpty ( ( action . payload . sections [ sectionId ] as WorkspaceitemSectionDuplicatesObject ) . potentialDuplicates ) ) )
104- ) ;
100+ let enabled = ( sectionDefinition . mandatory || ( isNotEmpty ( action . payload . sections ) && action . payload . sections . hasOwnProperty ( sectionId ) ) ) ;
101+
102+ // Duplicates will ignore mandatory and display only when "always display" is set or there is data to show
103+ if ( sectionDefinition . sectionType === SectionsType . Duplicates ) {
104+ enabled = ( alwaysDisplayDuplicates ( ) || isNotEmpty ( ( action . payload . sections [ sectionId ] as WorkspaceitemSectionDuplicatesObject ) . potentialDuplicates ) ) ;
105+ }
106+
105107 let sectionData ;
106108 if ( sectionDefinition . sectionType !== SectionsType . SubmissionForm ) {
107109 sectionData = ( isNotUndefined ( action . payload . sections ) && isNotUndefined ( action . payload . sections [ sectionId ] ) ) ? action . payload . sections [ sectionId ] : Object . create ( null ) ;
You can’t perform that action at this time.
0 commit comments