Merge branch 'main' of http://45.93.137.91:3000/Rahaf/SweetHome
All checks were successful
Build frontend / build (push) Successful in 1m5s
All checks were successful
Build frontend / build (push) Successful in 1m5s
This commit is contained in:
@ -69,30 +69,35 @@ export default function OwnerAccountBookPage() {
|
||||
});
|
||||
}
|
||||
|
||||
async function fetchData() {
|
||||
try {
|
||||
const data = await getOwnerStatistics();
|
||||
if (data) {
|
||||
setStats({
|
||||
totalRevenue: data.totalRevenue ?? null,
|
||||
totalReservations: data.totalReservations ?? null,
|
||||
activeProperties: data.activeProperties ?? null,
|
||||
financialRevenue: data.financialRevenue ?? null,
|
||||
financialCommission: data.financialCommission ?? null,
|
||||
financialBalance: data.financialBalance ?? null,
|
||||
directRevenue: data.directRevenue ?? null,
|
||||
directCommission: data.directCommission ?? null,
|
||||
directBalance: data.directBalance ?? null,
|
||||
directRating: data.directRating ?? null,
|
||||
directPostponements: data.directPostponements ?? null,
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
toast.error('تعذر تحميل إحصائيات الحساب');
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
async function fetchData() {
|
||||
try {
|
||||
const data = await getOwnerStatistics();
|
||||
|
||||
if (data) {
|
||||
setStats({
|
||||
totalRevenue: data.totalRevenue ?? null,
|
||||
totalReservations: data.totalReservations ?? null,
|
||||
activeProperties: data.activeProperties ?? null,
|
||||
|
||||
|
||||
financialRevenue:
|
||||
data.financialRevenue ?? data.totalRevenue ?? null,
|
||||
|
||||
financialCommission: data.financialCommission ?? null,
|
||||
financialBalance: data.financialBalance ?? null,
|
||||
directRevenue: data.directRevenue ?? null,
|
||||
directCommission: data.directCommission ?? null,
|
||||
directBalance: data.directBalance ?? null,
|
||||
directRating: data.directRating ?? null,
|
||||
directPostponements: data.directPostponements ?? null,
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
toast.error('تعذر تحميل إحصائيات الحساب');
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}
|
||||
fetchData();
|
||||
}, [router]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user