From 7fcada883987efc321cb9fe19719fafe5c1833d2 Mon Sep 17 00:00:00 2001 From: Diamantis Tziotzios Date: Wed, 27 Mar 2024 18:48:58 +0200 Subject: [PATCH] various ui changes --- .../model/reference-type/reference-type.ts | 6 +- ...mplate-editor-composite-field.component.ts | 14 +- .../description-template-editor.model.ts | 36 +-- .../notification-template-editor.model.ts | 4 +- .../reference-type-editor.component.html | 188 ++++++------ .../editor/reference-type-editor.model.ts | 4 +- .../editor/reference-editor.component.html | 63 ++-- .../editor/reference-editor.model.ts | 4 +- .../tenant/editor/tenant-editor.model.ts | 8 +- .../external-fetcher-source-editor.model.ts | 8 +- .../external-fetcher-source.component.html | 273 +++++++++--------- dmp-frontend/src/assets/i18n/en.json | 17 +- 12 files changed, 281 insertions(+), 344 deletions(-) diff --git a/dmp-frontend/src/app/core/model/reference-type/reference-type.ts b/dmp-frontend/src/app/core/model/reference-type/reference-type.ts index e3410babf..652256509 100644 --- a/dmp-frontend/src/app/core/model/reference-type/reference-type.ts +++ b/dmp-frontend/src/app/core/model/reference-type/reference-type.ts @@ -3,9 +3,9 @@ import { BaseEntity, BaseEntityPersist } from "@common/base/base-entity.model"; import { ExternalFetcherBaseSourceConfiguration, ExternalFetcherBaseSourceConfigurationPersist } from "../external-fetcher/external-fetcher"; export interface ReferenceType extends BaseEntity{ - name: string; - code: string; - definition: ReferenceTypeDefinition; + name?: string; + code?: string; + definition?: ReferenceTypeDefinition; } export interface ReferenceTypeDefinition{ diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts index 97fbbce9b..7b7cd9267 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts @@ -30,7 +30,7 @@ import { debounceTime, delay, map, takeUntil, tap } from 'rxjs/operators'; import { GENERAL_ANIMATIONS } from '../../animations/animations'; import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators'; import { DescriptionTemplateFieldEditorModel, DescriptionTemplateRuleEditorModel, DescriptionTemplateSectionEditorModel } from '../../description-template-editor.model'; -import { DescriptionTemplateFieldSetPersist } from '@app/core/model/description-template/description-template-persist'; +import { DescriptionTemplateFieldSetPersist, DescriptionTemplateReferenceTypeFieldPersist } from '@app/core/model/description-template/description-template-persist'; import { DescriptionEditorModel, DescriptionPropertyDefinitionEditorModel } from '@app/ui/description/editor/description-editor.model'; import { Description } from '@app/core/model/description/description'; import { VisibilityRulesService } from '@app/ui/description/editor/description-form/visibility-rules/visibility-rules.service'; @@ -232,7 +232,7 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon const formValue: DescriptionTemplateFieldSetPersist = this.form.getRawValue(); const fields: DescriptionTemplateField[] = formValue.fields.map(editorField => { - return { + const convertedField = { id: editorField.id, ordinal: editorField.ordinal, numbering: '', @@ -242,7 +242,17 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon validations: editorField.validations, includeInExport: editorField.includeInExport, data: editorField.data + } as DescriptionTemplateField; + + if (editorField.data.fieldType === DescriptionTemplateFieldType.REFERENCE_TYPES) { + convertedField.data = editorField.data; + (convertedField.data as DescriptionTemplateReferenceTypeData).referenceType = { + id: (editorField.data as DescriptionTemplateReferenceTypeFieldPersist).referenceTypeId + }; + } else { + convertedField.data = editorField.data; } + return convertedField; }); const fieldSet: DescriptionTemplateFieldSet = { diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts index ed3ba6d89..2c6a11ec7 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts @@ -213,9 +213,7 @@ export class DescriptionTemplateDefinitionEditorModel implements DescriptionTemp return this.formBuilder.group({ pages: this.formBuilder.array( (this.pages ?? []).map( - (item, index) => new DescriptionTemplatePageEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}pages[${index}].` }) ), context.getValidation('pages').validators @@ -295,9 +293,7 @@ export class DescriptionTemplatePageEditorModel implements DescriptionTemplatePa title: [{ value: this.title, disabled: disabled }, context.getValidation('title').validators], sections: this.formBuilder.array( (this.sections ?? []).map( - (item, index) => new DescriptionTemplateSectionEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}sections[${index}].` }) ), context.getValidation('sections').validators @@ -412,18 +408,14 @@ export class DescriptionTemplateSectionEditorModel implements DescriptionTemplat description: [{ value: this.description, disabled: disabled }, context.getValidation('description').validators], sections: this.formBuilder.array( (this.sections ?? []).map( - (item, index) => new DescriptionTemplateSectionEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}sections[${index}].` }) ), context.getValidation('sections').validators ), fieldSets: this.formBuilder.array( (this.fieldSets ?? []).map( - (item, index) => new DescriptionTemplateFieldSetEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}fieldSets[${index}].` }) ), context.getValidation('fieldSets').validators @@ -551,9 +543,7 @@ export class DescriptionTemplateFieldSetEditorModel implements DescriptionTempla }), fields: this.formBuilder.array( (this.fields ?? []).map( - (item, index) => new DescriptionTemplateFieldEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}fields[${index}].` }) ), context.getValidation('fields').validators @@ -758,9 +748,7 @@ export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateF }), visibilityRules: this.formBuilder.array( (this.visibilityRules ?? []).map( - (item, index) => new DescriptionTemplateRuleEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}visibilityRules[${index}].` }) ), context.getValidation('visibilityRules').validators @@ -1273,9 +1261,7 @@ export class DescriptionTemplateRadioBoxDataEditorModel extends DescriptionTempl const formGroup = super.buildForm({ context, disabled, rootPath }); formGroup.setControl('options', this.formBuilder.array( (this.options ?? []).map( - (item, index) => new DescriptionTemplateRadioBoxOptionEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}options[${index}].` }) ), context.getValidation('options').validators @@ -1420,9 +1406,7 @@ export class DescriptionTemplateSelectDataEditorModel extends DescriptionTemplat formGroup.setControl('multipleSelect', new FormControl({ value: this.multipleSelect, disabled: disabled }, context.getValidation('multipleSelect').validators)); formGroup.setControl('options', this.formBuilder.array( (this.options ?? []).map( - (item, index) => new DescriptionTemplateSelectOptionEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}options[${index}].` }) ), context.getValidation('options').validators @@ -1581,9 +1565,7 @@ export class DescriptionTemplateUploadDataEditorModel extends DescriptionTemplat formGroup.setControl('maxFileSizeInMB', new FormControl({ value: this.maxFileSizeInMB, disabled: disabled }, context.getValidation('maxFileSizeInMB').validators)); formGroup.setControl('types', this.formBuilder.array( (this.types ?? []).map( - (item, index) => new DescriptionTemplateUploadOptionEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}types[${index}].` }) ), context.getValidation('types').validators diff --git a/dmp-frontend/src/app/ui/admin/notification-template/editor/notification-template-editor.model.ts b/dmp-frontend/src/app/ui/admin/notification-template/editor/notification-template-editor.model.ts index 3d6cc9300..26cf61d1b 100644 --- a/dmp-frontend/src/app/ui/admin/notification-template/editor/notification-template-editor.model.ts +++ b/dmp-frontend/src/app/ui/admin/notification-template/editor/notification-template-editor.model.ts @@ -250,9 +250,7 @@ export class NotificationFieldOptionsEditorModel implements NotificationFieldOpt formatting: [{ value: this.formatting, disabled: disabled }, context.getValidation('formatting').validators], optional: this.formBuilder.array( (this.optional ?? []).map( - (item, index) => new NotificationFieldInfoEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}optional[${index}].` }) ), context.getValidation('optional').validators diff --git a/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html b/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html index 3fa7d8d1f..368faa968 100644 --- a/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html @@ -30,119 +30,101 @@
-
-
- +
+
+ {{'REFERENCE-TYPE-EDITOR.FIELDS.NAME' | translate}} {{formGroup.get('name').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
- +
+ {{'REFERENCE-TYPE-EDITOR.FIELDS.CODE' | translate}} {{formGroup.get('code').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}}
- -
- - - - - - - - - - - -
+
+
+
+

{{'REFERENCE-TYPE-EDITOR.FIELDS.FIELDS' | translate}}

+
+
+ +
+
+
- -
-
- {{'REFERENCE-TYPE-EDITOR.FIELDS.FIELD' | translate}} {{fieldIndex + 1}} -
- -
- -
-
-
- -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.LABEL' | translate}} - - {{field.get('label').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.DESCRIPTION' | translate}} - - {{field.get('description').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.CODE' | translate}} - - {{field.get('code').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.DATA-TYPE' | translate}} - - - {{enumUtils.toReferenceFieldDataTypeString(fieldDataType)}} - - - {{field.get('dataType').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
- -
-
+
+
+ {{fieldIndex + 1}} +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.LABEL' | translate}} + + {{field.get('label').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.DESCRIPTION' | translate}} + + {{field.get('description').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.CODE' | translate}} + + {{field.get('code').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.DATA-TYPE' | translate}} + + + {{enumUtils.toReferenceFieldDataTypeString(fieldDataType)}} + + + {{field.get('dataType').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ +
+
- -
-
-
-
- - - - - - - - - -
- -
-
-
- + +
+
+
+
+

{{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCES' | translate}}

+
+
+ +
+
+
+
+
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-CONFIGURATION' | translate}} {{sourceIndex + 1}} @@ -153,24 +135,16 @@
- + - +
+ {{'REFERENCE-TYPE-EDITOR.SOURCES-REQUIRED' | translate}} + {{formGroup.get('definition').get('sources').getError('backendError').message}}
- {{'REFERENCE-TYPE-EDITOR.SOURCES-REQUIRED' | translate}} - {{formGroup.get('definition').get('sources').getError('backendError').message}}
-
-
- +
\ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts b/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts index b761614dc..49b418f38 100644 --- a/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts +++ b/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts @@ -151,9 +151,7 @@ export class ReferenceTypeDefinitionEditorModel implements ReferenceTypeDefiniti return this.formBuilder.group({ fields: this.formBuilder.array( (this.fields ?? []).map( - (item, index) => new ReferenceTypeFieldEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}fields[${index}].` }) ), context.getValidation('fields').validators diff --git a/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.component.html b/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.component.html index 6023a9d09..af08ae91f 100644 --- a/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.component.html @@ -27,7 +27,7 @@ {{'REFERENCE-EDITOR.NEW' | translate}} - +
@@ -37,6 +37,14 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
+
+ + {{'REFERENCE-EDITOR.FIELDS.REFERENCE' | translate}} + + {{formGroup.get('reference').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
{{'REFERENCE-EDITOR.FIELDS.TYPE' | translate}} @@ -46,17 +54,6 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
-

{{'REFERENCE-EDITOR.FIELDS.DESCRIPTION' | translate}}

-
- - -
- {{formGroup.get('description').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED'| translate}} -
-
-
{{'REFERENCE-EDITOR.FIELDS.SOURCE' | translate}} @@ -77,14 +74,6 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
- - {{'REFERENCE-EDITOR.FIELDS.REFERENCE' | translate}} - - {{formGroup.get('reference').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
{{'REFERENCE-EDITOR.FIELDS.ABBREVIATION' | translate}} @@ -93,27 +82,28 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
+
+ + +
+ {{formGroup.get('description').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED'| translate}} +
+
-

+

{{'REFERENCE-EDITOR.FIELDS.FIELDS' | translate}}

-
-
- {{'REFERENCE-EDITOR.FIELDS.FIELD' | translate}} {{fieldIndex + 1}} +
+
+ {{fieldIndex + 1}}
-
- -
-
-
-
+
{{'REFERENCE-EDITOR.FIELDS.CODE' | translate}} @@ -121,7 +111,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-EDITOR.FIELDS.DATA-TYPE' | translate}} @@ -133,7 +123,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-EDITOR.FIELDS.VALUE' | translate}} @@ -141,6 +131,11 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
+
+ +
diff --git a/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts b/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts index 909df6231..27506bc83 100644 --- a/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts +++ b/dmp-frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts @@ -129,9 +129,7 @@ export class DefinitionEditorModel implements DefinitionPersist { return this.formBuilder.group({ fields: this.formBuilder.array( (this.fields ?? []).map( - (item, index) => new FieldEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}fields[${index}].` }) ), context.getValidation('fields').validators diff --git a/dmp-frontend/src/app/ui/admin/tenant/editor/tenant-editor.model.ts b/dmp-frontend/src/app/ui/admin/tenant/editor/tenant-editor.model.ts index 8b23f0401..2d4a0cf05 100644 --- a/dmp-frontend/src/app/ui/admin/tenant/editor/tenant-editor.model.ts +++ b/dmp-frontend/src/app/ui/admin/tenant/editor/tenant-editor.model.ts @@ -172,9 +172,7 @@ export class TenantDepositConfigEditorModel implements TenantDepositConfigPersis return this.formBuilder.group({ sources: this.formBuilder.array( (this.sources ?? []).map( - (item, index) => new TenantSourceEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}sources[${index}].` }) ), context.getValidation('sources') @@ -244,9 +242,7 @@ export class TenantFileTransformersConfigEditorModel implements TenantFileTransf return this.formBuilder.group({ sources: this.formBuilder.array( (this.sources ?? []).map( - (item, index) => new TenantSourceEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}sources[${index}].` }) ), context.getValidation('sources') diff --git a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts index 550c097e9..727a23765 100644 --- a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts +++ b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source-editor.model.ts @@ -106,9 +106,7 @@ export class ExternalFetcherBaseSourceConfigurationEditorModel implements Extern ), options: this.formBuilder.array( (this.options ?? []).map( - (item, index) => new StaticOptionEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}options[${index}].` }) ), context.getValidation('options').validators @@ -237,9 +235,7 @@ export class ResultsConfigurationEditorModel implements ResultsConfigurationPers resultsArrayPath: [{ value: this.resultsArrayPath, disabled: disabled }, context.getValidation('resultsArrayPath').validators], fieldsMapping: this.formBuilder.array( (this.fieldsMapping ?? []).map( - (item, index) => new ResultFieldsMappingConfigurationEditorModel( - this.validationErrorModel - ).fromModel(item).buildForm({ + (item, index) => item.buildForm({ rootPath: `${rootPath}fieldsMapping[${index}].` }) ), context.getValidation('fieldsMapping').validators diff --git a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html index e27d9eef5..62df1e9e3 100644 --- a/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html +++ b/dmp-frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html @@ -1,5 +1,5 @@
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.KEY' | translate}} @@ -7,7 +7,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.LABEL' | translate}} @@ -15,7 +15,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.ORDINAL' | translate}} @@ -23,7 +23,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.DEPENDENCIES' | translate}} @@ -33,7 +33,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-TYPE' | translate}} @@ -64,7 +64,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.CONTENT-TYPE' | translate}} @@ -72,7 +72,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.FIRST-PAGE' | translate}} @@ -80,7 +80,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.HTTP-METHOD' | translate}} @@ -92,7 +92,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.REQUEST-BODY' | translate}} @@ -100,7 +100,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.FILTER-TYPE' | translate}} @@ -110,7 +110,7 @@

{{'REFERENCE-TYPE-EDITOR.FIELDS.RESULTS' | translate}}

-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.RESULTS-PATH' | translate}} @@ -119,36 +119,31 @@
+

{{'REFERENCE-TYPE-EDITOR.FIELDS.FIELD-MAPPINGS' | translate}}

- -
-
-

{{'REFERENCE-TYPE-EDITOR.FIELDS.FIELD-MAPPING' | translate}} {{fieldMappingIndex + 1}}

-
+
+
+ {{fieldMappingIndex + 1}}
- - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.CODE' | translate}} - - {{field.get('code').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.RESPONSE-PATH' | translate}} - - {{field.get('responsePath').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.CODE' | translate}} + + {{field.get('code').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} +
- +
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.RESPONSE-PATH' | translate}} + + {{field.get('responsePath').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
@@ -158,7 +153,7 @@
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.URL' | translate}} @@ -166,7 +161,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.HTTP-METHOD' | translate}} @@ -178,7 +173,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.TOKEN-PATH' | translate}} @@ -186,15 +181,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.REQUEST-BODY' | translate}} - - {{formGroup.get('auth').get('authRequestBody').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
+
{{'REFERENCE-TYPE-EDITOR.FIELDS.TYPE' | translate}} @@ -202,6 +189,14 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.REQUEST-BODY' | translate}} + + {{formGroup.get('auth').get('authRequestBody').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
@@ -211,49 +206,96 @@
- -
-
-

{{'REFERENCE-TYPE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}

-
-
- -
-
- -
+
+
+

{{'REFERENCE-TYPE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}

- - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.NAME' | translate}} - - {{query.get('name').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.DEFAULT-VALUE' | translate}} - - {{query.get('defaultValue').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
+
+
- -
- -
-
- -
+
+
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.NAME' | translate}} + + {{query.get('name').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.DEFAULT-VALUE' | translate}} + + {{query.get('defaultValue').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + +

{{'REFERENCE-TYPE-EDITOR.FIELDS.CASES' | translate}} + +

+
+
+
-

{{'REFERENCE-TYPE-EDITOR.FIELDS.CASE' | translate}} {{caseIndex + 1}}

+ {{caseIndex + 1}} +
+
+
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.LIKE-PATTERN' | translate}} + + {{case.get('likePattern').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.SEPARATOR' | translate}} + + {{case.get('separator').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.VALUE' | translate}} + + {{case.get('value').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.DEPENDENCY' | translate}} + + + {{referenceType.code}} + + + {{case.get('referenceTypeId').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-KEY' | translate}} + + + {{sourceKey}} + + + {{case.get('referenceTypeSourceKey').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
- - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.LIKE-PATTERN' | translate}} - - {{case.get('likePattern').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.SEPARATOR' | translate}} - - {{case.get('separator').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.VALUE' | translate}} - - {{case.get('value').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.DEPENDENCY' | translate}} - - - {{referenceType.code}} - - - {{case.get('referenceTypeId').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-KEY' | translate}} - - - {{sourceKey}} - - - {{case.get('referenceTypeSourceKey').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
-
+
+
diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index f6a940751..33074e97f 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -1098,7 +1098,9 @@ "FIELDS": { "SOURCE-CONFIGURATION": "Source Configuration", "RESULTS": "Results", - "FIELD-MAPPING": "Field Mapping", + "FIELDS": "Fields", + "SOURCES": "Sources", + "FIELD-MAPPINGS": "Field Mappings", "AUTHENTICATION": "Authentication", "QUERIES": "Queries", "QUERY": "Query", @@ -1108,7 +1110,6 @@ "CODE": "Code", "VALUE": "Value", "RESPONSE-PATH": "Response Path", - "FIELD": "Field", "DATA-TYPE": "Data Type", "KEY": "Key", "LABEL": "Label", @@ -1129,7 +1130,7 @@ "DEPENDENCIES": "Dependencies", "DEPENDENCY": "Dependency", "DEFAULT-VALUE": "Default Value", - "CASE": "Case", + "CASES": "Cases", "LIKE-PATTERN": "Condition", "SOURCE-KEY": "Source Key" }, @@ -1145,7 +1146,7 @@ "REMOVE-QUERY": "Remove Query", "ADD-CASE": "Add Case", "REMOVE-CASE": "Remove Case", - "SUBMIT-FIELDS": "Submit" + "SUBMIT-FIELDS": "Update Fields" }, "CONFIRM-DELETE-DIALOG": {} }, @@ -1206,14 +1207,12 @@ "FIELDS": { "LABEL": "Label", "TYPE": "Type", - "DESCRIPTION": "Description", "DESCRIPTION-PLACEHOLDER": "Reference description", - "REFERENCE": "reference", - "ABBREVIATION": "abbreviation", - "SOURCE": "source", + "REFERENCE": "Reference", + "ABBREVIATION": "Abbreviation", + "SOURCE": "Source", "SOURCE-TYPE": "Source Type", "FIELDS": "Fields", - "FIELD": "Field", "CODE": "Code", "DATA-TYPE": "Data Type", "VALUE": "Value"