|
|
|
@ -8,6 +8,7 @@
|
|
|
|
|
<i>{{fieldSet.extendedDescription}}</i>
|
|
|
|
|
</h5>
|
|
|
|
|
<mat-form-field *ngSwitchCase="descriptionTemplateFieldTypeEnum.FREE_TEXT" class="col-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<input matInput [formControl]="propertiesFormGroup?.get(field.id).get('textValue')" placeholder="{{(field.data.label) + (isRequired? ' *': '')}}" [required]="isRequired">
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('textValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
@ -16,10 +17,10 @@
|
|
|
|
|
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.REFERENCE_TYPES" class="col-12">
|
|
|
|
|
<ng-container *ngIf="field.data.multipleSelect">
|
|
|
|
|
<app-reference-field-component [form]="propertiesFormGroup?.get(field.id).get('references')" [label]="field.label" [placeholder]="(field.data.label | translate) + (isRequired ? ' *': '')" [referenceType]="field.data.referenceType" [multiple]="true" [required]="isRequired" hint="{{ 'TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT' | translate }}"></app-reference-field-component>
|
|
|
|
|
<app-reference-field-component [form]="propertiesFormGroup?.get(field.id).get('references')" [label]="field.data.label" [placeholder]="(field.data.label | translate) + (isRequired ? ' *': '')" [referenceType]="field.data.referenceType" [multiple]="true" [required]="isRequired" hint="{{ 'TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT' | translate }}"></app-reference-field-component>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-container *ngIf="!(field.data.multipleSelect)">
|
|
|
|
|
<app-reference-field-component [form]="propertiesFormGroup?.get(field.id).get('reference')" [label]="field.label" [placeholder]="(field.data.label | translate) + (isRequired ? ' *': '')" [referenceType]="field.data.referenceType" [multiple]="false" [required]="isRequired" hint="{{ 'TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT' | translate }}"></app-reference-field-component>
|
|
|
|
|
<app-reference-field-component [form]="propertiesFormGroup?.get(field.id).get('reference')" [label]="field.data.label" [placeholder]="(field.data.label | translate) + (isRequired ? ' *': '')" [referenceType]="field.data.referenceType" [multiple]="false" [required]="isRequired" hint="{{ 'TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT' | translate }}"></app-reference-field-component>
|
|
|
|
|
</ng-container>
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.SELECT" class="col-12">
|
|
|
|
@ -45,40 +46,50 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.INTERNAL_ENTRIES_DESCRIPTIONS" class="col-12">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<ng-container *ngIf="field.data.multipleSelect">
|
|
|
|
|
<app-multiple-auto-complete placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}" [formControl]="propertiesFormGroup?.get(field.id).get('textListValue')" [configuration]="descriptionService.multipleAutocompleteConfiguration">
|
|
|
|
|
</app-multiple-auto-complete>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textListValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('textListValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textListValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
<ng-container *ngIf="field.data.multipleSelect">
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<app-multiple-auto-complete placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}" [formControl]="propertiesFormGroup?.get(field.id).get('textListValue')" [configuration]="descriptionService.multipleAutocompleteConfiguration">
|
|
|
|
|
</app-multiple-auto-complete>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textListValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('textListValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textListValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
<mat-hint>{{ "TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT" | translate }}</mat-hint>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-container *ngIf="!(field.data.multipleSelect)">
|
|
|
|
|
<app-single-auto-complete placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}" [formControl]="propertiesFormGroup?.get(field.id).get('textValue')" [configuration]="descriptionService.singleAutocompleteConfiguration" [required]="isRequired">
|
|
|
|
|
</app-single-auto-complete>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('textValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<app-single-auto-complete placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}" [formControl]="propertiesFormGroup?.get(field.id).get('textValue')" [configuration]="descriptionService.singleAutocompleteConfiguration" [required]="isRequired">
|
|
|
|
|
</app-single-auto-complete>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('textValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
<mat-hint>{{ "TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT" | translate }}</mat-hint>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<mat-hint>{{ "TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT" | translate }}</mat-hint>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.INTERNAL_ENTRIES_DMPS" class="col-12">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<ng-container *ngIf="field.data.multipleSelect">
|
|
|
|
|
<ng-container *ngIf="field.data.multipleSelect">
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<app-multiple-auto-complete placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}" [formControl]="propertiesFormGroup?.get(field.id).get('textListValue')" [configuration]="dmpService.multipleAutocompleteConfiguration">
|
|
|
|
|
</app-multiple-auto-complete>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textListValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('textListValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textListValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-container *ngIf="!(field.data.multipleSelect)">
|
|
|
|
|
<mat-hint>{{ "TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT" | translate }}</mat-hint>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-container *ngIf="!(field.data.multipleSelect)">
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<app-single-auto-complete placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}" [formControl]="propertiesFormGroup?.get(field.id).get('textValue')" [configuration]="dmpService.singleAutocompleteConfiguration" [required]="isRequired">
|
|
|
|
|
</app-single-auto-complete>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('textValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<mat-hint>{{ "TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT" | translate }}</mat-hint>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
<mat-hint>{{ "TYPES.DATASET-PROFILE-COMBO-BOX-TYPE.EXTERNAL-SOURCE-HINT" | translate }}</mat-hint>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</ng-container>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.CHECK_BOX" class="col-12">
|
|
|
|
@ -87,6 +98,7 @@
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('booleanValue').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('booleanValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
</div>
|
|
|
|
|
<mat-form-field *ngSwitchCase="descriptionTemplateFieldTypeEnum.TEXT_AREA" class="col-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<textarea matInput class="text-area" [formControl]="propertiesFormGroup?.get(field.id).get('textValue')" matTextareaAutosize matAutosizeMinRows="3" matAutosizeMaxRows="15" [required]="isRequired" placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}"></textarea>
|
|
|
|
|
<button mat-icon-button type="button" *ngIf="!propertiesFormGroup?.get(field.id).get('textValue').disabled && propertiesFormGroup?.get(field.id).get('textValue').value" matSuffix aria-label="Clear" (click)="this.propertiesFormGroup?.get(field.id).get('textValue').patchValue('')">
|
|
|
|
|
<mat-icon>close</mat-icon>
|
|
|
|
@ -147,6 +159,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<mat-form-field *ngSwitchCase="descriptionTemplateFieldTypeEnum.DATE_PICKER" class="col-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<input matInput placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}" class="table-input" [matDatepicker]="date" [required]="isRequired" [formControl]="propertiesFormGroup?.get(field.id).get('dateValue')">
|
|
|
|
|
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
|
|
|
|
|
<mat-datepicker #date></mat-datepicker>
|
|
|
|
@ -157,6 +170,7 @@
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.TAGS" class="col-12">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<app-multiple-auto-complete [configuration]="tagService.multipleAutocompleteConfiguration" [formControl]="propertiesFormGroup?.get(field.id).get('textListValue')" placeholder="{{ (field.data.label | translate) + (isRequired? ' *': '') }}"></app-multiple-auto-complete>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('textListValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
@ -166,11 +180,13 @@
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.DATASET_IDENTIFIER" class="col-12">
|
|
|
|
|
<div class="row" *ngIf="datasetIdInitialized">
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<input matInput class="col-md-12" [formControl]="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier')" placeholder="{{(field.data.label) + (isRequired? ' *': '')}}" [required]="isRequired" [disabled]="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').disabled">
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<mat-select class="col-md-12" [formControl]="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('type')" [placeholder]="('TYPES.DATASET-PROFILE-IDENTIFIER.IDENTIFIER-TYPE' | translate) + (isRequired? ' *': '')" [disabled]="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('type').disabled">
|
|
|
|
|
<mat-option *ngFor="let type of datasetIdTypes" [value]="type.value">
|
|
|
|
|
{{ type.name }}
|
|
|
|
@ -185,11 +201,13 @@
|
|
|
|
|
<div *ngSwitchCase="descriptionTemplateFieldTypeEnum.VALIDATION" class="col-12">
|
|
|
|
|
<div class="row align-items-baseline">
|
|
|
|
|
<mat-form-field class="col-md-4">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<input matInput class="col-md-12" [formControl]="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier')" placeholder="{{(field.data.label) + (isRequired? ' *': '')}}" [required]="isRequired">
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').hasError('backendError')">{{propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
<mat-form-field class="col-md-4">
|
|
|
|
|
<mat-label>{{ field.data.label }}</mat-label>
|
|
|
|
|
<mat-select class="col-md-12" [formControl]="propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('type')" [placeholder]="('TYPES.DATASET-PROFILE-VALIDATOR.REPOSITORIES-PLACEHOLDER' | translate) + (isRequired? ' *': '')">
|
|
|
|
|
<mat-option *ngFor="let type of validationTypes" [value]="type.value">
|
|
|
|
|
{{ type.name }}
|
|
|
|
|