This commit is contained in:
zadit
2024-11-19 00:31:28 +07:00
parent b8c1d30d14
commit 7daa8d6653
6 changed files with 284 additions and 255 deletions

View File

@@ -390,9 +390,9 @@ export const getFavourite = async (cafeId) => {
return response.json();
};
export const getAnalytics = async (cafeId, filter) => {
export const getReports = async (cafeId, filter) => {
const response = await fetch(
API_BASE_URL + "/transaction/get-analytics/" + cafeId + "?type=" + filter,
API_BASE_URL + "/transaction/reports/" + cafeId + "?type=" + filter,
{
method: "POST",
headers: {
@@ -402,6 +402,13 @@ export const getAnalytics = async (cafeId, filter) => {
);
return response.json();
};
export const getAnalytics = async (filter) => {
const response = await fetch(
API_BASE_URL + "/transaction/get-analytics" + "?type=" + filter,
getHeaders('POST')
);
return response.json();
};
export const getIncome = async (cafeId) => {
const response = await fetch(