mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
[Port dspace-8_x] Fix issue with submission sections visibility (#3761)
* Removing position-fixed bootstrap class so that navbar links are available again (cherry picked from commit351abaa5c2
) (cherry picked from commit5c4df8765e
) * A new approach so that the elements of the ds-file-dropzone-no-uploader component don't overlap the navbar and make it inaccessible (cherry picked from commit2c259f5ae9
) (cherry picked from commitee5af8f7d1
) * [DURACOM-291] fix submission section visibility in order to rely on the configured section scope (cherry picked from commit8e8979a27a
) * Removing position-fixed bootstrap class so that navbar links are available again (cherry picked from commit351abaa5c2
) (cherry picked from commit3ecec3af51
) * A new approach so that the elements of the ds-file-dropzone-no-uploader component don't overlap the navbar and make it inaccessible (cherry picked from commit2c259f5ae9
) (cherry picked from commit25e2c763be
) --------- Co-authored-by: root <root@TI-03.OHB.LOCAL> Co-authored-by: Giuseppe Digilio <giuseppe.digilio@4science.com>
This commit is contained in:
@@ -50,6 +50,7 @@ import {
|
||||
createFailedRemoteDataObject$,
|
||||
createSuccessfulRemoteDataObject,
|
||||
} from '../shared/remote-data.utils';
|
||||
import { SectionScope } from './objects/section-visibility.model';
|
||||
import { SubmissionError } from './objects/submission-error.model';
|
||||
import {
|
||||
CancelSubmissionFormAction,
|
||||
@@ -504,9 +505,15 @@ export class SubmissionService {
|
||||
* true if section is hidden, false otherwise
|
||||
*/
|
||||
isSectionHidden(sectionData: SubmissionSectionObject): boolean {
|
||||
return (isNotUndefined(sectionData.visibility)
|
||||
&& sectionData.visibility.main === 'HIDDEN'
|
||||
&& sectionData.visibility.other === 'HIDDEN');
|
||||
const submissionScope: SubmissionScopeType = this.getSubmissionScope();
|
||||
if (isEmpty(submissionScope) || isEmpty(sectionData.visibility) || isEmpty(sectionData.scope)) {
|
||||
return false;
|
||||
}
|
||||
const convertedSubmissionScope: SectionScope = submissionScope.valueOf() === SubmissionScopeType.WorkspaceItem.valueOf() ?
|
||||
SectionScope.Submission : SectionScope.Workflow;
|
||||
const visibility = convertedSubmissionScope.valueOf() === sectionData.scope.valueOf() ?
|
||||
sectionData.visibility.main : sectionData.visibility.other;
|
||||
return visibility === 'HIDDEN';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user