Price: filtrar por filtro y SKU
This commit is contained in:
parent
6070574ca9
commit
3429b10896
1 changed files with 8 additions and 0 deletions
8
price.ts
8
price.ts
|
@ -7,6 +7,8 @@ import {
|
|||
|
||||
export interface PriceQuery {
|
||||
paginacion?: Paginacion;
|
||||
filter?: string;
|
||||
SKUCode?: string;
|
||||
}
|
||||
|
||||
export interface Price {
|
||||
|
@ -28,6 +30,12 @@ export async function getPrices(
|
|||
): Promise<PriceResponse> {
|
||||
let searchParams = new URLSearchParams();
|
||||
paginacionToSearchParams(options.paginacion, searchParams);
|
||||
if (options.filter) {
|
||||
searchParams.set("filter", options.filter);
|
||||
}
|
||||
if (options.SKUCode) {
|
||||
searchParams.set("SKUCode", options.SKUCode);
|
||||
}
|
||||
const res = await fetch(
|
||||
`${HOST}/api/Aperture/Price?${searchParams.toString()}`,
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue