From e2e337370b701c89c690f6f6d18fffd1a973a2c2 Mon Sep 17 00:00:00 2001 From: "CITE\\spapacharalampous" Date: Thu, 29 Aug 2024 14:54:05 +0300 Subject: [PATCH] minor ui fixes --- .../app/ui/plan/listing/plan-listing.component.html | 11 +++-------- .../modules/text-filter/text-filter.component.html | 7 ++++--- .../modules/text-filter/text-filter.component.ts | 13 ++++++++----- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/ui/plan/listing/plan-listing.component.html b/frontend/src/app/ui/plan/listing/plan-listing.component.html index 33007cb9f..8cc675b8f 100644 --- a/frontend/src/app/ui/plan/listing/plan-listing.component.html +++ b/frontend/src/app/ui/plan/listing/plan-listing.component.html @@ -14,7 +14,7 @@
-
+
@@ -47,15 +47,10 @@
- {{ 'GENERAL.ACTIONS.TAKE-A-TOUR'| translate }} + {{ 'GENERAL.ACTIONS.TAKE-A-TOUR'| translate }}
- - +
diff --git a/frontend/src/common/modules/text-filter/text-filter.component.html b/frontend/src/common/modules/text-filter/text-filter.component.html index 0e046fc20..90ffa639d 100644 --- a/frontend/src/common/modules/text-filter/text-filter.component.html +++ b/frontend/src/common/modules/text-filter/text-filter.component.html @@ -1,4 +1,5 @@ - - {{getPlaceholder()}} - + + {{suffixIcon}} + {{label}} + diff --git a/frontend/src/common/modules/text-filter/text-filter.component.ts b/frontend/src/common/modules/text-filter/text-filter.component.ts index 52388ed5a..4a8a08bf0 100644 --- a/frontend/src/common/modules/text-filter/text-filter.component.ts +++ b/frontend/src/common/modules/text-filter/text-filter.component.ts @@ -14,12 +14,19 @@ import { debounceTime, takeUntil } from 'rxjs/operators'; export class TextFilterComponent extends BaseComponent implements OnInit, OnChanges { @Input() typeaheadMS = 700; @Input() disableTransform = false; - @Input() placeholder: string; + @Input() floatLabel: string = "never"; + @Input() label: string | null; + @Input() placeholder: string | null; + @Input() suffixIcon: string | null; @Input() value: string; @Output() valueChange = new EventEmitter(); private valueSubject: Subject; + get textPlaceholder(): string { + return this.placeholder ? this.language.instant(this.placeholder) : this.language.instant('GENERAL.CRITERIA.LIKE'); + } + private _inputValue: string; public get inputValue(): string { return this._inputValue; } public set inputValue(value: string) { @@ -53,8 +60,4 @@ export class TextFilterComponent extends BaseComponent implements OnInit, OnChan this._inputValue = this.filterService.reverseLikeTransformation(this.value); } } - - getPlaceholder(): string { - return this.placeholder ? this.language.instant(this.placeholder) : this.language.instant('COMMONS.TEXT-FILTER.LIKE'); - } }