prefill tags changes
This commit is contained in:
parent
500503ad37
commit
e41c7f8abc
|
@ -476,6 +476,7 @@ public class PrefillingSourceServiceImpl implements PrefillingSourceService {
|
||||||
Tag tag = new Tag();
|
Tag tag = new Tag();
|
||||||
tag.setLabel(tagString.trim());
|
tag.setLabel(tagString.trim());
|
||||||
descriptionTag.setTag(tag);
|
descriptionTag.setTag(tag);
|
||||||
|
descriptionTag.setIsActive(IsActive.Active);
|
||||||
description.getDescriptionTags().add(descriptionTag);
|
description.getDescriptionTags().add(descriptionTag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,7 +313,7 @@ export class ResultFieldsMappingConfigurationEditorModel implements ResultFields
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.formBuilder.group({
|
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],
|
responsePath: [{ value: this.responsePath, disabled: disabled }, context.getValidation('responsePath').validators],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -722,7 +722,7 @@ export class StaticOptionEditorModel implements StaticOptionPersist {
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.formBuilder.group({
|
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],
|
value: [{ value: this.value, disabled: disabled }, context.getValidation('value').validators],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<mat-form-field class="w-100">
|
<mat-form-field class="w-100">
|
||||||
<mat-label>{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CODE' | translate}}</mat-label>
|
<mat-label>{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CODE' | translate}}</mat-label>
|
||||||
<input matInput type="text" [readonly]="field.get('code').disabled" name="code" [formControl]="field.get('code')" [readOnly]="true">
|
<input matInput type="text" [readonly]="true" name="code" [formControl]="field.get('code')">
|
||||||
<mat-error *ngIf="field.get('code').hasError('backendError')">{{field.get('code').getError('backendError').message}}</mat-error>
|
<mat-error *ngIf="field.get('code').hasError('backendError')">{{field.get('code').getError('backendError').message}}</mat-error>
|
||||||
<mat-error *ngIf="field.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
<mat-error *ngIf="field.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
@ -372,7 +372,7 @@
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<mat-form-field class="w-100">
|
<mat-form-field class="w-100">
|
||||||
<mat-label>{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CODE' | translate}}</mat-label>
|
<mat-label>{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CODE' | translate}}</mat-label>
|
||||||
<input matInput type="text" [readonly]="option.get('code').disabled" name="code" [formControl]="option.get('code')">
|
<input matInput type="text" [readonly]="true" name="code" [formControl]="option.get('code')">
|
||||||
<mat-error *ngIf="option.get('code').hasError('backendError')">{{option.get('code').getError('backendError').message}}</mat-error>
|
<mat-error *ngIf="option.get('code').hasError('backendError')">{{option.get('code').getError('backendError').message}}</mat-error>
|
||||||
<mat-error *ngIf="option.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
<mat-error *ngIf="option.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
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 { UntypedFormControl } from '@angular/forms';
|
||||||
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
||||||
import { MatChipInputEvent } from '@angular/material/chips';
|
import { MatChipInputEvent } from '@angular/material/chips';
|
||||||
|
@ -30,8 +30,15 @@ export class TagsComponent extends BaseComponent implements OnInit {
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
|
if(changes['form']) this.applyTags();
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.applyTags();
|
||||||
|
}
|
||||||
|
|
||||||
|
applyTags(){
|
||||||
this.tags = this.form.value || [];
|
this.tags = this.form.value || [];
|
||||||
this.filteredTags = this.form.valueChanges.pipe(
|
this.filteredTags = this.form.valueChanges.pipe(
|
||||||
startWith(null),
|
startWith(null),
|
||||||
|
|
Loading…
Reference in New Issue