diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts index ad203cee..133b160c 100644 --- a/src/stores/quotations/index.ts +++ b/src/stores/quotations/index.ts @@ -32,8 +32,11 @@ export const useQuotationStore = defineStore('quotation-store', () => { canceled: 0, }); - async function getQuotationStats() { - const res = await api.get('/quotation/stats'); + async function getQuotationStats(params?: { + startDate: string | Date; + endDate: string | Date; + }) { + const res = await api.get('/quotation/stats', { params }); if (res.status < 400) { return res.data; } diff --git a/src/stores/report/index.ts b/src/stores/report/index.ts index aae45d32..c82cabaa 100644 --- a/src/stores/report/index.ts +++ b/src/stores/report/index.ts @@ -98,8 +98,13 @@ export async function getReportProduct() { return null; } -export async function getReportPayment() { - const res = await api.get(`/${ENDPOINT}/payment`); +export async function getReportPayment(params?: { + startDate: string | Date; + endDate: string | Date; +}) { + const res = await api.get(`/${ENDPOINT}/payment`, { + params, + }); if (res.status < 400) { return res.data; }