From 71b25867a77ce55927483acbed615b024d1f960b Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Mon, 27 May 2024 13:05:57 +0300 Subject: [PATCH] description-template table view: added numbering on title --- ...description-template-editor-composite-field.component.html | 2 +- .../dialog-editor/form-fieldset-editor-dialog.component.html | 2 +- .../dialog-editor/form-fieldset-editor-dialog.component.ts | 2 ++ .../components/form-field-set/form-field-set.component.ts | 4 +++- .../components/form-section/form-section.component.html | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html index 2aeccc569..d8e70a8b5 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html @@ -120,7 +120,7 @@
- +
diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.html b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.html index 2d6ffc56b..4d225d4db 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.html @@ -1,7 +1,7 @@
-
{{fieldSet.title}}
+
{{numberingText}} {{fieldSet.title}}
close diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.ts b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.ts index e79b58c99..daaad2cce 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/dialog-editor/form-fieldset-editor-dialog.component.ts @@ -10,6 +10,7 @@ import { DescriptionTemplateFieldSet } from "@app/core/model/description-templat }) export class FormFieldSetEditorDialogComponent { + numberingText: string; fieldSet: DescriptionTemplateFieldSet; propertiesFormGroup: UntypedFormGroup; @@ -19,6 +20,7 @@ export class FormFieldSetEditorDialogComponent { ) { this.fieldSet = data.fieldSet; this.propertiesFormGroup = data.propertiesFormGroup; + this.numberingText = data.numberingText; } cancel() { diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts index eadfde17f..3988fde45 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts @@ -29,6 +29,7 @@ export class DescriptionFormFieldSetComponent extends BaseComponent { @Input() descriptionId: Guid; @Input() hideAnnotations: boolean = false; @Input() canReview: boolean = false; + @Input() numbering: string; get isMultiplicityEnabled() { return this.fieldSet.hasMultiplicity && this.fieldSet.multiplicity != null; @@ -127,7 +128,8 @@ export class DescriptionFormFieldSetComponent extends BaseComponent { minWidth: '49%', data: { fieldSet: this.fieldSet, - propertiesFormGroup: cloneAbstractControl((this.propertiesFormGroup?.get('items') as UntypedFormArray).at(fieldSetIndex)) + propertiesFormGroup: cloneAbstractControl((this.propertiesFormGroup?.get('items') as UntypedFormArray).at(fieldSetIndex)), + numberingText: this.numbering } }); dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(data => { diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.html b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.html index f8b89731b..2360e1ad2 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.html @@ -19,6 +19,7 @@ [fieldSet]="fieldSet" [descriptionId]="descriptionId" [path]="path + '.' + (i+1)" + [numbering]="path + '.' + (i+1)" [visibilityRulesService]="visibilityRulesService" [validationErrorModel]="validationErrorModel" [isChild]="false"