fix: Resolve build errors and add database migrations
- Fix frontend import: Change from useAppContext to useTenant store - Fix backend imports: Use app.core.database instead of shared.database - Remove auth dependencies from dashboard endpoints - Add database migrations for reasoning fields in procurement and production Migrations: - procurement: Add reasoning, consequence, reasoning_data to purchase_orders - production: Add reasoning, reasoning_data to production_batches
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { RefreshCw, ExternalLink } from 'lucide-react';
|
||||
import { useAppContext } from '../../contexts/AppContext';
|
||||
import { useTenant } from '../../stores/tenant.store';
|
||||
import {
|
||||
useBakeryHealthStatus,
|
||||
useOrchestrationSummary,
|
||||
@@ -37,8 +37,8 @@ import { InsightsGrid } from '../../components/dashboard/InsightsGrid';
|
||||
|
||||
export function NewDashboardPage() {
|
||||
const navigate = useNavigate();
|
||||
const { selectedTenant } = useAppContext();
|
||||
const tenantId = selectedTenant?.id || '';
|
||||
const { currentTenant } = useTenant();
|
||||
const tenantId = currentTenant?.id || '';
|
||||
|
||||
// Data fetching
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user