mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +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:
@@ -5,3 +5,9 @@ export interface SectionVisibility {
|
||||
main: any;
|
||||
other: any;
|
||||
}
|
||||
|
||||
|
||||
export enum SectionScope {
|
||||
Submission = 'SUBMISSION',
|
||||
Workflow = 'WORKFLOW',
|
||||
}
|
||||
|
@@ -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 };
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -167,6 +167,7 @@ describe('SubmissionObjectEffects test suite', () => {
|
||||
sectionDefinition.header,
|
||||
config,
|
||||
sectionDefinition.mandatory,
|
||||
sectionDefinition.scope,
|
||||
sectionDefinition.sectionType,
|
||||
sectionDefinition.visibility,
|
||||
enabled,
|
||||
|
@@ -116,6 +116,7 @@ export class SubmissionObjectEffects {
|
||||
sectionDefinition.header,
|
||||
config,
|
||||
sectionDefinition.mandatory,
|
||||
sectionDefinition.scope,
|
||||
sectionDefinition.sectionType,
|
||||
sectionDefinition.visibility,
|
||||
enabled,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user