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>
|
||||
<input type="text" required #owner="ngModel" class="form-control" id="wb-owner" placeholder="Owner" [(ngModel)]="workbasket.owner"
|
||||
name="workbasket.owner">
|
||||
</ng-template>
|
||||
<div *ngIf="!owner?.valid" class="required-text">
|
||||
* Owner is required
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="form-group ">
|
||||
<label for="wb-domain" class="control-label">Domain</label>
|
||||
|
|
|
@ -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<Array<AccessIdDefinition>> {
|
||||
if (!token) {
|
||||
getAccessItemsInformation(token: string): Observable<Array<AccessIdDefinition>> {
|
||||
if (!token || token.length < 3) {
|
||||
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;
|
||||
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue