Merge branch 'followlink-refactor' into metadata-and-relationships-combined-in-submission

This commit is contained in:
Art Lowel
2020-02-24 14:59:28 +01:00
347 changed files with 5892 additions and 4780 deletions

View File

@@ -99,6 +99,7 @@ import { MetadataValue } from '../../../../core/shared/metadata.models';
import { FormService } from '../../form.service';
import { SelectableListState } from '../../../object-list/selectable-list/selectable-list.reducer';
import { SubmissionService } from '../../../../submission/submission.service';
import { followLink } from '../../../utils/follow-link-config.model';
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
switch (model.type) {
@@ -241,7 +242,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
this.setItem();
this.value = Object.assign(new MetadataValue(), this.model.value);
if (hasValue(this.value) && this.value.isVirtual) {
const relationship$ = this.relationshipService.findById(this.value.virtualValue)
const relationship$ = this.relationshipService.findById(this.value.virtualValue, followLink('leftItem'), followLink('rightItem'), followLink('relationshipType'))
.pipe(
getAllSucceededRemoteData(),
getRemoteDataPayload());
@@ -357,7 +358,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
private setItem() {
const submissionObject$ = this.submissionObjectService
.findById(this.model.submissionId).pipe(
.findById(this.model.submissionId, followLink('item'), followLink('collection')).pipe(
getAllSucceededRemoteData(),
getRemoteDataPayload()
);