Squashed commit message
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled

This commit is contained in:
2026-03-11 22:08:41 +03:00
commit f329bfa9d9
585 changed files with 65605 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import {defineStore} from "pinia";
import {apiPost} from "@/utils/http.js";
export const useStatsStore = defineStore('stats', {
state: () => ({
items: {
orders_count: null,
orders_total_amount: null,
customers_count: null,
}
}),
actions: {
async fetchStats() {
const response = await apiPost('getDashboardStats');
this.items.orders_count = response.data?.data?.orders_count;
this.items.orders_total_amount = response.data?.data?.orders_total_amount;
this.items.customers_count = response.data?.data?.customers_count;
}
},
});