diff --git a/backend/core/src/main/java/org/opencdmp/service/prefillingsource/PrefillingSourceServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/prefillingsource/PrefillingSourceServiceImpl.java index 951a0c564..03daa3584 100644 --- a/backend/core/src/main/java/org/opencdmp/service/prefillingsource/PrefillingSourceServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/prefillingsource/PrefillingSourceServiceImpl.java @@ -476,6 +476,7 @@ public class PrefillingSourceServiceImpl implements PrefillingSourceService { Tag tag = new Tag(); tag.setLabel(tagString.trim()); descriptionTag.setTag(tag); + descriptionTag.setIsActive(IsActive.Active); description.getDescriptionTags().add(descriptionTag); } } diff --git a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts index 3ee6be608..2113ffdec 100644 --- a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts +++ b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts @@ -313,7 +313,7 @@ export class ResultFieldsMappingConfigurationEditorModel implements ResultFields } return this.formBuilder.group({ - code: [{ value: this.code, disabled: true }, context.getValidation('code').validators], + code: [{ value: this.code, disabled: disabled }, context.getValidation('code').validators], responsePath: [{ value: this.responsePath, disabled: disabled }, context.getValidation('responsePath').validators], }); } @@ -722,7 +722,7 @@ export class StaticOptionEditorModel implements StaticOptionPersist { } return this.formBuilder.group({ - code: [{ value: this.code, disabled: true }, context.getValidation('code').validators], + code: [{ value: this.code, disabled: disabled }, context.getValidation('code').validators], value: [{ value: this.value, disabled: disabled }, context.getValidation('value').validators], }); } diff --git a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html index cac29980f..de9579499 100644 --- a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html +++ b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html @@ -141,7 +141,7 @@
{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CODE' | translate}} - + {{field.get('code').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} @@ -372,7 +372,7 @@
{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CODE' | translate}} - + {{option.get('code').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/ui/tag/tags-field/tags-field.component.ts b/dmp-frontend/src/app/ui/tag/tags-field/tags-field.component.ts index c9bf5bd8f..cfb0d4f41 100644 --- a/dmp-frontend/src/app/ui/tag/tags-field/tags-field.component.ts +++ b/dmp-frontend/src/app/ui/tag/tags-field/tags-field.component.ts @@ -1,5 +1,5 @@ import { COMMA, ENTER } from '@angular/cdk/keycodes'; -import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; +import { Component, ElementRef, Input, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; import { MatChipInputEvent } from '@angular/material/chips'; @@ -30,8 +30,15 @@ export class TagsComponent extends BaseComponent implements OnInit { ) { super(); } + ngOnChanges(changes: SimpleChanges) { + if(changes['form']) this.applyTags(); + } ngOnInit(): void { + this.applyTags(); + } + + applyTags(){ this.tags = this.form.value || []; this.filteredTags = this.form.valueChanges.pipe( startWith(null),