TSK-534 Change access ids service url and fix type-ahead min char bug
This commit is contained in:
parent
3a01a9359d
commit
5b926153a7
|
@ -44,10 +44,10 @@
|
||||||
<ng-template #ownerInput>
|
<ng-template #ownerInput>
|
||||||
<input type="text" required #owner="ngModel" class="form-control" id="wb-owner" placeholder="Owner" [(ngModel)]="workbasket.owner"
|
<input type="text" required #owner="ngModel" class="form-control" id="wb-owner" placeholder="Owner" [(ngModel)]="workbasket.owner"
|
||||||
name="workbasket.owner">
|
name="workbasket.owner">
|
||||||
|
<div *ngIf="!owner?.valid" class="required-text">
|
||||||
|
* Owner is required
|
||||||
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<div *ngIf="!owner?.valid" class="required-text">
|
|
||||||
* Owner is required
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group ">
|
<div class="form-group ">
|
||||||
<label for="wb-domain" class="control-label">Domain</label>
|
<label for="wb-domain" class="control-label">Domain</label>
|
||||||
|
|
|
@ -9,16 +9,16 @@ import { Observable } from 'rxjs/Observable';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AccessIdsService {
|
export class AccessIdsService {
|
||||||
|
|
||||||
private url = environment.taskanaRestUrl + '/v1/validate-access-id';
|
private url = environment.taskanaRestUrl + '/v1/access-ids';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private httpClient: HttpClient) { }
|
private httpClient: HttpClient) { }
|
||||||
|
|
||||||
getAccessItemsInformation(token): Observable<Array<AccessIdDefinition>> {
|
getAccessItemsInformation(token: string): Observable<Array<AccessIdDefinition>> {
|
||||||
if (!token) {
|
if (!token || token.length < 3) {
|
||||||
return Observable.of([]);
|
return Observable.of([]);
|
||||||
}
|
}
|
||||||
return this.httpClient.get<Array<AccessIdDefinition>>(`${this.url}?search=${token}`);
|
return this.httpClient.get<Array<AccessIdDefinition>>(`${this.url}?searchFor=${token}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ export class TypeAheadComponent implements OnInit, ControlValueAccessor {
|
||||||
private inputTypeAhead;
|
private inputTypeAhead;
|
||||||
|
|
||||||
typeaheadLoading = false;
|
typeaheadLoading = false;
|
||||||
typeaheadMinLength = 2;
|
typeaheadMinLength = 3;
|
||||||
typeaheadWaitMs = 500;
|
typeaheadWaitMs = 500;
|
||||||
typeaheadOptionsInScrollableView = 6;
|
typeaheadOptionsInScrollableView = 6;
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ export class TypeAheadComponent implements OnInit, ControlValueAccessor {
|
||||||
|
|
||||||
// Placeholders for the callbacks which are later provided
|
// Placeholders for the callbacks which are later provided
|
||||||
// by the Control Value Accessor
|
// by the Control Value Accessor
|
||||||
private onTouchedCallback: () => void = noop;
|
private onTouchedCallback: () => {};
|
||||||
private onChangeCallback: (_: any) => void = noop;
|
private onChangeCallback: (_: any) => {};
|
||||||
|
|
||||||
// get accessor
|
// get accessor
|
||||||
get value(): any {
|
get value(): any {
|
||||||
|
|
Loading…
Reference in New Issue