- Trasporti- Passo 2

This commit is contained in:
Surya Paolo
2025-12-22 23:39:42 +01:00
parent c9fc1a83d0
commit 11e946bfc6
34 changed files with 1682 additions and 1029 deletions

View File

@@ -72,10 +72,10 @@ export default defineComponent({
loading.value = true;
try {
const response = await Api.SendReq('/api/trasporti/widget/data', 'GET', {});
const response = await Api.SendReqWithData('/api/trasporti/widget/data', 'GET', {});
if (response.success) {
const data: WidgetData = response.data.data;
const data: WidgetData = response.data;
stats.value = data.stats || { offers: 0, requests: 0, matches: 0 };
recentRides.value = data.recentRides || [];
@@ -95,10 +95,10 @@ export default defineComponent({
const loadStats = async () => {
try {
const response = await Api.SendReq('/api/trasporti/stats/summary', 'GET');
const response = await Api.SendReqWithData('/api/trasporti/stats/summary', 'GET');
if (response.success) {
stats.value = response.data.data;
stats.value = response.data;
}
} catch (error) {
console.error('Errore caricamento stats:', error);