From 5198f5170618dbad77a5ebb2916e717bc7e20ce9 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Mon, 23 Oct 2023 08:41:52 +0200 Subject: [PATCH] fix: t#4075 error aligment --- .../new-workflow-form/new-workflow-form.component.html | 5 +---- javascript/libs/ui/src/lib/inputs/error/error.component.ts | 5 ++++- javascript/libs/ui/src/lib/inputs/input/input.component.css | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-new-workflow/components/new-workflow-form/new-workflow-form.component.html b/javascript/apps/taiga/src/app/modules/project/feature-new-workflow/components/new-workflow-form/new-workflow-form.component.html index b5fc5bc0e..137f5c6da 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-new-workflow/components/new-workflow-form/new-workflow-form.component.html +++ b/javascript/apps/taiga/src/app/modules/project/feature-new-workflow/components/new-workflow-form/new-workflow-form.component.html @@ -26,10 +26,7 @@ inputRef [placeholder]="t('kanban.create_workflow.write_workflow_name')" /> - - {{ t('kanban.create_workflow.workflow_empty') }} - - + {{ t('kanban.create_workflow.workflow_empty') }} diff --git a/javascript/libs/ui/src/lib/inputs/error/error.component.ts b/javascript/libs/ui/src/lib/inputs/error/error.component.ts index 587127807..00d45c205 100644 --- a/javascript/libs/ui/src/lib/inputs/error/error.component.ts +++ b/javascript/libs/ui/src/lib/inputs/error/error.component.ts @@ -50,8 +50,11 @@ export class ErrorComponent implements OnChanges { } const errors = this.fieldService.control?.errors; + const errorNames = this.error.split(',').map((it) => it.trim()); + const hasError = errorNames.some((errorName) => errors?.[errorName]); const fieldControl = this.fieldService.control; - if (errors && errors[this.error] && fieldControl) { + + if (errors && hasError && fieldControl) { const isOnSubmit = fieldControl.updateOn === 'submit'; if (isOnSubmit) { diff --git a/javascript/libs/ui/src/lib/inputs/input/input.component.css b/javascript/libs/ui/src/lib/inputs/input/input.component.css index 0c674a5d3..2b4ffc4c0 100644 --- a/javascript/libs/ui/src/lib/inputs/input/input.component.css +++ b/javascript/libs/ui/src/lib/inputs/input/input.component.css @@ -133,6 +133,7 @@ Copyright (c) 2023-present Kaleidos INC & .extra-info { align-items: flex-start; display: flex; + flex-direction: column; justify-content: space-between; } }