From 2dd9534ca2a0fee09042274ab13bda524d1067b6 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Mon, 18 Dec 2023 16:13:55 +0100 Subject: [PATCH] Card per product --- src/services/api.js | 5 +++-- src/views/PriceList.vue | 35 ++++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/services/api.js b/src/services/api.js index 3b890096436..98af504d1e8 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -91,8 +91,9 @@ export default { .then((response) => response.json()) }, - getPrices() { - return fetch(`${import.meta.env.VITE_OPEN_PRICES_API_URL}/prices`, { + getPrices(params = {}) { + const url = `${import.meta.env.VITE_OPEN_PRICES_API_URL}/prices?${new URLSearchParams(params)}` + return fetch(url, { method: 'GET', headers: { 'Content-Type': 'application/json', diff --git a/src/views/PriceList.vue b/src/views/PriceList.vue index e1e4d8a51fe..7e11ce2b772 100644 --- a/src/views/PriceList.vue +++ b/src/views/PriceList.vue @@ -1,13 +1,29 @@