mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 14:33:03 +00:00
hide upload section on init when is not mandatory and there a no file uploaded in the submission
This commit is contained in:
@@ -131,7 +131,10 @@ export class SubmissionResponseParsingService extends BaseResponseParsingService
|
||||
// Iterate over all workspaceitem's sections
|
||||
Object.keys(item.sections)
|
||||
.forEach((sectionId) => {
|
||||
if (typeof item.sections[sectionId] === 'object' && isNotEmpty(item.sections[sectionId])) {
|
||||
if (typeof item.sections[sectionId] === 'object' && (isNotEmpty(item.sections[sectionId]) &&
|
||||
// When Upload section is disabled, add to submission only if there are files
|
||||
(!item.sections[sectionId].hasOwnProperty('files') || isNotEmpty((item.sections[sectionId] as any).files)))) {
|
||||
|
||||
const normalizedSectionData = Object.create({});
|
||||
// Iterate over all sections property
|
||||
Object.keys(item.sections[sectionId])
|
||||
|
Reference in New Issue
Block a user