mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
[835] Auto-save in new Item Submission form breaks the form
Section formId added to the section state. Error filtering during the parsing of the submission response.
This commit is contained in:
@@ -40,6 +40,7 @@ export const SubmissionObjectActionTypes = {
|
||||
INIT_SECTION: type('dspace/submission/INIT_SECTION'),
|
||||
ENABLE_SECTION: type('dspace/submission/ENABLE_SECTION'),
|
||||
DISABLE_SECTION: type('dspace/submission/DISABLE_SECTION'),
|
||||
SET_SECTION_FORM_ID: type('dspace/submission/SET_SECTION_FORM_ID'),
|
||||
SECTION_STATUS_CHANGE: type('dspace/submission/SECTION_STATUS_CHANGE'),
|
||||
SECTION_LOADING_STATUS_CHANGE: type('dspace/submission/SECTION_LOADING_STATUS_CHANGE'),
|
||||
UPDATE_SECTION_DATA: type('dspace/submission/UPDATE_SECTION_DATA'),
|
||||
@@ -256,6 +257,29 @@ export class RemoveSectionErrorsAction implements Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class SetSectionFormId implements Action {
|
||||
type = SubmissionObjectActionTypes.SET_SECTION_FORM_ID;
|
||||
payload: {
|
||||
submissionId: string;
|
||||
sectionId: string;
|
||||
formId: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a new SetSectionFormId
|
||||
*
|
||||
* @param submissionId
|
||||
* the submission's ID
|
||||
* @param sectionId
|
||||
* the section's ID
|
||||
* @param formId
|
||||
* the section's formId
|
||||
*/
|
||||
constructor(submissionId: string, sectionId: string, formId: string) {
|
||||
this.payload = { submissionId, sectionId, formId };
|
||||
}
|
||||
}
|
||||
|
||||
// Submission actions
|
||||
|
||||
export class CompleteInitSubmissionFormAction implements Action {
|
||||
@@ -782,6 +806,7 @@ export class DeleteUploadedFileAction implements Action {
|
||||
*/
|
||||
export type SubmissionObjectAction = DisableSectionAction
|
||||
| InitSectionAction
|
||||
| SetSectionFormId
|
||||
| EnableSectionAction
|
||||
| InitSubmissionFormAction
|
||||
| ResetSubmissionFormAction
|
||||
|
Reference in New Issue
Block a user