diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts index a968a3d7c7..0064c2e093 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts @@ -415,7 +415,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo const arrayContext: DynamicFormArrayModel = (this.context as DynamicFormArrayGroupModel).context; const path = this.formBuilderService.getPath(arrayContext); const formArrayControl = this.group.root.get(path) as FormArray; - console.log('this.listId', this.listId); this.formBuilderService.removeFormArrayGroup(this.context.index, formArrayControl, arrayContext); } diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts index 8f24f3f05f..5eda1372eb 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts @@ -119,7 +119,6 @@ export class DsDynamicScrollableDropdownComponent extends DynamicFormControlComp onSelect(event) { this.group.markAsDirty(); - console.log('onSelect event', event); this.model.valueUpdates.next(event); this.change.emit(event); this.setCurrentValue(event); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.effects.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.effects.ts index c43d229ac4..350c483060 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.effects.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.effects.ts @@ -115,6 +115,9 @@ export class RelationshipEffects { ) ); + /** + * Save the latest submission ID, to make sure it's updated when the patch is finished + */ @Effect({ dispatch: false }) updateRelationshipActions$ = this.actions$ .pipe( ofType(RelationshipActionTypes.UPDATE_RELATIONSHIP), @@ -123,7 +126,10 @@ export class RelationshipEffects { }) ); - @Effect() commitServerSyncBuffer = this.actions$ + /** + * Save the submission object with ID updateAfterPatchSubmissionId + */ + @Effect() saveSubmissionSection = this.actions$ .pipe( ofType(ServerSyncBufferActionTypes.EMPTY, JsonPatchOperationsActionTypes.COMMIT_JSON_PATCH_OPERATIONS), filter(() => hasValue(this.updateAfterPatchSubmissionId)), @@ -174,7 +180,11 @@ export class RelationshipEffects { }); } - refreshWorkspaceItemInCache(submissionId: string): Observable { + /** + * Make sure the SubmissionObject is refreshed in the cache after being used + * @param submissionId The ID of the submission object + */ + private refreshWorkspaceItemInCache(submissionId: string): Observable { return this.submissionObjectService.getHrefByID(submissionId).pipe(take(1)).pipe( switchMap((href: string) => { this.objectCache.remove(href); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts index a3fbaaa14a..b01af2e57b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts @@ -29,6 +29,9 @@ import { createSuccessfulRemoteDataObject } from '../../../../../remote-data.uti * Tab for inside the lookup model that represents the currently selected relationships */ export class DsDynamicLookupRelationSelectionTabComponent { + /** + * A string that describes the type of relationship + */ @Input() relationshipType: string; /** diff --git a/src/app/submission/objects/submission-objects.effects.ts b/src/app/submission/objects/submission-objects.effects.ts index aac34ee51e..2dfed9ee47 100644 --- a/src/app/submission/objects/submission-objects.effects.ts +++ b/src/app/submission/objects/submission-objects.effects.ts @@ -242,6 +242,9 @@ export class SubmissionObjectEffects { catchError(() => observableOf(new DiscardSubmissionErrorAction(action.payload.submissionId)))); })); + /** + * Adds all metadata an item to the SubmissionForm sections of the submission + */ @Effect() addAllMetadataToSectionData = this.actions$.pipe( ofType(SubmissionObjectActionTypes.UPLOAD_SECTION_DATA), switchMap((action: UpdateSectionDataAction) => {