mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
fixed functionality after merge
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { CacheableObject, TypedObject } from '../object-cache.reducer';
|
||||
import { autoserialize } from 'cerialize';
|
||||
import { autoserialize, deserialize } from 'cerialize';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
/**
|
||||
* An abstract model class for a NormalizedObject.
|
||||
@@ -8,10 +8,10 @@ export abstract class NormalizedObject<T extends TypedObject> implements Cacheab
|
||||
/**
|
||||
* The link to the rest endpoint where this object can be found
|
||||
*/
|
||||
@autoserialize
|
||||
@deserialize
|
||||
self: string;
|
||||
|
||||
@autoserialize
|
||||
@deserialize
|
||||
_links: {
|
||||
[name: string]: string
|
||||
};
|
||||
@@ -19,6 +19,6 @@ export abstract class NormalizedObject<T extends TypedObject> implements Cacheab
|
||||
/**
|
||||
* A string representing the kind of object
|
||||
*/
|
||||
@autoserialize
|
||||
@deserialize
|
||||
type: string;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { distinctUntilChanged, filter, find, first, map, mergeMap, switchMap, take, tap } from 'rxjs/operators';
|
||||
import { distinctUntilChanged, filter, find, first, map, mergeMap, skipWhile, switchMap, take, tap } from 'rxjs/operators';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
import { hasValue, isNotEmpty, isNotEmptyOperator } from '../../shared/empty.util';
|
||||
@@ -190,12 +190,16 @@ export abstract class DataService<T extends CacheableObject> {
|
||||
|
||||
return hrefObs.pipe(
|
||||
find((href: string) => hasValue(href)),
|
||||
switchMap((href: string) => {
|
||||
tap((href: string) => {
|
||||
this.requestService.removeByHrefSubstring(href);
|
||||
const request = new FindAllRequest(this.requestService.generateRequestId(), href, options);
|
||||
this.requestService.configure(request, true);
|
||||
return this.rdbService.buildList<T>(href) as Observable<RemoteData<PaginatedList<T>>>
|
||||
}
|
||||
),
|
||||
switchMap((href) => this.requestService.getByHref(href)),
|
||||
skipWhile((requestEntry) => hasValue(requestEntry)),
|
||||
switchMap((href) =>
|
||||
this.rdbService.buildList<T>(hrefObs) as Observable<RemoteData<PaginatedList<T>>>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@@ -90,6 +90,7 @@ describe('RelationshipService', () => {
|
||||
objectCache,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
@@ -263,6 +263,7 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
return this.getItemRelationshipsByLabel(item1, label)
|
||||
.pipe(
|
||||
getSucceededRemoteData(),
|
||||
isNotEmptyOperator(),
|
||||
tap((t) => console.log(t)),
|
||||
map((relationshipListRD: RemoteData<PaginatedList<Relationship>>) => relationshipListRD.payload.page),
|
||||
mergeMap((relationships: Relationship[]) => {
|
||||
@@ -322,9 +323,9 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
const { relation, type } = relationshipAndType;
|
||||
let updatedRelationship;
|
||||
if (relationshipLabel === type.leftwardType) {
|
||||
updatedRelationship = Object.assign(new Relationship(), relation, { rightWardValue: nameVariant });
|
||||
updatedRelationship = Object.assign(new Relationship(), relation, { rightwardValue: nameVariant });
|
||||
} else {
|
||||
updatedRelationship = Object.assign(new Relationship(), relation, { leftWardValue: nameVariant });
|
||||
updatedRelationship = Object.assign(new Relationship(), relation, { leftwardValue: nameVariant });
|
||||
}
|
||||
return this.update(updatedRelationship);
|
||||
})
|
||||
|
@@ -96,14 +96,15 @@ describe('DsDynamicFormControlContainerComponent test suite', () => {
|
||||
new DynamicSwitchModel({ id: 'switch' }),
|
||||
new DynamicTextAreaModel({ id: 'textarea' }),
|
||||
new DynamicTimePickerModel({ id: 'timepicker' }),
|
||||
new DynamicTypeaheadModel({ id: 'typeahead', workspaceItem: new WorkspaceItem(), repeatable: false }),
|
||||
new DynamicTypeaheadModel({ id: 'typeahead', metadataFields: [], repeatable: false, submissionId: '1234' }),
|
||||
new DynamicScrollableDropdownModel({
|
||||
id: 'scrollableDropdown',
|
||||
authorityOptions: authorityOptions,
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
repeatable: false
|
||||
metadataFields: [],
|
||||
repeatable: false,
|
||||
submissionId: '1234'
|
||||
}),
|
||||
new DynamicTagModel({ id: 'tag', workspaceItem: new WorkspaceItem(), repeatable: false}),
|
||||
new DynamicTagModel({ id: 'tag', metadataFields: [], repeatable: false, submissionId: '1234'}),
|
||||
new DynamicListCheckboxGroupModel({
|
||||
id: 'checkboxList',
|
||||
authorityOptions: authorityOptions,
|
||||
@@ -123,12 +124,12 @@ describe('DsDynamicFormControlContainerComponent test suite', () => {
|
||||
relationFields: [],
|
||||
scopeUUID: '',
|
||||
submissionScope: '',
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
repeatable: false
|
||||
repeatable: false,
|
||||
metadataFields: []
|
||||
}),
|
||||
new DynamicDsDatePickerModel({ id: 'datepicker'}),
|
||||
new DynamicLookupModel({ id: 'lookup', workspaceItem: new WorkspaceItem(), repeatable: false }),
|
||||
new DynamicLookupNameModel({ id: 'lookupName', workspaceItem: new WorkspaceItem(), repeatable: false }),
|
||||
new DynamicLookupModel({ id: 'lookup', metadataFields: [], repeatable: false, submissionId: '1234' }),
|
||||
new DynamicLookupNameModel({ id: 'lookupName', metadataFields: [], repeatable: false, submissionId: '1234' }),
|
||||
new DynamicQualdropModel({ id: 'combobox', readOnly: false, required: false })
|
||||
];
|
||||
const testModel = formModel[8];
|
||||
|
@@ -89,7 +89,8 @@ import { ItemDataService } from '../../../../core/data/item-data.service';
|
||||
import { RemoveRelationshipAction } from './relation-lookup-modal/relationship.actions';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppState } from '../../../../app.reducer';
|
||||
import { RelationshipOptions } from '../models/relationship-options.model';
|
||||
import { SubmissionObjectDataService } from '../../../../core/submission/submission-object-data.service';
|
||||
import { SubmissionObject } from '../../../../core/submission/models/submission-object.model';
|
||||
|
||||
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
||||
switch (model.type) {
|
||||
@@ -204,7 +205,8 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
||||
private itemService: ItemDataService,
|
||||
private relationshipService: RelationshipService,
|
||||
private zone: NgZone,
|
||||
private store: Store<AppState>
|
||||
private store: Store<AppState>,
|
||||
private submissionObjectService: SubmissionObjectDataService
|
||||
) {
|
||||
super(componentFactoryResolver, layoutService, validationService);
|
||||
}
|
||||
@@ -269,17 +271,22 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
||||
}
|
||||
|
||||
openLookup() {
|
||||
this.model.workspaceItem.item.pipe(getSucceededRemoteData(), getRemoteDataPayload())
|
||||
.subscribe((item: Item) => {
|
||||
this.modalRef = this.modalService.open(DsDynamicLookupRelationModalComponent, { size: 'lg' });
|
||||
const modalComp = this.modalRef.componentInstance;
|
||||
modalComp.repeatable = this.model.repeatable;
|
||||
modalComp.listId = this.listId;
|
||||
modalComp.relationshipOptions = this.model.relationship;
|
||||
modalComp.label = this.model.label;
|
||||
modalComp.item = item;
|
||||
modalComp.metadataFields = this.model.metadataFields;
|
||||
})
|
||||
this.submissionObjectService
|
||||
.findById(this.model.submissionId).pipe(
|
||||
getSucceededRemoteData(),
|
||||
getRemoteDataPayload(),
|
||||
switchMap((submissionObject: SubmissionObject) =>
|
||||
(submissionObject.item as Observable<RemoteData<Item>>).pipe(getSucceededRemoteData(), getRemoteDataPayload()))
|
||||
).subscribe((item: Item) => {
|
||||
this.modalRef = this.modalService.open(DsDynamicLookupRelationModalComponent, { size: 'lg' });
|
||||
const modalComp = this.modalRef.componentInstance;
|
||||
modalComp.repeatable = this.model.repeatable;
|
||||
modalComp.listId = this.listId;
|
||||
modalComp.relationshipOptions = this.model.relationship;
|
||||
modalComp.label = this.model.label;
|
||||
modalComp.item = item;
|
||||
modalComp.metadataFields = this.model.metadataFields;
|
||||
})
|
||||
}
|
||||
|
||||
removeSelection(object: SearchResult<Item>) {
|
||||
|
@@ -5,7 +5,6 @@ import { Subject } from 'rxjs';
|
||||
import { isNotEmpty } from '../../../../empty.util';
|
||||
import { DsDynamicInputModel } from './ds-dynamic-input.model';
|
||||
import { FormFieldMetadataValueObject } from '../../models/form-field-metadata-value.model';
|
||||
import { WorkspaceItem } from '../../../../../core/submission/models/workspaceitem.model';
|
||||
import { RelationshipOptions } from '../../models/relationship-options.model';
|
||||
|
||||
export const CONCAT_GROUP_SUFFIX = '_CONCAT_GROUP';
|
||||
@@ -15,22 +14,22 @@ export const CONCAT_SECOND_INPUT_SUFFIX = '_CONCAT_SECOND_INPUT';
|
||||
export interface DynamicConcatModelConfig extends DynamicFormGroupModelConfig {
|
||||
separator: string;
|
||||
value?: any;
|
||||
workspaceItem: WorkspaceItem;
|
||||
relationship?: RelationshipOptions;
|
||||
repeatable: boolean;
|
||||
required: boolean;
|
||||
metadataFields: string[];
|
||||
submissionId: string;
|
||||
}
|
||||
|
||||
export class DynamicConcatModel extends DynamicFormGroupModel {
|
||||
|
||||
@serializable() separator: string;
|
||||
@serializable() hasLanguages = false;
|
||||
@serializable() workspaceItem: WorkspaceItem;
|
||||
@serializable() relationship?: RelationshipOptions;
|
||||
@serializable() repeatable?: boolean;
|
||||
@serializable() required?: boolean;
|
||||
@serializable() metadataFields: string[];
|
||||
@serializable() submissionId: string;
|
||||
|
||||
isCustomGroup = true;
|
||||
valueUpdates: Subject<string>;
|
||||
@@ -41,10 +40,10 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
|
||||
|
||||
this.separator = config.separator + ' ';
|
||||
this.relationship = config.relationship;
|
||||
this.workspaceItem = config.workspaceItem;
|
||||
this.repeatable = config.repeatable;
|
||||
this.required = config.required;
|
||||
this.metadataFields = config.metadataFields;
|
||||
this.submissionId = config.submissionId;
|
||||
|
||||
this.valueUpdates = new Subject<string>();
|
||||
this.valueUpdates.subscribe((value: string) => this.value = value);
|
||||
|
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
DynamicFormControlLayout,
|
||||
DynamicInputModel,
|
||||
DynamicInputModelConfig,
|
||||
serializable
|
||||
} from '@ng-dynamic-forms/core';
|
||||
import { DynamicFormControlLayout, DynamicInputModel, DynamicInputModelConfig, serializable } from '@ng-dynamic-forms/core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import { LanguageCode } from '../../models/form-field-language-value.model';
|
||||
@@ -11,10 +6,8 @@ import { AuthorityOptions } from '../../../../../core/integration/models/authori
|
||||
import { hasValue } from '../../../../empty.util';
|
||||
import { FormFieldMetadataValueObject } from '../../models/form-field-metadata-value.model';
|
||||
import { RelationshipOptions } from '../../models/relationship-options.model';
|
||||
import { WorkspaceItem } from '../../../../../core/submission/models/workspaceitem.model';
|
||||
|
||||
export interface DsDynamicInputModelConfig extends DynamicInputModelConfig {
|
||||
workspaceItem: WorkspaceItem;
|
||||
authorityOptions?: AuthorityOptions;
|
||||
languageCodes?: LanguageCode[];
|
||||
language?: string;
|
||||
@@ -22,6 +15,7 @@ export interface DsDynamicInputModelConfig extends DynamicInputModelConfig {
|
||||
relationship?: RelationshipOptions;
|
||||
repeatable: boolean;
|
||||
metadataFields: string[];
|
||||
submissionId: string;
|
||||
}
|
||||
|
||||
export class DsDynamicInputModel extends DynamicInputModel {
|
||||
@@ -30,10 +24,10 @@ export class DsDynamicInputModel extends DynamicInputModel {
|
||||
@serializable() private _languageCodes: LanguageCode[];
|
||||
@serializable() private _language: string;
|
||||
@serializable() languageUpdates: Subject<string>;
|
||||
@serializable() workspaceItem: WorkspaceItem;
|
||||
@serializable() relationship?: RelationshipOptions;
|
||||
@serializable() repeatable?: boolean;
|
||||
@serializable() metadataFields: string[];
|
||||
@serializable() submissionId: string;
|
||||
|
||||
constructor(config: DsDynamicInputModelConfig, layout?: DynamicFormControlLayout) {
|
||||
super(config, layout);
|
||||
@@ -43,7 +37,8 @@ export class DsDynamicInputModel extends DynamicInputModel {
|
||||
this.readOnly = config.readOnly;
|
||||
this.value = config.value;
|
||||
this.relationship = config.relationship;
|
||||
this.workspaceItem = config.workspaceItem;
|
||||
this.submissionId = config.submissionId;
|
||||
|
||||
this.language = config.language;
|
||||
if (!this.language) {
|
||||
// TypeAhead
|
||||
|
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
DYNAMIC_FORM_CONTROL_TYPE_ARRAY,
|
||||
DynamicFormArrayModel, DynamicFormArrayModelConfig, DynamicFormControlLayout,
|
||||
serializable
|
||||
} from '@ng-dynamic-forms/core';
|
||||
import { DYNAMIC_FORM_CONTROL_TYPE_TAG } from './tag/dynamic-tag.model';
|
||||
import { DynamicFormArrayModel, DynamicFormArrayModelConfig, DynamicFormControlLayout, serializable } from '@ng-dynamic-forms/core';
|
||||
|
||||
export interface DynamicRowArrayModelConfig extends DynamicFormArrayModelConfig {
|
||||
notRepeatable: boolean;
|
||||
|
@@ -50,7 +50,8 @@ let LOOKUP_TEST_MODEL_CONFIG = {
|
||||
separator: ',',
|
||||
validators: { required: null },
|
||||
value: undefined,
|
||||
workspaceItem: new WorkspaceItem()
|
||||
metadataFields: [],
|
||||
submissionId: '1234'
|
||||
};
|
||||
|
||||
let LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
||||
@@ -73,7 +74,8 @@ let LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
||||
separator: ',',
|
||||
validators: { required: null },
|
||||
value: undefined,
|
||||
workspaceItem: new WorkspaceItem()
|
||||
metadataFields: [],
|
||||
submissionId: '1234'
|
||||
};
|
||||
|
||||
let LOOKUP_TEST_GROUP = new FormGroup({
|
||||
@@ -105,7 +107,8 @@ describe('Dynamic Lookup component', () => {
|
||||
separator: ',',
|
||||
validators: { required: null },
|
||||
value: undefined,
|
||||
workspaceItem: new WorkspaceItem()
|
||||
metadataFields: [],
|
||||
submissionId: '1234'
|
||||
};
|
||||
|
||||
LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
||||
@@ -128,7 +131,8 @@ describe('Dynamic Lookup component', () => {
|
||||
separator: ',',
|
||||
validators: { required: null },
|
||||
value: undefined,
|
||||
workspaceItem: new WorkspaceItem()
|
||||
metadataFields: [],
|
||||
submissionId: '1234'
|
||||
};
|
||||
|
||||
LOOKUP_TEST_GROUP = new FormGroup({
|
||||
|
@@ -81,7 +81,8 @@ function init() {
|
||||
scopeUUID: '43fe1f8c-09a6-4fcf-9c78-5d4fed8f2c8f',
|
||||
submissionScope: undefined,
|
||||
validators: { required: null },
|
||||
repeatable: false
|
||||
repeatable: false,
|
||||
metadataFields: []
|
||||
} as DynamicRelationGroupModelConfig;
|
||||
|
||||
FORM_GROUP_TEST_GROUP = new FormGroup({
|
||||
|
@@ -97,7 +97,6 @@ export class DsDynamicRelationGroupComponent extends DynamicFormControlComponent
|
||||
config,
|
||||
this.model.scopeUUID,
|
||||
{},
|
||||
this.model.workspaceItem,
|
||||
this.model.submissionScope,
|
||||
this.model.readOnly);
|
||||
this.initChipsFromModelValue();
|
||||
|
@@ -16,7 +16,6 @@ import { DsDynamicScrollableDropdownComponent } from './dynamic-scrollable-dropd
|
||||
import { DynamicScrollableDropdownModel } from './dynamic-scrollable-dropdown.model';
|
||||
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
||||
import { createTestComponent, hasClass } from '../../../../../testing/utils';
|
||||
import { WorkspaceItem } from '../../../../../../core/submission/models/workspaceitem.model';
|
||||
|
||||
export const SD_TEST_GROUP = new FormGroup({
|
||||
dropdown: new FormControl(),
|
||||
@@ -40,7 +39,8 @@ export const SD_TEST_MODEL_CONFIG = {
|
||||
required: false,
|
||||
repeatable: false,
|
||||
value: undefined,
|
||||
workspaceItem: new WorkspaceItem()
|
||||
metadataFields: [],
|
||||
submissionId: '1234'
|
||||
};
|
||||
|
||||
describe('Dynamic Dynamic Scrollable Dropdown component', () => {
|
||||
|
@@ -41,5 +41,5 @@ export function nameVariantReducer(state: NameVariantListsState = {}, action: Na
|
||||
}
|
||||
|
||||
function setNameVariant(state: NameVariantListState, itemID: string, nameVariant: string) {
|
||||
return Object.assign({}, state, { [itemID]: { nameVariant } });
|
||||
return Object.assign({}, state, { [itemID]: nameVariant });
|
||||
}
|
||||
|
@@ -195,11 +195,11 @@ describe('FormBuilderService test suite', () => {
|
||||
|
||||
new DynamicColorPickerModel({id: 'testColorPicker'}),
|
||||
|
||||
new DynamicTypeaheadModel({id: 'testTypeahead', repeatable: false}),
|
||||
new DynamicTypeaheadModel({id: 'testTypeahead', repeatable: false, metadataFields: [], submissionId: '1234'}),
|
||||
|
||||
new DynamicScrollableDropdownModel({id: 'testScrollableDropdown', authorityOptions: authorityOptions, repeatable: false}),
|
||||
new DynamicScrollableDropdownModel({id: 'testScrollableDropdown', authorityOptions: authorityOptions, repeatable: false, metadataFields: [], submissionId: '1234'}),
|
||||
|
||||
new DynamicTagModel({id: 'testTag', repeatable: false}),
|
||||
new DynamicTagModel({id: 'testTag', repeatable: false, metadataFields: [], submissionId: '1234'}),
|
||||
|
||||
new DynamicListCheckboxGroupModel({id: 'testCheckboxList', authorityOptions: authorityOptions, repeatable: true}),
|
||||
|
||||
@@ -243,14 +243,15 @@ describe('FormBuilderService test suite', () => {
|
||||
relationFields: [],
|
||||
scopeUUID: '',
|
||||
submissionScope: '',
|
||||
repeatable: false
|
||||
repeatable: false,
|
||||
metadataFields: []
|
||||
}),
|
||||
|
||||
new DynamicDsDatePickerModel({id: 'testDate'}),
|
||||
|
||||
new DynamicLookupModel({id: 'testLookup', repeatable: false}),
|
||||
new DynamicLookupModel({id: 'testLookup', repeatable: false, metadataFields: [], submissionId: '1234'}),
|
||||
|
||||
new DynamicLookupNameModel({id: 'testLookupName', repeatable: false}),
|
||||
new DynamicLookupNameModel({id: 'testLookupName', repeatable: false, metadataFields: [], submissionId: '1234'}),
|
||||
|
||||
new DynamicQualdropModel({id: 'testCombobox', readOnly: false, required: false}),
|
||||
|
||||
|
@@ -199,6 +199,8 @@ export abstract class FieldParser {
|
||||
controlModel.relationship = this.configData.selectableRelationship;
|
||||
controlModel.repeatable = this.configData.repeatable;
|
||||
controlModel.metadataFields = isNotEmpty(this.configData.selectableMetadata) ? this.configData.selectableMetadata.map((metadataObject) => metadataObject.metadata) : [];
|
||||
controlModel.submissionId = this.submissionId;
|
||||
|
||||
// Set label
|
||||
this.setLabel(controlModel, label);
|
||||
|
||||
|
@@ -108,7 +108,11 @@ export class ParserFactory {
|
||||
}
|
||||
}
|
||||
case undefined: {
|
||||
return DisabledFieldParser
|
||||
return {
|
||||
provide: FieldParser,
|
||||
useClass: DisabledFieldParser,
|
||||
deps: [...fieldParserDeps]
|
||||
}
|
||||
}
|
||||
default: {
|
||||
return undefined;
|
||||
|
@@ -55,7 +55,7 @@ export const qualdropInputConfig = {
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: 'test',
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -136,7 +136,6 @@ const relationGroupConfig = {
|
||||
'issue test 2'
|
||||
],
|
||||
},
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -165,7 +164,7 @@ export const inputWithLanguageAndAuthorityConfig = {
|
||||
display: 'testWithLanguageAndAuthority',
|
||||
id: 'testWithLanguageAndAuthority',
|
||||
},
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -189,7 +188,7 @@ export const inputWithLanguageConfig = {
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: 'testWithLanguage',
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -218,7 +217,7 @@ export const inputWithLanguageAndAuthorityArrayConfig = {
|
||||
display: 'testLanguageAndAuthorityArray',
|
||||
id: 'testLanguageAndAuthorityArray',
|
||||
}],
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -231,7 +230,7 @@ export const inputWithFormFieldValueConfig = {
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: new FormFieldMetadataValueObject('testWithFormFieldValue'),
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -244,7 +243,7 @@ export const inputWithAuthorityValueConfig = {
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: Object.assign({}, new AuthorityValue(), { value: 'testWithAuthorityValue', id: 'testWithAuthorityValue', display: 'testWithAuthorityValue' }),
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -257,7 +256,7 @@ export const inputWithObjectValueConfig = {
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: { value: 'testWithObjectValue', id: 'testWithObjectValue', display: 'testWithObjectValue' },
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
@@ -274,7 +273,7 @@ export const fileFormEditInputConfig = {
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
workspaceItem: new WorkspaceItem(),
|
||||
submissionId: '1234',
|
||||
metadataFields: []
|
||||
};
|
||||
|
||||
|
@@ -118,11 +118,11 @@ const testFormConfiguration = {
|
||||
const testFormModel = [
|
||||
new DynamicRowGroupModel({
|
||||
id: 'df-row-group-config-1',
|
||||
group: [new DsDynamicInputModel({ id: 'dc.title', workspaceItem: new WorkspaceItem(), repeatable: false })],
|
||||
group: [new DsDynamicInputModel({ id: 'dc.title', metadataFields: [], repeatable: false, submissionId: '1234' })],
|
||||
}),
|
||||
new DynamicRowGroupModel({
|
||||
id: 'df-row-group-config-2',
|
||||
group: [new DsDynamicInputModel({ id: 'dc.contributor', workspaceItem: new WorkspaceItem(), repeatable: false })],
|
||||
group: [new DsDynamicInputModel({ id: 'dc.contributor', metadataFields: [], repeatable: false, submissionId: '1234' })],
|
||||
})
|
||||
];
|
||||
|
||||
|
@@ -233,7 +233,6 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
|
||||
this.formConfig,
|
||||
this.collectionId,
|
||||
sectionData,
|
||||
this.workspaceItem,
|
||||
this.submissionService.getSubmissionScope()
|
||||
);
|
||||
} catch (e) {
|
||||
|
@@ -170,7 +170,6 @@ export class SubmissionSectionUploadFileEditComponent implements OnChanges {
|
||||
configForm,
|
||||
this.collectionId,
|
||||
this.fileData.metadata,
|
||||
undefined,
|
||||
this.submissionService.getSubmissionScope()
|
||||
);
|
||||
formModel.push(new DynamicFormGroupModel(metadataGroupModelConfig, BITSTREAM_METADATA_FORM_GROUP_LAYOUT));
|
||||
|
Reference in New Issue
Block a user