Compare commits
2 Commits
0482aa7124
...
4130e0a796
Author | SHA1 | Date | |
---|---|---|---|
|
4130e0a796 | ||
|
01933b1602 |
@ -65,13 +65,13 @@ export class ItemService {
|
|||||||
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getItemList(itemType: string, dataFilter?: any, level: number = 1): Observable<IItem[]> {
|
getItemList(itemType?: string, dataFilter?: any, level?:number ,atItemLocationItemCode?:string,indexed?:boolean): Observable<IItem[]> {
|
||||||
var params = new HttpParams();
|
var params = new HttpParams();
|
||||||
params = params.append("it", itemType);
|
if(itemType) params = params.append("it", itemType);
|
||||||
if(dataFilter != null){
|
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
|
||||||
params = params.append("df", JSON.stringify(dataFilter));
|
if(atItemLocationItemCode) params = params.append("ail",atItemLocationItemCode);
|
||||||
}
|
if(indexed) params = params.append("ind",indexed?"true":"false");
|
||||||
params = params.append("lvl", itemType);
|
if(level) params = params.append("lvl", level.toFixed());
|
||||||
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i))));
|
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user