From 683552707f5e7894cac2ec50d26b3a366abaa24e Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Tue, 30 Apr 2024 11:52:50 +0300 Subject: [PATCH] hide annotations for new descriptions and description template previews --- ...scription-template-preview-dialog.component.html | 2 +- ...n-template-editor-composite-field.component.html | 2 +- .../final-preview/final-preview.component.html | 2 +- ...-template-editor-section-fieldset.component.html | 3 ++- .../editor/description-editor.component.html | 4 +++- .../form-field-set/form-field-set.component.html | 2 +- .../form-field-set/form-field-set.component.ts | 1 + .../form-section/form-section.component.html | 4 +++- .../form-section/form-section.component.ts | 13 ++----------- .../description-form.component.html | 2 +- .../description-form/description-form.component.ts | 3 +-- 11 files changed, 17 insertions(+), 21 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/description-template/description-template-preview/description-template-preview-dialog.component.html b/dmp-frontend/src/app/ui/admin/description-template/description-template-preview/description-template-preview-dialog.component.html index df95194e7..dab92703a 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/description-template-preview/description-template-preview-dialog.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/description-template-preview/description-template-preview-dialog.component.html @@ -8,7 +8,7 @@
- +
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 b1aca34fa..f30af7926 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 @@ -104,7 +104,7 @@
- +
diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/final-preview/final-preview.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/final-preview/final-preview.component.html index ec44fbce4..5e1e459ff 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/final-preview/final-preview.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/final-preview/final-preview.component.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html index f5416145c..626f7ef13 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html @@ -65,7 +65,8 @@ [hasFocus]="fieldset.get('id').value === selectedFieldSetId" [datasetProfileId]="datasetProfileId" [validationErrorModel]="validationErrorModel" - [validationRootPath]="validationRootPath + '.fieldSets[' + i + ']'"> + [validationRootPath]="validationRootPath + '.fieldSets[' + i + ']'" + > diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.component.html b/dmp-frontend/src/app/ui/description/editor/description-editor.component.html index 7597aa85a..d39232e9a 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.component.html @@ -149,7 +149,9 @@ [hidden]="this.step === 0" [linkToScroll]="linkToScroll" [validationErrorModel]="editorModel.validationErrorModel" - (fieldsetFocusChange)="fieldsetIdWithFocus = $event"> + [isNew]="isNew" + (fieldsetFocusChange)="fieldsetIdWithFocus = $event" + > diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.html b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.html index 585c7f8b3..f46c03ee3 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.html @@ -5,7 +5,7 @@
-
+
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 cff680c83..c43d5567b 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 @@ -27,6 +27,7 @@ export class DescriptionFormFieldSetComponent extends BaseComponent { @Input() fieldSet: DescriptionTemplateFieldSet; @Input() propertiesFormGroup: UntypedFormGroup; @Input() descriptionId: Guid; + @Input() hideAnnotations: boolean = false; get isMultiplicityEnabled() { return this.fieldSet.hasMultiplicity && this.fieldSet.multiplicity != null; 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 97ac3dbac..d984cfad9 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 @@ -21,7 +21,9 @@ [path]="path + '.' + (i+1)" [visibilityRulesService]="visibilityRulesService" [validationErrorModel]="validationErrorModel" - [isChild]="false"> + [isChild]="false" + [hideAnnotations]="isNew" + >
diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts index fe9765583..f8b9ac8b2 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts @@ -1,14 +1,4 @@ -import { - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - EventEmitter, - Input, - OnChanges, - OnInit, - Output, - SimpleChanges -} from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { DescriptionTemplateSection } from '@app/core/model/description-template/description-template'; import { BaseComponent } from '@common/base/base.component'; @@ -28,6 +18,7 @@ import { Guid } from '@common/types/guid'; }) export class DescriptionFormSectionComponent extends BaseComponent implements OnInit, OnChanges { + @Input() isNew: boolean = false; @Input() section: DescriptionTemplateSection; @Input() propertiesFormGroup: UntypedFormGroup; @Input() visibilityRulesService: VisibilityRulesService; diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.html b/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.html index dc4967b92..000bf1ecf 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.html @@ -15,7 +15,7 @@
- +
diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.ts b/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.ts index 8befbf6d0..68c9cb807 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-form/description-form.component.ts @@ -20,8 +20,7 @@ export class DescriptionFormComponent extends BaseComponent implements OnInit, A @Input() descriptionTemplate: DescriptionTemplate; @Input() visibilityRulesService: VisibilityRulesService; @Input() descriptionId: Guid; - - + @Input() isNew: boolean = false; // @ViewChild('stepper', { static: false }) stepper: MatStepper; @Input() path: string;