validator to external datases tipe requierd, Space in to Dataset Fields Titles, AutoComplete Fix option selection
This commit is contained in:
parent
c991da090b
commit
8c5c57375a
|
@ -32,7 +32,7 @@ public class DatasetWizardModel implements DataModel<Dataset, DatasetWizardModel
|
|||
private List<DataRepository> dataRepositories;
|
||||
private List<Tag> tags;
|
||||
private List<ExternalDatasetListingModel> externalDatasets;
|
||||
private DatasetProfileListingModel profile;
|
||||
private UUID profile;
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
|
@ -130,11 +130,11 @@ public class DatasetWizardModel implements DataModel<Dataset, DatasetWizardModel
|
|||
this.dataRepositories = dataRepositories;
|
||||
}
|
||||
|
||||
public DatasetProfileListingModel getProfile() {
|
||||
public UUID getProfile() {
|
||||
return profile;
|
||||
}
|
||||
|
||||
public void setProfile(DatasetProfileListingModel profile) {
|
||||
public void setProfile(UUID profile) {
|
||||
this.profile = profile;
|
||||
}
|
||||
|
||||
|
@ -161,9 +161,8 @@ public class DatasetWizardModel implements DataModel<Dataset, DatasetWizardModel
|
|||
this.status = entity.getStatus();
|
||||
this.reference = entity.getReference();
|
||||
this.description = entity.getDescription();
|
||||
this.profile = new DatasetProfileListingModel();
|
||||
this.profile = entity.getProfile().getId();
|
||||
this.uri = entity.getUri();
|
||||
this.profile.fromDataModel(entity.getProfile());
|
||||
this.registries = entity.getRegistries().stream().map(item -> new Registry().fromDataModel(item)).collect(Collectors.toList());
|
||||
this.dataRepositories = entity.getDatasetDataRepositories().stream().map(item -> {
|
||||
DataRepository dataRepository = new DataRepository().fromDataModel(item.getDataRepository());
|
||||
|
@ -204,7 +203,9 @@ public class DatasetWizardModel implements DataModel<Dataset, DatasetWizardModel
|
|||
entity.setDescription(this.description);
|
||||
entity.setCreated(this.created != null ? this.created : new Date());
|
||||
entity.setModified(new Date());
|
||||
entity.setProfile(profile.toDataModel()); ///TODO
|
||||
DatasetProfile profile = new DatasetProfile();
|
||||
profile.setId(this.profile);
|
||||
entity.setProfile(profile);
|
||||
if (this.registries != null && !this.registries.isEmpty()) {
|
||||
entity.setRegistries(new HashSet<eu.eudat.data.entities.Registry>());
|
||||
for (Registry registry : this.registries) {
|
||||
|
|
|
@ -173,6 +173,7 @@ export class MultipleAutoCompleteComponent implements OnInit, MatFormFieldContro
|
|||
this._setValue(newValue);
|
||||
this.stateChanges.next();
|
||||
this.optionSelected.emit(newValue);
|
||||
this.textInput.nativeElement.value = '';
|
||||
}
|
||||
|
||||
private _setValue(value: any) {
|
||||
|
@ -254,7 +255,7 @@ export class MultipleAutoCompleteComponent implements OnInit, MatFormFieldContro
|
|||
pushChanges(value: any) { this.onChange(value); }
|
||||
registerOnChange(fn: (_: any) => {}): void { this.onChange = fn; }
|
||||
registerOnTouched(fn: () => {}): void { this.onTouched = fn; }
|
||||
setDisabledState(isDisabled: boolean): void { }
|
||||
setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; }
|
||||
|
||||
setDescribedByIds(ids: string[]) {
|
||||
this.describedBy = ids.join(' ');
|
||||
|
|
|
@ -253,7 +253,7 @@ export class ExternalDatasetEditorModel {
|
|||
abbreviation: [this.abbreviation],
|
||||
label: [this.label],
|
||||
reference: [this.reference],
|
||||
type: [this.type],
|
||||
type: [this.type, Validators.required],
|
||||
info: [this.info]
|
||||
});
|
||||
}
|
||||
|
|
|
@ -59,10 +59,11 @@
|
|||
|
||||
<div class="col-auto">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="{{'DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-DATASET-TYPE' | translate}}" [formControl]="suggestion.get('type')">
|
||||
<mat-select placeholder="{{'DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-DATASET-TYPE' | translate}}" [formControl]="suggestion.get('type')" required>
|
||||
<mat-option [value]="0">{{'TYPES.EXTERNAL-DATASET-TYPE.SOURCE' | translate}}</mat-option>
|
||||
<mat-option [value]="1">{{'TYPES.EXTERNAL-DATASET-TYPE.OUTPUT' | translate}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="suggestion.get('type').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<div *ngIf="compositeField.fields.length == 1" class="col-12">
|
||||
<div class="row">
|
||||
<h5 *ngIf="compositeField.title" style="font-weight:bold; color: #3a3737;" class="col-12">{{compositeField.numbering}}
|
||||
{{compositeField.title}}
|
||||
<h5 *ngIf="compositeField.title" style="font-weight:bold; color: #3a3737;" class="col-12">{{compositeField.numbering}} {{compositeField.title}}
|
||||
<!-- <a *ngIf="this.markForConsiderationService.exists(compositeField)" (click)="markForConsideration()" style="cursor: pointer">
|
||||
Mark For Consideration
|
||||
</a> -->
|
||||
|
@ -17,7 +16,7 @@
|
|||
</div>
|
||||
<div *ngIf="compositeField.fields.length > 1" class="col-12">
|
||||
<div class="row">
|
||||
<h5 *ngIf="compositeField.title" style="font-weight:bold; color: #3a3737;" class="col-12">{{compositeField.numbering}}{{compositeField.title}}</h5>
|
||||
<h5 *ngIf="compositeField.title" style="font-weight:bold; color: #3a3737;" class="col-12">{{compositeField.numbering}} {{compositeField.title}}</h5>
|
||||
<h5 *ngIf="compositeField.description" class="col-12">{{compositeField.description}}</h5>
|
||||
<h5 *ngIf="compositeField.extendedDescription" class="col-12">
|
||||
<i>{{compositeField.extendedDescription}}</i>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
<div *ngSwitchCase="datasetProfileFieldViewStyleEnum.ComboBox" class="col-12">
|
||||
<div class="row">
|
||||
<mat-form-field class="col-md-12">
|
||||
<app-single-auto-complete *ngIf="this.field.data.type === datasetProfileComboBoxTypeEnum.Autocomplete" placeholder="{{ form.get('data').value.label | translate }}" [formControl]="form.get('value')" [configuration]="singleAutoCompleteConfiguration">
|
||||
<mat-form-field class="col-md-12" *ngIf="this.field.data.type === datasetProfileComboBoxTypeEnum.Autocomplete">
|
||||
<app-single-auto-complete placeholder="{{ form.get('data').value.label | translate }}" [formControl]="form.get('value')" [configuration]="singleAutoCompleteConfiguration">
|
||||
</app-single-auto-complete>
|
||||
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
|
|
|
@ -42,8 +42,7 @@ export class VisibilityRulesService {
|
|||
}
|
||||
|
||||
public checkElementVisibility(id: string): boolean {
|
||||
return true;
|
||||
//return !this.elementVisibilityMap.has(id) || this.elementVisibilityMap.get(id);
|
||||
return !this.elementVisibilityMap.has(id) || this.elementVisibilityMap.get(id);
|
||||
}
|
||||
|
||||
public buildVisibilityRules(item: Array<Rule>) {
|
||||
|
@ -53,7 +52,7 @@ export class VisibilityRulesService {
|
|||
|
||||
public updateValueAndVisibility(id: string) {
|
||||
const visibilityRules = this.visibilityRuleContext.rules.filter(item => item.sourceVisibilityRules.filter(source => source.sourceControlId === id).length > 0);
|
||||
//visibilityRules.forEach(item => this.evaluateVisibility(item));
|
||||
visibilityRules.forEach(item => this.evaluateVisibility(item));
|
||||
}
|
||||
|
||||
private evaluateVisibility(visibilityRule: VisibilityRule) {
|
||||
|
|
Loading…
Reference in New Issue