From 5b926153a7d204cec1fcb4934c0e41a59833972e Mon Sep 17 00:00:00 2001 From: Martin Rojas Miguel Angel Date: Tue, 5 Jun 2018 17:06:43 +0200 Subject: [PATCH] TSK-534 Change access ids service url and fix type-ahead min char bug --- .../information/workbasket-information.component.html | 6 +++--- .../app/shared/services/access-ids/access-ids.service.ts | 8 ++++---- web/src/app/shared/type-ahead/type-ahead.component.ts | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/web/src/app/administration/workbasket/details/information/workbasket-information.component.html b/web/src/app/administration/workbasket/details/information/workbasket-information.component.html index 156104315..127852d8d 100644 --- a/web/src/app/administration/workbasket/details/information/workbasket-information.component.html +++ b/web/src/app/administration/workbasket/details/information/workbasket-information.component.html @@ -44,10 +44,10 @@ +
+ * Owner is required +
-
- * Owner is required -
diff --git a/web/src/app/shared/services/access-ids/access-ids.service.ts b/web/src/app/shared/services/access-ids/access-ids.service.ts index 1f5ffc3a6..fdcc2ca08 100644 --- a/web/src/app/shared/services/access-ids/access-ids.service.ts +++ b/web/src/app/shared/services/access-ids/access-ids.service.ts @@ -9,16 +9,16 @@ import { Observable } from 'rxjs/Observable'; @Injectable() export class AccessIdsService { - private url = environment.taskanaRestUrl + '/v1/validate-access-id'; + private url = environment.taskanaRestUrl + '/v1/access-ids'; constructor( private httpClient: HttpClient) { } - getAccessItemsInformation(token): Observable> { - if (!token) { + getAccessItemsInformation(token: string): Observable> { + if (!token || token.length < 3) { return Observable.of([]); } - return this.httpClient.get>(`${this.url}?search=${token}`); + return this.httpClient.get>(`${this.url}?searchFor=${token}`); }; } diff --git a/web/src/app/shared/type-ahead/type-ahead.component.ts b/web/src/app/shared/type-ahead/type-ahead.component.ts index 509684ef3..6c1816de5 100644 --- a/web/src/app/shared/type-ahead/type-ahead.component.ts +++ b/web/src/app/shared/type-ahead/type-ahead.component.ts @@ -33,7 +33,7 @@ export class TypeAheadComponent implements OnInit, ControlValueAccessor { private inputTypeAhead; typeaheadLoading = false; - typeaheadMinLength = 2; + typeaheadMinLength = 3; typeaheadWaitMs = 500; typeaheadOptionsInScrollableView = 6; @@ -42,8 +42,8 @@ export class TypeAheadComponent implements OnInit, ControlValueAccessor { // Placeholders for the callbacks which are later provided // by the Control Value Accessor - private onTouchedCallback: () => void = noop; - private onChangeCallback: (_: any) => void = noop; + private onTouchedCallback: () => {}; + private onChangeCallback: (_: any) => {}; // get accessor get value(): any {