[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 commit 351abaa5c2)
(cherry picked from commit 5c4df8765e)

* 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 commit 2c259f5ae9)
(cherry picked from commit ee5af8f7d1)

* [DURACOM-291] fix submission section visibility in order to rely on the configured section scope

(cherry picked from commit 8e8979a27a)

* Removing position-fixed bootstrap class so that navbar links are available again

(cherry picked from commit 351abaa5c2)
(cherry picked from commit 3ecec3af51)

* 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 commit 2c259f5ae9)
(cherry picked from commit 25e2c763be)

---------

Co-authored-by: root <root@TI-03.OHB.LOCAL>
Co-authored-by: Giuseppe Digilio <giuseppe.digilio@4science.com>
This commit is contained in:
DSpace Bot
2024-12-18 15:57:30 -06:00
committed by GitHub
parent 6380f132af
commit 819e693cfc
13 changed files with 534 additions and 86 deletions

View File

@@ -5,3 +5,9 @@ export interface SectionVisibility {
main: any;
other: any;
}
export enum SectionScope {
Submission = 'SUBMISSION',
Workflow = 'WORKFLOW',
}

View File

@@ -11,7 +11,10 @@ import {
} from '../../core/submission/models/workspaceitem-sections.model';
import { type } from '../../shared/ngrx/type';
import { SectionsType } from '../sections/sections-type';
import { SectionVisibility } from './section-visibility.model';
import {
SectionScope,
SectionVisibility,
} from './section-visibility.model';
import { SubmissionError } from './submission-error.model';
import { SubmissionSectionError } from './submission-section-error.model';
@@ -120,6 +123,7 @@ export class InitSectionAction implements Action {
header: string;
config: string;
mandatory: boolean;
scope: SectionScope;
sectionType: SectionsType;
visibility: SectionVisibility;
enabled: boolean;
@@ -140,6 +144,8 @@ export class InitSectionAction implements Action {
* the section's config
* @param mandatory
* the section's mandatory
* @param scope
* the section's scope
* @param sectionType
* the section's type
* @param visibility
@@ -156,12 +162,13 @@ export class InitSectionAction implements Action {
header: string,
config: string,
mandatory: boolean,
scope: SectionScope,
sectionType: SectionsType,
visibility: SectionVisibility,
enabled: boolean,
data: WorkspaceitemSectionDataType,
errors: SubmissionSectionError[]) {
this.payload = { submissionId, sectionId, header, config, mandatory, sectionType, visibility, enabled, data, errors };
this.payload = { submissionId, sectionId, header, config, mandatory, scope, sectionType, visibility, enabled, data, errors };
}
}

View File

@@ -167,6 +167,7 @@ describe('SubmissionObjectEffects test suite', () => {
sectionDefinition.header,
config,
sectionDefinition.mandatory,
sectionDefinition.scope,
sectionDefinition.sectionType,
sectionDefinition.visibility,
enabled,

View File

@@ -116,6 +116,7 @@ export class SubmissionObjectEffects {
sectionDefinition.header,
config,
sectionDefinition.mandatory,
sectionDefinition.scope,
sectionDefinition.sectionType,
sectionDefinition.visibility,
enabled,

View File

@@ -237,6 +237,7 @@ describe('submissionReducer test suite', () => {
header: 'submit.progressbar.describe.stepone',
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpageone',
mandatory: true,
scope: null,
sectionType: 'submission-form',
visibility: undefined,
collapsed: false,
@@ -257,6 +258,7 @@ describe('submissionReducer test suite', () => {
'submit.progressbar.describe.stepone',
'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpageone',
true,
null,
SectionsType.SubmissionForm,
undefined,
true,

View File

@@ -565,6 +565,7 @@ function initSection(state: SubmissionObjectState, action: InitSectionAction): S
header: action.payload.header,
config: action.payload.config,
mandatory: action.payload.mandatory,
scope: action.payload.scope,
sectionType: action.payload.sectionType,
visibility: action.payload.visibility,
collapsed: false,

View File

@@ -1,6 +1,9 @@
import { WorkspaceitemSectionDataType } from '../../core/submission/models/workspaceitem-sections.model';
import { SectionsType } from '../sections/sections-type';
import { SectionVisibility } from './section-visibility.model';
import {
SectionScope,
SectionVisibility,
} from './section-visibility.model';
import { SubmissionSectionError } from './submission-section-error.model';
/**
@@ -22,6 +25,11 @@ export interface SubmissionSectionObject {
*/
mandatory: boolean;
/**
* The submission scope for this section
*/
scope: SectionScope;
/**
* The section type
*/