pull commit

This commit is contained in:
Diamantis Tziotzios 2023-11-22 15:54:14 +02:00
parent 033492a25c
commit 6b95730280
1 changed files with 37 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import { DescriptionTemplateTypeStatus } from '@app/core/common/enum/description
import { DmpBlueprintSystemFieldType } from '@app/core/common/enum/dmp-blueprint-system-field-type'; import { DmpBlueprintSystemFieldType } from '@app/core/common/enum/dmp-blueprint-system-field-type';
import { DmpBlueprintStatus } from '@app/core/common/enum/dmp-blueprint-status'; import { DmpBlueprintStatus } from '@app/core/common/enum/dmp-blueprint-status';
import { DescriptionTemplateStatus } from '@app/core/common/enum/description-template-status'; import { DescriptionTemplateStatus } from '@app/core/common/enum/description-template-status';
import { DescriptionTemplateFieldType } from '@app/core/common/enum/description-template-field-type';
@Injectable() @Injectable()
export class EnumUtils { export class EnumUtils {
@ -235,4 +236,40 @@ export class EnumUtils {
case DmpBlueprintExtraFieldDataType.ExternalAutocomplete: return this.language.instant('TYPES.DMP-BLUEPRINT-EXTRA-FIELD-DATA-TYPE.EXTERNAL-AUTOCOMPLETE'); case DmpBlueprintExtraFieldDataType.ExternalAutocomplete: return this.language.instant('TYPES.DMP-BLUEPRINT-EXTRA-FIELD-DATA-TYPE.EXTERNAL-AUTOCOMPLETE');
} }
} }
toDescriptionTemplateFieldTypeString(status: DescriptionTemplateFieldType) :string{
switch (status) {
case DescriptionTemplateFieldType.COMBO_BOX: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.COMBO-BOX');
case DescriptionTemplateFieldType.AUTO_COMPLETE: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.AUTO-COMPLETE');
case DescriptionTemplateFieldType.WORD_LIST: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.WORD-LIST');
case DescriptionTemplateFieldType.BOOLEAN_DECISION: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.BOOLEAN-DECISION');
case DescriptionTemplateFieldType.RADIO_BOX: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.RADIO-BOX');
case DescriptionTemplateFieldType.INTERNAL_DMP_ENTRIES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.INTERNAL-DMP-ENTITIES');
case DescriptionTemplateFieldType.INTERNAL_DMP_ENTRIES_RESEARCHERS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.INTERNAL-DMP-ENTITIES-RESEARCHERS');
case DescriptionTemplateFieldType.INTERNAL_DMP_ENTRIES_DMPS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.INTERNAL-DMP-ENTITIES-DMPS');
case DescriptionTemplateFieldType.INTERNAL_DMP_ENTRIES_DATASETS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.INTERNAL-DMP-ENTITIES-DATASETS');
case DescriptionTemplateFieldType.CHECK_BOX: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.CHECKBOX');
case DescriptionTemplateFieldType.FREE_TEXT: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.FREE-TEXT');
case DescriptionTemplateFieldType.TEXT_AREA: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.TEXT-AREA');
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.DATA_REPOSITORIES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.DATA-REPOSITORIES');
case DescriptionTemplateFieldType.JOURNAL_REPOSITORIES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.JOURNALS-REPOSITORIES');
case DescriptionTemplateFieldType.PUB_REPOSITORIES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.PUB-REPOSITORIES');
case DescriptionTemplateFieldType.LICENSES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.LICENSES');
case DescriptionTemplateFieldType.TAXONOMIES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.TAXONOMIES');
case DescriptionTemplateFieldType.PUBLICATIONS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.PUBLICATIONS');
case DescriptionTemplateFieldType.REGISTRIES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.REGISTRIES');
case DescriptionTemplateFieldType.SERVICES: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.SERVICES');
case DescriptionTemplateFieldType.TAGS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.TAGS');
case DescriptionTemplateFieldType.RESEARCHERS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.RESEARCHERS');
case DescriptionTemplateFieldType.ORGANIZATIONS: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.ORGANIZATIONS');
case DescriptionTemplateFieldType.DATASET_IDENTIFIER: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.DATASET-IDENTIFIER');
case DescriptionTemplateFieldType.CURRENCY: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.CURRENCY');
case DescriptionTemplateFieldType.VALIDATION: return this.language.instant('TYPES.DESCRIPTION-TEMPLATE-FIELD-TYPE.VALIDATION');
}
}
} }