Price: filtrar por filtro y SKU

This commit is contained in:
Cat /dev/Nulo 2021-11-01 17:49:14 -03:00
parent 6070574ca9
commit 3429b10896

View file

@ -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()}`,
{