From feb65468b8f34484d892a1428525184febaa38ef Mon Sep 17 00:00:00 2001 From: mchouliara Date: Fri, 27 Sep 2024 11:04:19 +0300 Subject: [PATCH 1/2] issue 29 fix disappearing "insert manually" hint in reference field --- .../reference-field.component.html | 56 ++++++++++--------- .../reference-field.component.scss | 26 +++++---- 2 files changed, 45 insertions(+), 37 deletions(-) diff --git a/frontend/src/app/ui/reference/reference-field/reference-field.component.html b/frontend/src/app/ui/reference/reference-field/reference-field.component.html index a64bbf996..77580084e 100644 --- a/frontend/src/app/ui/reference/reference-field/reference-field.component.html +++ b/frontend/src/app/ui/reference/reference-field/reference-field.component.html @@ -1,26 +1,30 @@ - - {{label?.length > 0 ? label : referenceType?.name}} - - - {{form.getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - {{hint}} - - {{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} - {{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}} - - - - {{label?.length > 0 ? label : referenceType?.name}} - - - {{form.getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - {{hint}} - - {{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} - {{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}} - - -
-
\ No newline at end of file +
+ @if(multipleAutoCompleteSearchConfiguration){ + + {{label?.length > 0 ? label : referenceType?.name}} + + + {{form.getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + {{hint}} + + + {{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} + {{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}} + + } + @if(singleAutoCompleteSearchConfiguration){ + + {{label?.length > 0 ? label : referenceType?.name}} + + + {{form.getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + {{hint}} + + + {{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} + {{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}} + + } +
diff --git a/frontend/src/app/ui/reference/reference-field/reference-field.component.scss b/frontend/src/app/ui/reference/reference-field/reference-field.component.scss index d761df787..5aaa328b2 100644 --- a/frontend/src/app/ui/reference/reference-field/reference-field.component.scss +++ b/frontend/src/app/ui/reference/reference-field/reference-field.component.scss @@ -1,12 +1,16 @@ - .insert-manually { - text-decoration: underline; - color: var(--primary-color-3); - cursor: pointer; - font-weight: 400; - } +.insert-manually { + text-decoration: underline; + color: var(--primary-color-3); + cursor: pointer; + font-weight: 400; +} - .not-found { - color: #333; - font-weight: 400; - padding: 0rem 0.5rem 0rem 0rem; - } +.not-found { + color: #333; + font-weight: 400; + padding: 0rem 0.5rem 0rem 0rem; +} + +.inherit-mat-hint { //todo mchouliara move to styles.scss after accessibility refactor merge + font-size: var(--mat-form-field-subscript-text-size); +} \ No newline at end of file From b1c1a39ed3b4a7b99bb467f09d3c771f68a49c02 Mon Sep 17 00:00:00 2001 From: mchouliara Date: Fri, 27 Sep 2024 13:37:02 +0300 Subject: [PATCH 2/2] issue 29 > description editor Fix validity check for finalized desc form, TOC ui fixes --- .../description/editor/description-editor.component.scss | 5 +++-- .../description/editor/description-editor.component.ts | 5 ++++- .../table-of-contents-internal.ts | 9 ++++++--- .../plan-editor-blueprint/plan-editor.component.html | 4 ++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/ui/description/editor/description-editor.component.scss b/frontend/src/app/ui/description/editor/description-editor.component.scss index 6c5c5df1c..8e2ad4110 100644 --- a/frontend/src/app/ui/description/editor/description-editor.component.scss +++ b/frontend/src/app/ui/description/editor/description-editor.component.scss @@ -206,7 +206,8 @@ } .stepper-options { - height: calc(100vh - 650px); + flex: 1; + max-height: calc(100vh - 32rem); overflow-y: auto; .main-info { color: #21212194; @@ -235,7 +236,7 @@ letter-spacing: 0px; color: #212121; opacity: 0.6; - margin: 2.875rem 0rem 2.25rem 0rem; + margin: 2rem 0rem 1rem 0rem; padding-left: 1rem; } diff --git a/frontend/src/app/ui/description/editor/description-editor.component.ts b/frontend/src/app/ui/description/editor/description-editor.component.ts index e7ceefefb..b00a3232d 100644 --- a/frontend/src/app/ui/description/editor/description-editor.component.ts +++ b/frontend/src/app/ui/description/editor/description-editor.component.ts @@ -308,7 +308,10 @@ export class DescriptionEditorComponent extends BaseEditor { onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete); this.descriptionIsOnceSaved = true; - if (this.formGroup.get('status').value == DescriptionStatusEnum.Finalized) this.isFinalized = true; + if (this.formGroup.get('status').value == DescriptionStatusEnum.Finalized){ + this.isFinalized = true; + this.formGroup.disable(); + } }, error => { if (this.formGroup.get('status').value == DescriptionStatusEnum.Finalized) { diff --git a/frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts b/frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts index 6954ebab7..38b6fd135 100644 --- a/frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts +++ b/frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts @@ -88,13 +88,16 @@ export class TableOfContentsInternal extends BaseComponent implements OnInit, On isTocEntryValid(entry: ToCEntry): boolean { if (entry == null) return true; - if (entry.validityAbstractControl && !entry.validityAbstractControl.touched) return true; - + if (entry.validityAbstractControl && (!entry.validityAbstractControl.touched || entry.validityAbstractControl.disabled)){ + return true; + } let currentValidity = entry.validityAbstractControl?.valid ?? true; if (!currentValidity) return currentValidity; entry.subEntries?.forEach(subEntry => { currentValidity = currentValidity && this.isTocEntryValid(subEntry); - if (!currentValidity) return currentValidity; + if (!currentValidity){ + return currentValidity; + } }); return currentValidity; diff --git a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html index 27656d30e..a54b40af6 100644 --- a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html +++ b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html @@ -135,7 +135,7 @@
    -
    + @if(selectedBlueprint?.definition && this.step !== 0){
  1. {{section.label}} info @@ -163,7 +163,7 @@
  2. -
    + }