Fix new services implementation 11
This commit is contained in:
@@ -15,15 +15,22 @@ interface DashboardPageProps {
|
||||
onNavigateToOrders?: () => void;
|
||||
onNavigateToReports?: () => void;
|
||||
onNavigateToProduction?: () => void;
|
||||
onNavigateToInventory?: () => void;
|
||||
onNavigateToRecipes?: () => void;
|
||||
onNavigateToSales?: () => void;
|
||||
}
|
||||
|
||||
const DashboardPage: React.FC<DashboardPageProps> = ({
|
||||
onNavigateToOrders,
|
||||
onNavigateToReports,
|
||||
onNavigateToProduction
|
||||
onNavigateToProduction,
|
||||
onNavigateToInventory,
|
||||
onNavigateToRecipes,
|
||||
onNavigateToSales
|
||||
}) => {
|
||||
const {
|
||||
weather,
|
||||
tenantId,
|
||||
isLoading,
|
||||
error,
|
||||
reload,
|
||||
@@ -31,13 +38,13 @@ const DashboardPage: React.FC<DashboardPageProps> = ({
|
||||
metrics
|
||||
} = useDashboard();
|
||||
|
||||
// Use real API data for order suggestions
|
||||
// Use real API data for order suggestions - pass tenantId from dashboard
|
||||
const {
|
||||
dailyOrders: realDailyOrders,
|
||||
weeklyOrders: realWeeklyOrders,
|
||||
isLoading: ordersLoading,
|
||||
error: ordersError
|
||||
} = useOrderSuggestions();
|
||||
} = useOrderSuggestions(tenantId);
|
||||
|
||||
// Debug order suggestions
|
||||
console.log('📈 Dashboard: OrderSuggestions data:', {
|
||||
|
||||
Reference in New Issue
Block a user