remove EXTERNAL_DATASETS enum field type value from UI
This commit is contained in:
parent
ac9a377eb4
commit
a50a1e8bc1
|
@ -154,7 +154,6 @@ export class EnumUtils {
|
|||
case DescriptionTemplateFieldType.RICH_TEXT_AREA: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.RICH-TEXT-AREA');
|
||||
case DescriptionTemplateFieldType.UPLOAD: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.UPLOAD');
|
||||
case DescriptionTemplateFieldType.DATE_PICKER: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.DATE-PICKER');
|
||||
// case DescriptionTemplateFieldType.EXTERNAL_DATASETS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.EXTERNAL-DATASETS');
|
||||
case DescriptionTemplateFieldType.TAGS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.TAGS');
|
||||
case DescriptionTemplateFieldType.REFERENCE_TYPES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.REFERENCE-TYPES');
|
||||
case DescriptionTemplateFieldType.DATASET_IDENTIFIER: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.DATASET-IDENTIFIER');
|
||||
|
|
|
@ -197,10 +197,6 @@
|
|||
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Reference types icon">
|
||||
{{enumUtils.toDescriptionTemplateFieldTypeString(descriptionTemplateFieldTypeEnum.REFERENCE_TYPES)}}
|
||||
</button>
|
||||
<button mat-list-item (click)="addNewInput(descriptionTemplateFieldTypeEnum.EXTERNAL_DATASETS)">
|
||||
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="External Datasets icon">
|
||||
{{enumUtils.toDescriptionTemplateFieldTypeString(descriptionTemplateFieldTypeEnum.EXTERNAL_DATASETS)}}
|
||||
</button>
|
||||
</mat-action-list>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
|
|
@ -562,15 +562,6 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon
|
|||
field.data = data;
|
||||
break;
|
||||
}
|
||||
// case DescriptionTemplateFieldType.EXTERNAL_DATASETS: {
|
||||
// const data: DescriptionTemplateExternalDatasetData = {
|
||||
// label: '',
|
||||
// multipleSelect: false,
|
||||
// fieldType: type
|
||||
// }
|
||||
// field.data = data;
|
||||
// break;
|
||||
// }
|
||||
case DescriptionTemplateFieldType.UPLOAD: {
|
||||
const data: DescriptionTemplateUploadData = {
|
||||
label: '',
|
||||
|
|
|
@ -87,10 +87,6 @@
|
|||
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Registries icon">
|
||||
{{enumUtils.toDescriptionTemplateFieldTypeString(descriptionTemplateFieldTypeEnum.REFERENCE_TYPES)}}
|
||||
</mat-option>
|
||||
<mat-option [value]="descriptionTemplateFieldTypeEnum.EXTERNAL_DATASETS">
|
||||
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="ExternalDatasets icon">
|
||||
{{enumUtils.toDescriptionTemplateFieldTypeString(descriptionTemplateFieldTypeEnum.EXTERNAL_DATASETS)}}
|
||||
</mat-option>
|
||||
</mat-optgroup>
|
||||
<!-- TODO -->
|
||||
<mat-divider></mat-divider>
|
||||
|
@ -176,8 +172,6 @@
|
|||
<app-description-template-editor-label-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.DATASET_IDENTIFIER" class="col-12" [form]="form"></app-description-template-editor-label-field-component>
|
||||
<app-description-template-editor-label-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.VALIDATION" class="col-12" [form]="form"></app-description-template-editor-label-field-component>
|
||||
|
||||
<app-description-template-editor-external-datasets-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.EXTERNAL_DATASETS" class="col-12" [form]="form"></app-description-template-editor-external-datasets-field-component>
|
||||
|
||||
<app-description-template-editor-label-and-multiplicity-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.INTERNAL_ENTRIES_DMPS" class="col-12" [form]="form"></app-description-template-editor-label-and-multiplicity-field-component>
|
||||
<app-description-template-editor-label-and-multiplicity-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.INTERNAL_ENTRIES_DESCRIPTIONS" class="col-12" [form]="form"></app-description-template-editor-label-and-multiplicity-field-component>
|
||||
|
||||
|
|
|
@ -170,15 +170,6 @@ export class DescriptionTemplateEditorFieldComponent extends BaseComponent imple
|
|||
field.data = data;
|
||||
break;
|
||||
}
|
||||
// case DescriptionTemplateFieldType.EXTERNAL_DATASETS: {
|
||||
// const data: DescriptionTemplateExternalDatasetData = {
|
||||
// label: '',
|
||||
// multipleSelect: false,
|
||||
// fieldType: type
|
||||
// }
|
||||
// field.data = data;
|
||||
// break;
|
||||
// }
|
||||
case DescriptionTemplateFieldType.UPLOAD: {
|
||||
const data: DescriptionTemplateUploadData = {
|
||||
label: '',
|
||||
|
|
|
@ -704,7 +704,7 @@ export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateF
|
|||
defaultValue: string;
|
||||
visibilityRules: DescriptionTemplateRuleEditorModel[] = [];
|
||||
validations: DescriptionTemplateFieldValidationType[] = [];
|
||||
includeInExport: boolean = false;
|
||||
includeInExport: boolean = true;
|
||||
data: DescriptionTemplateLabelDataEditorModel = new DescriptionTemplateLabelDataEditorModel(this.validationErrorModel);
|
||||
|
||||
protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder();
|
||||
|
@ -802,8 +802,6 @@ export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateF
|
|||
case DescriptionTemplateFieldType.INTERNAL_ENTRIES_DMPS:
|
||||
case DescriptionTemplateFieldType.INTERNAL_ENTRIES_DESCRIPTIONS:
|
||||
return new DescriptionTemplateLabelAndMultiplicityDataEditorModel(this.validationErrorModel);
|
||||
// case DescriptionTemplateFieldType.EXTERNAL_DATASETS:
|
||||
// return new DescriptionTemplateExternalDatasetDataEditorModel(this.validationErrorModel);
|
||||
case DescriptionTemplateFieldType.UPLOAD:
|
||||
return new DescriptionTemplateUploadDataEditorModel(this.validationErrorModel);
|
||||
}
|
||||
|
@ -862,12 +860,6 @@ export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateF
|
|||
rootPath: `${rootPath}data.`,
|
||||
validationErrorModel: validationErrorModel
|
||||
});
|
||||
// case DescriptionTemplateFieldType.EXTERNAL_DATASETS:
|
||||
// DescriptionTemplateExternalDatasetDataEditorModel.reapplyValidators({
|
||||
// formGroup: formGroup?.get('data') as UntypedFormGroup,
|
||||
// rootPath: `${rootPath}data.`,
|
||||
// validationErrorModel: validationErrorModel
|
||||
// });
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
@ -723,9 +723,6 @@ export class DescriptionFieldIndicator {
|
|||
case DescriptionTemplateFieldType.DATE_PICKER:
|
||||
this.type = "dateValue";
|
||||
break;
|
||||
// case DescriptionTemplateFieldType.EXTERNAL_DATASETS:
|
||||
// this.type = "";
|
||||
// break;
|
||||
case DescriptionTemplateFieldType.INTERNAL_ENTRIES_DESCRIPTIONS:
|
||||
if (multipleSelect) this.type = "textListValue";
|
||||
else this.type = "textValue"
|
||||
|
|
|
@ -130,17 +130,6 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
|
|||
this.isRequired = this.field.validations?.includes(DescriptionTemplateFieldValidationType.Required);
|
||||
|
||||
switch (this.field?.data?.fieldType) {
|
||||
// case DescriptionTemplateFieldType.EXTERNAL_DATASETS:
|
||||
// //TODO: refactor
|
||||
// // this.multipleReferenceAutoCompleteConfiguration = {
|
||||
// // filterFn: this.filterOrganisations.bind(this),
|
||||
// // initialItems: (excludedItems: any[]) => this.filterOrganisations('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
|
||||
// // displayFn: (item) => { try { return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name } catch { return '' } },
|
||||
// // titleFn: (item) => { try { return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name } catch { return '' } },
|
||||
// // subtitleFn: (item) => { try { return item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')) } catch { return '' } },
|
||||
// // valueAssign: (item) => { try { return typeof (item) == 'string' ? item : JSON.stringify(item) } catch { return '' } }
|
||||
// // };
|
||||
// break;
|
||||
case DescriptionTemplateFieldType.TAGS:
|
||||
this.tagsAutoCompleteConfiguration = {
|
||||
filterFn: this.filterTags.bind(this),
|
||||
|
|
Loading…
Reference in New Issue