mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 13:33:03 +00:00
65711: implemented retrieval and initial saving of name variants
This commit is contained in:
@@ -292,8 +292,9 @@ export class RelationshipService extends DataService<Relationship> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getNameVariant(listID: string, itemID: string): Observable<string> {
|
public getNameVariant(listID: string, itemID: string): Observable<string> {
|
||||||
|
console.log(listID, itemID);
|
||||||
return this.appStore.pipe(
|
return this.appStore.pipe(
|
||||||
select(relationshipStateSelector(listID, itemID)), map((state: RelationshipState) => hasValue(state) ? state.nameVariant : undefined)
|
select(relationshipStateSelector(listID, itemID)), tap((t) => console.log(t)), map((state: RelationshipState) => hasValue(state) ? state.nameVariant : undefined)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -89,7 +89,7 @@ import { ItemDataService } from '../../../../core/data/item-data.service';
|
|||||||
import { RemoveRelationshipAction } from './relation-lookup-modal/relationship.actions';
|
import { RemoveRelationshipAction } from './relation-lookup-modal/relationship.actions';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { AppState } from '../../../../app.reducer';
|
import { AppState } from '../../../../app.reducer';
|
||||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
import { RelationshipOptions } from '../models/relationship-options.model';
|
||||||
|
|
||||||
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
||||||
switch (model.type) {
|
switch (model.type) {
|
||||||
@@ -273,9 +273,10 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
|||||||
const modalComp = this.modalRef.componentInstance;
|
const modalComp = this.modalRef.componentInstance;
|
||||||
modalComp.repeatable = this.model.repeatable;
|
modalComp.repeatable = this.model.repeatable;
|
||||||
modalComp.listId = this.listId;
|
modalComp.listId = this.listId;
|
||||||
modalComp.relationship = this.model.relationship;
|
modalComp.relationshipOptions = this.model.relationship;
|
||||||
modalComp.label = this.model.label;
|
modalComp.label = this.model.label;
|
||||||
modalComp.itemRD$ = this.model.workspaceItem.item;
|
modalComp.itemRD$ = this.model.workspaceItem.item;
|
||||||
|
modalComp.metadataFields = this.model.metadataFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
removeSelection(object: SearchResult<Item>) {
|
removeSelection(object: SearchResult<Item>) {
|
||||||
|
@@ -19,6 +19,7 @@ export interface DynamicConcatModelConfig extends DynamicFormGroupModelConfig {
|
|||||||
relationship?: RelationshipOptions;
|
relationship?: RelationshipOptions;
|
||||||
repeatable: boolean;
|
repeatable: boolean;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
|
metadataFields: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DynamicConcatModel extends DynamicFormGroupModel {
|
export class DynamicConcatModel extends DynamicFormGroupModel {
|
||||||
@@ -29,6 +30,8 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
|
|||||||
@serializable() relationship?: RelationshipOptions;
|
@serializable() relationship?: RelationshipOptions;
|
||||||
@serializable() repeatable?: boolean;
|
@serializable() repeatable?: boolean;
|
||||||
@serializable() required?: boolean;
|
@serializable() required?: boolean;
|
||||||
|
@serializable() metadataFields: string[];
|
||||||
|
|
||||||
isCustomGroup = true;
|
isCustomGroup = true;
|
||||||
valueUpdates: Subject<string>;
|
valueUpdates: Subject<string>;
|
||||||
|
|
||||||
@@ -41,6 +44,7 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
|
|||||||
this.workspaceItem = config.workspaceItem;
|
this.workspaceItem = config.workspaceItem;
|
||||||
this.repeatable = config.repeatable;
|
this.repeatable = config.repeatable;
|
||||||
this.required = config.required;
|
this.required = config.required;
|
||||||
|
this.metadataFields = config.metadataFields;
|
||||||
|
|
||||||
this.valueUpdates = new Subject<string>();
|
this.valueUpdates = new Subject<string>();
|
||||||
this.valueUpdates.subscribe((value: string) => this.value = value);
|
this.valueUpdates.subscribe((value: string) => this.value = value);
|
||||||
@@ -64,7 +68,7 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
|
|||||||
let tempValue: string;
|
let tempValue: string;
|
||||||
|
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
tempValue = value;
|
tempValue = value;
|
||||||
} else {
|
} else {
|
||||||
tempValue = value.value;
|
tempValue = value.value;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ export interface DsDynamicInputModelConfig extends DynamicInputModelConfig {
|
|||||||
value?: any;
|
value?: any;
|
||||||
relationship?: RelationshipOptions;
|
relationship?: RelationshipOptions;
|
||||||
repeatable: boolean;
|
repeatable: boolean;
|
||||||
|
metadataFields: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DsDynamicInputModel extends DynamicInputModel {
|
export class DsDynamicInputModel extends DynamicInputModel {
|
||||||
@@ -32,11 +33,12 @@ export class DsDynamicInputModel extends DynamicInputModel {
|
|||||||
@serializable() workspaceItem: WorkspaceItem;
|
@serializable() workspaceItem: WorkspaceItem;
|
||||||
@serializable() relationship?: RelationshipOptions;
|
@serializable() relationship?: RelationshipOptions;
|
||||||
@serializable() repeatable?: boolean;
|
@serializable() repeatable?: boolean;
|
||||||
|
@serializable() metadataFields: string[];
|
||||||
|
|
||||||
constructor(config: DsDynamicInputModelConfig, layout?: DynamicFormControlLayout) {
|
constructor(config: DsDynamicInputModelConfig, layout?: DynamicFormControlLayout) {
|
||||||
super(config, layout);
|
super(config, layout);
|
||||||
this.repeatable = config.repeatable;
|
this.repeatable = config.repeatable;
|
||||||
|
this.metadataFields = config.metadataFields;
|
||||||
this.hint = config.hint;
|
this.hint = config.hint;
|
||||||
this.readOnly = config.readOnly;
|
this.readOnly = config.readOnly;
|
||||||
this.value = config.value;
|
this.value = config.value;
|
||||||
@@ -90,5 +92,4 @@ export class DsDynamicInputModel extends DynamicInputModel {
|
|||||||
this.language = this.languageCodes ? this.languageCodes[0].code : null;
|
this.language = this.languageCodes ? this.languageCodes[0].code : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<ds-dynamic-lookup-relation-search-tab
|
<ds-dynamic-lookup-relation-search-tab
|
||||||
[selection$]="selection$"
|
[selection$]="selection$"
|
||||||
[listId]="listId"
|
[listId]="listId"
|
||||||
[relationship]="relationship"
|
[relationship]="relationshipOptions"
|
||||||
[repeatable]="repeatable"
|
[repeatable]="repeatable"
|
||||||
[context]="context"
|
[context]="context"
|
||||||
(selectObject)="select($event)"
|
(selectObject)="select($event)"
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Component, NgZone, OnInit } from '@angular/core';
|
import { Component, NgZone, OnInit } from '@angular/core';
|
||||||
import { combineLatest, Observable } from 'rxjs';
|
import { combineLatest, Observable } from 'rxjs';
|
||||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { hasValue } from '../../../../empty.util';
|
import { hasValue, hasValueOperator } from '../../../../empty.util';
|
||||||
import { map, switchMap, take, tap } from 'rxjs/operators';
|
import { filter, map, switchMap, take, tap } from 'rxjs/operators';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../../+my-dspace-page/my-dspace-page.component';
|
||||||
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
||||||
import { SelectableListService } from '../../../../object-list/selectable-list/selectable-list.service';
|
import { SelectableListService } from '../../../../object-list/selectable-list/selectable-list.service';
|
||||||
@@ -20,7 +20,7 @@ import { Store } from '@ngrx/store';
|
|||||||
import { AppState } from '../../../../../app.reducer';
|
import { AppState } from '../../../../../app.reducer';
|
||||||
import { Context } from '../../../../../core/shared/context.model';
|
import { Context } from '../../../../../core/shared/context.model';
|
||||||
import { Relationship } from '../../../../../core/shared/item-relationships/relationship.model';
|
import { Relationship } from '../../../../../core/shared/item-relationships/relationship.model';
|
||||||
import { PaginatedList } from '../../../../../core/data/paginated-list';
|
import { MetadataValue } from '../../../../../core/shared/metadata.models';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-dynamic-lookup-relation-modal',
|
selector: 'ds-dynamic-lookup-relation-modal',
|
||||||
@@ -36,12 +36,13 @@ import { PaginatedList } from '../../../../../core/data/paginated-list';
|
|||||||
|
|
||||||
export class DsDynamicLookupRelationModalComponent implements OnInit {
|
export class DsDynamicLookupRelationModalComponent implements OnInit {
|
||||||
label: string;
|
label: string;
|
||||||
relationship: RelationshipOptions;
|
relationshipOptions: RelationshipOptions;
|
||||||
listId: string;
|
listId: string;
|
||||||
itemRD$;
|
itemRD$;
|
||||||
repeatable: boolean;
|
repeatable: boolean;
|
||||||
selection$: Observable<ListableObject[]>;
|
selection$: Observable<ListableObject[]>;
|
||||||
context: Context;
|
context: Context;
|
||||||
|
metadataFields: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public modal: NgbActiveModal,
|
public modal: NgbActiveModal,
|
||||||
@@ -55,30 +56,11 @@ export class DsDynamicLookupRelationModalComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.selection$ = this.selectableListService.getSelectableList(this.listId).pipe(map((listState: SelectableListState) => hasValue(listState) && hasValue(listState.selection) ? listState.selection : []));
|
this.selection$ = this.selectableListService.getSelectableList(this.listId).pipe(map((listState: SelectableListState) => hasValue(listState) && hasValue(listState.selection) ? listState.selection : []));
|
||||||
if (this.relationship.nameVariants) {
|
if (this.relationshipOptions.nameVariants) {
|
||||||
this.context = Context.Submission;
|
this.context = Context.Submission;
|
||||||
}
|
}
|
||||||
this.itemRD$.pipe(
|
this.itemRD$.subscribe((r) => console.log(r));
|
||||||
switchMap((itemRD: RemoteData<Item>) => this.relationshipService.getItemRelationshipsByLabel(itemRD.payload, this.relationship.relationshipType)),
|
this.setExistingNameVariants();
|
||||||
getSucceededRemoteData(),
|
|
||||||
getRemoteDataPayload(),
|
|
||||||
map((relationships: PaginatedList<Relationship>) => relationships.page.)
|
|
||||||
);
|
|
||||||
combineLatest(this.itemRD$, this.selection$)
|
|
||||||
.pipe(
|
|
||||||
take(1),
|
|
||||||
switchMap(([itemRD, objects]: [RemoteData<Item>, ListableObject[]]) => {
|
|
||||||
return combineLatest(objects.map((obj: Item) => this.relationshipService.getRelationshipsByRelatedItemIds(itemRD.payload, [obj.uuid])
|
|
||||||
.pipe(take(1), map((rels: Relationship[]) => [rels[0], obj.uuid] as [Relationship, string])))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
).subscribe((relations: [Relationship, string][]) => {
|
|
||||||
relations.forEach((([rel, id]: [Relationship, string]) => {
|
|
||||||
this.relationshipService.setNameVariant(this.listId, id, rel.)
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
@@ -87,18 +69,27 @@ export class DsDynamicLookupRelationModalComponent implements OnInit {
|
|||||||
|
|
||||||
select(...selectableObjects: SearchResult<Item>[]) {
|
select(...selectableObjects: SearchResult<Item>[]) {
|
||||||
this.zone.runOutsideAngular(
|
this.zone.runOutsideAngular(
|
||||||
() => this.itemRD$
|
() => {
|
||||||
.pipe(
|
const obs: Observable<any[]> = combineLatest(...selectableObjects.map((sri: SearchResult<Item>) => {
|
||||||
getSucceededRemoteData(),
|
return this.relationshipService.getNameVariant(this.listId, sri.indexableObject.uuid)
|
||||||
tap((itemRD: RemoteData<Item>) => {
|
.pipe(map((nameVariant: string) => {
|
||||||
return selectableObjects.forEach((object) =>
|
return {
|
||||||
this.store.dispatch(new AddRelationshipAction(itemRD.payload, object.indexableObject, this.relationship.relationshipType))
|
item: sri.indexableObject,
|
||||||
);
|
nameVariant
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
).subscribe());
|
)
|
||||||
}
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
combineLatest(this.itemRD$.pipe(getSucceededRemoteData()), obs)
|
||||||
|
.subscribe(([itemRD, obs]: [RemoteData<Item>, any[]]) => {
|
||||||
|
return obs.forEach((object: any) =>
|
||||||
|
this.store.dispatch(new AddRelationshipAction(itemRD.payload, object.item, this.relationshipOptions.relationshipType, object.nameVariant))
|
||||||
|
);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
deselect(...selectableObjects: SearchResult<Item>[]) {
|
deselect(...selectableObjects: SearchResult<Item>[]) {
|
||||||
this.zone.runOutsideAngular(
|
this.zone.runOutsideAngular(
|
||||||
@@ -106,11 +97,44 @@ export class DsDynamicLookupRelationModalComponent implements OnInit {
|
|||||||
getSucceededRemoteData(),
|
getSucceededRemoteData(),
|
||||||
tap((itemRD: RemoteData<Item>) => {
|
tap((itemRD: RemoteData<Item>) => {
|
||||||
return selectableObjects.forEach((object) =>
|
return selectableObjects.forEach((object) =>
|
||||||
this.store.dispatch(new RemoveRelationshipAction(itemRD.payload, object.indexableObject, this.relationship.relationshipType))
|
this.store.dispatch(new RemoveRelationshipAction(itemRD.payload, object.indexableObject, this.relationshipOptions.relationshipType))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
).subscribe()
|
).subscribe()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setExistingNameVariants() {
|
||||||
|
const virtualMDs$: Observable<MetadataValue[]> = this.itemRD$.pipe(
|
||||||
|
getSucceededRemoteData(),
|
||||||
|
getRemoteDataPayload(),
|
||||||
|
map((item: Item) => item.allMetadata(this.metadataFields).filter((mdValue) => mdValue.isVirtual)));
|
||||||
|
|
||||||
|
const relatedItemPairs$: Observable<[Item, Item][]> = virtualMDs$.pipe(
|
||||||
|
switchMap((mds: MetadataValue[]) => combineLatest(mds.map((md: MetadataValue) => this.relationshipService.findById(md.virtualValue).pipe(getSucceededRemoteData(), getRemoteDataPayload())))),
|
||||||
|
switchMap((relationships: Relationship[]) => combineLatest(relationships.map((relationship: Relationship) =>
|
||||||
|
combineLatest(
|
||||||
|
relationship.leftItem.pipe(getSucceededRemoteData(), getRemoteDataPayload()),
|
||||||
|
relationship.rightItem.pipe(getSucceededRemoteData(), getRemoteDataPayload())
|
||||||
|
))
|
||||||
|
)
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
const relatedItems$: Observable<Item[]> = combineLatest(relatedItemPairs$, this.itemRD$).pipe(
|
||||||
|
map(([relatedItemPairs, itemRD]: [[Item, Item][], RemoteData<Item>]) => relatedItemPairs.map(([left, right]: [Item, Item]) => left.uuid === itemRD.payload.uuid ? left : right))
|
||||||
|
);
|
||||||
|
|
||||||
|
combineLatest(virtualMDs$, relatedItems$).pipe(take(1)).subscribe(([virtualMDs, relatedItems]) => {
|
||||||
|
let index: number = 0;
|
||||||
|
virtualMDs.forEach(
|
||||||
|
(md: MetadataValue) => {
|
||||||
|
this.relationshipService.setNameVariant(this.listId, relatedItems[index].uuid, md.value);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
@@ -188,7 +188,7 @@ export abstract class FieldParser {
|
|||||||
controlModel.workspaceItem = this.workspaceItem;
|
controlModel.workspaceItem = this.workspaceItem;
|
||||||
controlModel.relationship = this.configData.selectableRelationship;
|
controlModel.relationship = this.configData.selectableRelationship;
|
||||||
controlModel.repeatable = this.configData.repeatable;
|
controlModel.repeatable = this.configData.repeatable;
|
||||||
|
controlModel.metadataFields = isNotEmpty(this.configData.selectableMetadata) ? this.configData.selectableMetadata.map((metadataObject) => metadataObject.metadata) : [];
|
||||||
// Set label
|
// Set label
|
||||||
this.setLabel(controlModel, label);
|
this.setLabel(controlModel, label);
|
||||||
|
|
||||||
|
@@ -55,7 +55,8 @@ export const qualdropInputConfig = {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
repeatable: false,
|
repeatable: false,
|
||||||
value: 'test',
|
value: 'test',
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockQualdropSelectModel = new DynamicSelectModel(qualdropSelectConfig);
|
export const mockQualdropSelectModel = new DynamicSelectModel(qualdropSelectConfig);
|
||||||
@@ -134,7 +135,8 @@ const relationGroupConfig = {
|
|||||||
'issue test 2'
|
'issue test 2'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MockRelationModel: DynamicRelationGroupModel = new DynamicRelationGroupModel(relationGroupConfig);
|
export const MockRelationModel: DynamicRelationGroupModel = new DynamicRelationGroupModel(relationGroupConfig);
|
||||||
@@ -162,7 +164,8 @@ export const inputWithLanguageAndAuthorityConfig = {
|
|||||||
display: 'testWithLanguageAndAuthority',
|
display: 'testWithLanguageAndAuthority',
|
||||||
id: 'testWithLanguageAndAuthority',
|
id: 'testWithLanguageAndAuthority',
|
||||||
},
|
},
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockInputWithLanguageAndAuthorityModel = new DsDynamicInputModel(inputWithLanguageAndAuthorityConfig);
|
export const mockInputWithLanguageAndAuthorityModel = new DsDynamicInputModel(inputWithLanguageAndAuthorityConfig);
|
||||||
@@ -185,7 +188,8 @@ export const inputWithLanguageConfig = {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
repeatable: false,
|
repeatable: false,
|
||||||
value: 'testWithLanguage',
|
value: 'testWithLanguage',
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockInputWithLanguageModel = new DsDynamicInputModel(inputWithLanguageConfig);
|
export const mockInputWithLanguageModel = new DsDynamicInputModel(inputWithLanguageConfig);
|
||||||
@@ -213,7 +217,8 @@ export const inputWithLanguageAndAuthorityArrayConfig = {
|
|||||||
display: 'testLanguageAndAuthorityArray',
|
display: 'testLanguageAndAuthorityArray',
|
||||||
id: 'testLanguageAndAuthorityArray',
|
id: 'testLanguageAndAuthorityArray',
|
||||||
}],
|
}],
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockInputWithLanguageAndAuthorityArrayModel = new DsDynamicInputModel(inputWithLanguageAndAuthorityArrayConfig);
|
export const mockInputWithLanguageAndAuthorityArrayModel = new DsDynamicInputModel(inputWithLanguageAndAuthorityArrayConfig);
|
||||||
@@ -225,7 +230,8 @@ export const inputWithFormFieldValueConfig = {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
repeatable: false,
|
repeatable: false,
|
||||||
value: new FormFieldMetadataValueObject('testWithFormFieldValue'),
|
value: new FormFieldMetadataValueObject('testWithFormFieldValue'),
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockInputWithFormFieldValueModel = new DsDynamicInputModel(inputWithFormFieldValueConfig);
|
export const mockInputWithFormFieldValueModel = new DsDynamicInputModel(inputWithFormFieldValueConfig);
|
||||||
@@ -237,7 +243,8 @@ export const inputWithAuthorityValueConfig = {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
repeatable: false,
|
repeatable: false,
|
||||||
value: Object.assign({}, new AuthorityValue(), { value: 'testWithAuthorityValue', id: 'testWithAuthorityValue', display: 'testWithAuthorityValue' }),
|
value: Object.assign({}, new AuthorityValue(), { value: 'testWithAuthorityValue', id: 'testWithAuthorityValue', display: 'testWithAuthorityValue' }),
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockInputWithAuthorityValueModel = new DsDynamicInputModel(inputWithAuthorityValueConfig);
|
export const mockInputWithAuthorityValueModel = new DsDynamicInputModel(inputWithAuthorityValueConfig);
|
||||||
@@ -249,7 +256,8 @@ export const inputWithObjectValueConfig = {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
repeatable: false,
|
repeatable: false,
|
||||||
value: { value: 'testWithObjectValue', id: 'testWithObjectValue', display: 'testWithObjectValue' },
|
value: { value: 'testWithObjectValue', id: 'testWithObjectValue', display: 'testWithObjectValue' },
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockInputWithObjectValueModel = new DsDynamicInputModel(inputWithObjectValueConfig);
|
export const mockInputWithObjectValueModel = new DsDynamicInputModel(inputWithObjectValueConfig);
|
||||||
@@ -265,7 +273,8 @@ export const fileFormEditInputConfig = {
|
|||||||
readOnly: false,
|
readOnly: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
repeatable: false,
|
repeatable: false,
|
||||||
workspaceItem: new WorkspaceItem()
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
metadataFields: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockFileFormEditInputModel = new DsDynamicInputModel(fileFormEditInputConfig);
|
export const mockFileFormEditInputModel = new DsDynamicInputModel(fileFormEditInputConfig);
|
||||||
|
@@ -241,6 +241,7 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
|
|||||||
message: msg,
|
message: msg,
|
||||||
path: '/sections/' + this.sectionData.id
|
path: '/sections/' + this.sectionData.id
|
||||||
};
|
};
|
||||||
|
console.error(e.stack);
|
||||||
this.sectionService.setSectionError(this.submissionId, this.sectionData.id, sectionError);
|
this.sectionService.setSectionError(this.submissionId, this.sectionData.id, sectionError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user