Rate Contract is checked during save and update of Purchase at the backend
This commit is contained in:
@ -51,8 +51,16 @@ export class ProductService {
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'delete'))) as Observable<Product>;
|
||||
}
|
||||
|
||||
autocomplete(query: string, extended: boolean = false): Observable<Product[]> {
|
||||
autocomplete(
|
||||
query: string,
|
||||
extended: boolean = false,
|
||||
date?: string,
|
||||
vendorId?: string,
|
||||
): Observable<Product[]> {
|
||||
const options = { params: new HttpParams().set('q', query).set('e', extended.toString()) };
|
||||
if (!!vendorId && !!date) {
|
||||
options.params = options.params.set('v', vendorId as string).set('d', date as string);
|
||||
}
|
||||
return this.http
|
||||
.get<Product[]>(`${url}/query`, options)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'autocomplete'))) as Observable<Product[]>;
|
||||
|
||||
Reference in New Issue
Block a user