diff --git a/src/app/core/integration/integration-response-parsing.service.ts b/src/app/core/integration/integration-response-parsing.service.ts index f6e93e3f01..f8b919c362 100644 --- a/src/app/core/integration/integration-response-parsing.service.ts +++ b/src/app/core/integration/integration-response-parsing.service.ts @@ -32,7 +32,6 @@ export class IntegrationResponseParsingService extends BaseResponseParsingServic parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse { if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links)) { - console.log(request); const dataDefinition = this.process(data.payload, request.href); return new IntegrationSuccessResponse(dataDefinition[Object.keys(dataDefinition)[0]], data.statusCode, data.statusText, this.processPageInfo(data.payload)); } else { diff --git a/src/app/submission/sections/container/section-container.component.html b/src/app/submission/sections/container/section-container.component.html index 898a4e5596..42fc96a228 100644 --- a/src/app/submission/sections/container/section-container.component.html +++ b/src/app/submission/sections/container/section-container.component.html @@ -13,7 +13,9 @@ {{ 'submission.sections.'+sectionData.header | translate }}
- + @@ -30,7 +32,7 @@
-
+
; @@ -50,7 +51,9 @@ export class SectionsDirective implements OnDestroy, OnInit { parsedErrors.forEach((error: SectionErrorPath) => { if (!error.fieldId) { - this.sectionErrors = uniq(this.sectionErrors.concat(errorItem.message)); + this.genericSectionErrors = uniq(this.genericSectionErrors.concat(errorItem.message)); + } else { + this.allSectionErrors.push(errorItem.message); } }); }); @@ -113,12 +116,17 @@ export class SectionsDirective implements OnDestroy, OnInit { this.sectionService.removeSection(submissionId, sectionId) } + public hasGenericErrors() { + return this.genericSectionErrors && this.genericSectionErrors.length > 0 + } + public hasErrors() { - return this.sectionErrors && this.sectionErrors.length > 0 + return (this.genericSectionErrors && this.genericSectionErrors.length > 0) || + (this.allSectionErrors && this.allSectionErrors.length > 0) } public getErrors() { - return this.sectionErrors; + return this.genericSectionErrors; } public setFocus(event) { @@ -128,14 +136,15 @@ export class SectionsDirective implements OnDestroy, OnInit { } public removeError(index) { - this.sectionErrors.splice(index); + this.genericSectionErrors.splice(index); } public resetErrors() { - if (isNotEmpty(this.sectionErrors)) { + if (isNotEmpty(this.genericSectionErrors)) { this.sectionService.dispatchRemoveSectionErrors(this.submissionId, this.sectionId); } - this.sectionErrors = []; + this.genericSectionErrors = []; + this.allSectionErrors = []; } }