Files
bakery-ia/frontend/src/pages/app/DashboardPage.tsx

379 lines
15 KiB
TypeScript
Raw Normal View History

feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
// ================================================================
// frontend/src/pages/app/NewDashboardPage.tsx
// ================================================================
/**
* JTBD-Aligned Dashboard Page
*
* Complete redesign based on Jobs To Be Done methodology.
* Focused on answering: "What requires my attention right now?"
*
* Key principles:
* - Automation-first (show what system did)
* - Action-oriented (prioritize tasks)
* - Progressive disclosure (show 20% that matters 80%)
* - Mobile-first (one-handed operation)
* - Trust-building (explain system reasoning)
*/
import React, { useState, useEffect } from 'react';
2025-09-22 11:04:03 +02:00
import { useNavigate } from 'react-router-dom';
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
import { RefreshCw, ExternalLink, Plus, Sparkles } from 'lucide-react';
2025-11-13 16:01:08 +01:00
import { useTranslation } from 'react-i18next';
import { useTenant } from '../../stores/tenant.store';
2025-09-19 16:17:04 +02:00
import {
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
useBakeryHealthStatus,
useOrchestrationSummary,
useActionQueue,
useProductionTimeline,
useInsights,
useApprovePurchaseOrder,
useStartProductionBatch,
usePauseProductionBatch,
} from '../../api/hooks/newDashboard';
import { useRejectPurchaseOrder } from '../../api/hooks/purchase-orders';
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
import { HealthStatusCard } from '../../components/dashboard/HealthStatusCard';
import { ActionQueueCard } from '../../components/dashboard/ActionQueueCard';
import { OrchestrationSummaryCard } from '../../components/dashboard/OrchestrationSummaryCard';
import { ProductionTimelineCard } from '../../components/dashboard/ProductionTimelineCard';
import { InsightsGrid } from '../../components/dashboard/InsightsGrid';
2025-11-15 21:21:06 +01:00
import { PurchaseOrderDetailsModal } from '../../components/dashboard/PurchaseOrderDetailsModal';
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
import { UnifiedAddWizard } from '../../components/domain/unified-wizard';
import type { ItemType } from '../../components/domain/unified-wizard';
import { useDemoTour, shouldStartTour, clearTourStartPending } from '../../features/demo-onboarding';
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
export function NewDashboardPage() {
2025-09-22 11:04:03 +02:00
const navigate = useNavigate();
2025-11-13 16:01:08 +01:00
const { t } = useTranslation(['dashboard', 'common']);
const { currentTenant } = useTenant();
const tenantId = currentTenant?.id || '';
const { startTour } = useDemoTour();
const isDemoMode = localStorage.getItem('demo_mode') === 'true';
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
// Unified Add Wizard state
const [isAddWizardOpen, setIsAddWizardOpen] = useState(false);
const [addWizardError, setAddWizardError] = useState<string | null>(null);
2025-11-15 21:21:06 +01:00
// PO Details Modal state
const [selectedPOId, setSelectedPOId] = useState<string | null>(null);
const [isPOModalOpen, setIsPOModalOpen] = useState(false);
const [poModalMode, setPOModalMode] = useState<'view' | 'edit'>('view');
2025-11-18 07:17:17 +01:00
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
// Data fetching
const {
data: healthStatus,
isLoading: healthLoading,
refetch: refetchHealth,
} = useBakeryHealthStatus(tenantId);
const {
data: orchestrationSummary,
isLoading: orchestrationLoading,
refetch: refetchOrchestration,
} = useOrchestrationSummary(tenantId);
const {
data: actionQueue,
isLoading: actionQueueLoading,
refetch: refetchActionQueue,
} = useActionQueue(tenantId);
const {
data: productionTimeline,
isLoading: timelineLoading,
refetch: refetchTimeline,
} = useProductionTimeline(tenantId);
const {
data: insights,
isLoading: insightsLoading,
refetch: refetchInsights,
} = useInsights(tenantId);
// Mutations
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
const approvePO = useApprovePurchaseOrder();
const rejectPO = useRejectPurchaseOrder();
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
const startBatch = useStartProductionBatch();
const pauseBatch = usePauseProductionBatch();
2025-10-30 21:08:07 +01:00
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
// Handlers
const handleApprove = async (actionId: string) => {
2025-10-30 21:08:07 +01:00
try {
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
await approvePO.mutateAsync({ tenantId, poId: actionId });
// Refetch to update UI
refetchActionQueue();
refetchHealth();
2025-10-30 21:08:07 +01:00
} catch (error) {
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
console.error('Error approving PO:', error);
}
2025-09-22 11:04:03 +02:00
};
const handleReject = async (actionId: string, reason: string) => {
try {
await rejectPO.mutateAsync({ tenantId, poId: actionId, reason });
// Refetch to update UI
refetchActionQueue();
refetchHealth();
} catch (error) {
console.error('Error rejecting PO:', error);
}
};
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
const handleViewDetails = (actionId: string) => {
2025-11-15 21:21:06 +01:00
// Open modal to show PO details
setSelectedPOId(actionId);
setIsPOModalOpen(true);
2025-10-21 19:50:07 +02:00
};
2025-08-28 10:41:04 +02:00
const handleStartBatch = async (batchId: string) => {
try {
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
await startBatch.mutateAsync({ tenantId, batchId });
refetchTimeline();
refetchHealth();
} catch (error) {
console.error('Error starting batch:', error);
}
2025-08-28 10:41:04 +02:00
};
const handlePauseBatch = async (batchId: string) => {
try {
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
await pauseBatch.mutateAsync({ tenantId, batchId });
refetchTimeline();
refetchHealth();
} catch (error) {
console.error('Error pausing batch:', error);
}
2025-09-19 16:17:04 +02:00
};
2025-08-28 10:41:04 +02:00
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
const handleRefreshAll = () => {
refetchHealth();
refetchOrchestration();
refetchActionQueue();
refetchTimeline();
refetchInsights();
};
2025-10-21 19:50:07 +02:00
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
const handleAddWizardComplete = (itemType: ItemType, data?: any) => {
console.log('Item created:', itemType, data);
// Refetch relevant data based on what was added
handleRefreshAll();
};
2025-11-16 22:13:52 +01:00
// Keyboard shortcut for Quick Add (Cmd/Ctrl + K)
useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
// Check for Cmd+K (Mac) or Ctrl+K (Windows/Linux)
if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
event.preventDefault();
setIsAddWizardOpen(true);
}
};
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
}, []);
// Demo tour auto-start logic
useEffect(() => {
console.log('[Dashboard] Demo mode:', isDemoMode);
console.log('[Dashboard] Should start tour:', shouldStartTour());
console.log('[Dashboard] SessionStorage demo_tour_should_start:', sessionStorage.getItem('demo_tour_should_start'));
console.log('[Dashboard] SessionStorage demo_tour_start_step:', sessionStorage.getItem('demo_tour_start_step'));
// Check if there's a tour intent from redirection (higher priority)
const shouldStartFromRedirect = sessionStorage.getItem('demo_tour_should_start') === 'true';
const redirectStartStep = parseInt(sessionStorage.getItem('demo_tour_start_step') || '0', 10);
if (isDemoMode && (shouldStartTour() || shouldStartFromRedirect)) {
console.log('[Dashboard] Starting tour in 1.5s...');
const timer = setTimeout(() => {
console.log('[Dashboard] Executing startTour()');
if (shouldStartFromRedirect) {
// Start tour from the specific step that was intended
startTour(redirectStartStep);
// Clear the redirect intent
sessionStorage.removeItem('demo_tour_should_start');
sessionStorage.removeItem('demo_tour_start_step');
} else {
// Start tour normally (from beginning or resume)
startTour();
clearTourStartPending();
}
}, 1500);
return () => clearTimeout(timer);
}
}, [isDemoMode, startTour]);
2025-08-28 10:41:04 +02:00
return (
2025-11-18 07:17:17 +01:00
<div className="min-h-screen pb-20 md:pb-8">
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* Mobile-optimized container */}
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
{/* Header */}
<div className="flex items-center justify-between mb-6">
<div>
2025-11-13 16:01:08 +01:00
<h1 className="text-3xl md:text-4xl font-bold" style={{ color: 'var(--text-primary)' }}>{t('dashboard:title')}</h1>
<p className="mt-1" style={{ color: 'var(--text-secondary)' }}>{t('dashboard:subtitle')}</p>
2025-10-21 19:50:07 +02:00
</div>
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
{/* Action Buttons */}
<div className="flex items-center gap-3">
<button
onClick={handleRefreshAll}
className="flex items-center gap-2 px-4 py-2 rounded-lg font-semibold transition-colors duration-200"
style={{
backgroundColor: 'var(--bg-primary)',
borderColor: 'var(--border-primary)',
border: '1px solid',
color: 'var(--text-secondary)'
}}
>
<RefreshCw className="w-5 h-5" />
2025-11-13 16:01:08 +01:00
<span className="hidden sm:inline">{t('common:actions.refresh')}</span>
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
</button>
2025-11-16 22:13:52 +01:00
{/* Unified Add Button with Keyboard Shortcut */}
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
<button
onClick={() => setIsAddWizardOpen(true)}
2025-11-16 22:13:52 +01:00
className="group relative flex items-center gap-2 px-6 py-2.5 rounded-lg font-semibold transition-all duration-200 shadow-lg hover:shadow-xl hover:-translate-y-0.5 active:translate-y-0"
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
style={{
background: 'linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%)',
color: 'white'
}}
2025-11-16 22:13:52 +01:00
title={`Quick Add (${navigator.platform.includes('Mac') ? 'Cmd' : 'Ctrl'}+K)`}
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
>
<Plus className="w-5 h-5" />
2025-11-13 16:01:08 +01:00
<span className="hidden sm:inline">{t('common:actions.add')}</span>
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
<Sparkles className="w-4 h-4 opacity-80" />
2025-11-16 22:13:52 +01:00
{/* Keyboard shortcut badge - shown on hover */}
<span className="hidden lg:flex absolute -bottom-8 left-1/2 -translate-x-1/2 items-center gap-1 px-2 py-1 rounded text-xs font-mono opacity-0 group-hover:opacity-100 transition-opacity duration-200 whitespace-nowrap pointer-events-none" style={{ backgroundColor: 'var(--bg-primary)', color: 'var(--text-secondary)', boxShadow: '0 2px 8px rgba(0,0,0,0.1)' }}>
<kbd className="px-1.5 py-0.5 rounded text-xs font-semibold" style={{ backgroundColor: 'var(--bg-tertiary)', border: '1px solid var(--border-secondary)' }}>
{navigator.platform.includes('Mac') ? '⌘' : 'Ctrl'}
</kbd>
<span>+</span>
<kbd className="px-1.5 py-0.5 rounded text-xs font-semibold" style={{ backgroundColor: 'var(--bg-tertiary)', border: '1px solid var(--border-secondary)' }}>
K
</kbd>
</span>
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
</button>
</div>
</div>
2025-09-19 16:17:04 +02:00
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* Main Dashboard Layout */}
<div className="space-y-6">
{/* SECTION 1: Bakery Health Status */}
<div data-tour="dashboard-stats">
<HealthStatusCard healthStatus={healthStatus} loading={healthLoading} />
</div>
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* SECTION 2: What Needs Your Attention (Action Queue) */}
<div data-tour="pending-po-approvals">
<ActionQueueCard
actionQueue={actionQueue}
loading={actionQueueLoading}
onApprove={handleApprove}
onReject={handleReject}
onViewDetails={handleViewDetails}
tenantId={tenantId}
/>
</div>
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* SECTION 3: What the System Did for You (Orchestration Summary) */}
<div data-tour="real-time-alerts">
<OrchestrationSummaryCard
summary={orchestrationSummary}
loading={orchestrationLoading}
/>
</div>
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* SECTION 4: Today's Production Timeline */}
<div data-tour="today-production">
<ProductionTimelineCard
timeline={productionTimeline}
loading={timelineLoading}
onStart={handleStartBatch}
onPause={handlePauseBatch}
/>
</div>
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* SECTION 5: Quick Insights Grid */}
<div>
2025-11-13 16:01:08 +01:00
<h2 className="text-2xl font-bold mb-4" style={{ color: 'var(--text-primary)' }}>{t('dashboard:sections.key_metrics')}</h2>
<InsightsGrid insights={insights} loading={insightsLoading} />
</div>
2025-09-19 16:17:04 +02:00
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* SECTION 6: Quick Action Links */}
2025-11-18 07:17:17 +01:00
<div className="rounded-xl shadow-lg p-6 border" style={{ backgroundColor: 'var(--bg-primary)', borderColor: 'var(--border-primary)' }}>
2025-11-13 16:01:08 +01:00
<h2 className="text-xl font-bold mb-4" style={{ color: 'var(--text-primary)' }}>{t('dashboard:sections.quick_actions')}</h2>
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
<button
onClick={() => navigate('/app/operations/procurement')}
className="flex items-center justify-between p-4 rounded-lg transition-colors duration-200 group"
style={{ backgroundColor: 'var(--bg-tertiary)', borderLeft: '4px solid var(--color-info)' }}
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
>
2025-11-13 16:01:08 +01:00
<span className="font-semibold" style={{ color: 'var(--text-primary)' }}>{t('dashboard:quick_actions.view_orders')}</span>
<ExternalLink className="w-5 h-5 group-hover:translate-x-1 transition-transform duration-200" style={{ color: 'var(--color-info)' }} />
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
</button>
<button
onClick={() => navigate('/app/operations/production')}
className="flex items-center justify-between p-4 rounded-lg transition-colors duration-200 group"
style={{ backgroundColor: 'var(--bg-tertiary)', borderLeft: '4px solid var(--color-success)' }}
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
>
2025-11-13 16:01:08 +01:00
<span className="font-semibold" style={{ color: 'var(--text-primary)' }}>{t('dashboard:quick_actions.view_production')}</span>
<ExternalLink className="w-5 h-5 group-hover:translate-x-1 transition-transform duration-200" style={{ color: 'var(--color-success)' }} />
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
</button>
<button
onClick={() => navigate('/app/database/inventory')}
className="flex items-center justify-between p-4 rounded-lg transition-colors duration-200 group"
style={{ backgroundColor: 'var(--bg-tertiary)', borderLeft: '4px solid var(--color-secondary)' }}
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
>
2025-11-13 16:01:08 +01:00
<span className="font-semibold" style={{ color: 'var(--text-primary)' }}>{t('dashboard:quick_actions.view_inventory')}</span>
<ExternalLink className="w-5 h-5 group-hover:translate-x-1 transition-transform duration-200" style={{ color: 'var(--color-secondary)' }} />
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
</button>
<button
onClick={() => navigate('/app/database/suppliers')}
className="flex items-center justify-between p-4 rounded-lg transition-colors duration-200 group"
style={{ backgroundColor: 'var(--bg-tertiary)', borderLeft: '4px solid var(--color-warning)' }}
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
>
2025-11-13 16:01:08 +01:00
<span className="font-semibold" style={{ color: 'var(--text-primary)' }}>{t('dashboard:quick_actions.view_suppliers')}</span>
<ExternalLink className="w-5 h-5 group-hover:translate-x-1 transition-transform duration-200" style={{ color: 'var(--color-warning)' }} />
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
</button>
</div>
</div>
</div>
2025-08-28 10:41:04 +02:00
</div>
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
{/* Mobile-friendly bottom padding */}
<div className="h-20 md:hidden"></div>
feat: Add JTBD-driven Unified Add Wizard system Implemented a comprehensive unified wizard system to consolidate all "add new content" actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done (JTBD) methodology. ## What's New ### Core Components - **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards - **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types - **9 Individual Wizards**: Step-by-step flows for each content type ### Priority Implementations (P0) 1. **SalesEntryWizard** ⭐ (MOST CRITICAL) - Manual entry with dynamic product lists and auto-calculated totals - File upload placeholder for CSV/Excel bulk import - Critical for small bakeries without POS systems 2. **InventoryWizard** - Type selection (ingredient vs finished product) - Context-aware forms based on inventory type - Optional initial lot entry ### Placeholder Wizards (P1/P2) - Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member - Proper structure in place for incremental enhancement ### Dashboard Integration - Added prominent "Agregar" button in dashboard header - Opens wizard modal with visual type selection - Auto-refreshes dashboard after wizard completion ### Design Highlights - Mobile-first responsive design (full-screen on mobile, modal on desktop) - Touch-friendly with 44px+ touch targets - Follows existing color system and design tokens - Progressive disclosure to reduce cognitive load - Accessibility-compliant (WCAG AA) ## Documentation Created comprehensive documentation: - `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research - `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications - `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide ## Files Changed - New: `frontend/src/components/domain/unified-wizard/` (15 new files) - Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration) ## Next Steps - [ ] Connect wizards to real API endpoints (currently mock/placeholder) - [ ] Implement full CSV upload for sales entry - [ ] Add comprehensive form validation - [ ] Enhance P1 priority wizards based on user feedback ## JTBD Alignment Main Job: "When I need to expand or update my bakery operations, I want to quickly add new resources to my management system, so I can keep my business running smoothly." Key insights applied: - Prioritized sales entry (most bakeries lack POS) - Mobile-first (bakery owners are on their feet) - Progressive disclosure (reduce overwhelm) - Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
{/* Unified Add Wizard */}
<UnifiedAddWizard
isOpen={isAddWizardOpen}
onClose={() => setIsAddWizardOpen(false)}
onComplete={handleAddWizardComplete}
/>
2025-11-15 21:21:06 +01:00
{/* Purchase Order Details Modal - Unified View/Edit */}
2025-11-15 21:21:06 +01:00
{selectedPOId && (
<PurchaseOrderDetailsModal
poId={selectedPOId}
tenantId={tenantId}
isOpen={isPOModalOpen}
initialMode={poModalMode}
2025-11-15 21:21:06 +01:00
onClose={() => {
setIsPOModalOpen(false);
setSelectedPOId(null);
setPOModalMode('view');
2025-11-18 07:17:17 +01:00
handleRefreshAll();
}}
onApprove={handleApprove}
2025-11-18 07:17:17 +01:00
/>
)}
2025-08-28 10:41:04 +02:00
</div>
);
feat: Complete JTBD-aligned bakery dashboard redesign Implements comprehensive dashboard redesign based on Jobs To Be Done methodology focused on answering: "What requires my attention right now?" ## Backend Implementation ### Dashboard Service (NEW) - Health status calculation (green/yellow/red traffic light) - Action queue prioritization (critical/important/normal) - Orchestration summary with narrative format - Production timeline transformation - Insights calculation and consequence prediction ### API Endpoints (NEW) - GET /dashboard/health-status - Overall bakery health indicator - GET /dashboard/orchestration-summary - What system did automatically - GET /dashboard/action-queue - Prioritized tasks requiring attention - GET /dashboard/production-timeline - Today's production schedule - GET /dashboard/insights - Key metrics (savings, inventory, waste, deliveries) ### Enhanced Models - PurchaseOrder: Added reasoning, consequence, reasoning_data fields - ProductionBatch: Added reasoning, reasoning_data fields - Enables transparency into automation decisions ## Frontend Implementation ### API Hooks (NEW) - useBakeryHealthStatus() - Real-time health monitoring - useOrchestrationSummary() - System transparency - useActionQueue() - Prioritized action management - useProductionTimeline() - Production tracking - useInsights() - Glanceable metrics ### Dashboard Components (NEW) - HealthStatusCard: Traffic light indicator with checklist - ActionQueueCard: Prioritized actions with reasoning/consequences - OrchestrationSummaryCard: Narrative of what system did - ProductionTimelineCard: Chronological production view - InsightsGrid: 2x2 grid of key metrics ### Main Dashboard Page (REPLACED) - Complete rewrite with mobile-first design - All sections integrated with error handling - Real-time refresh and quick action links - Old dashboard backed up as DashboardPage.legacy.tsx ## Key Features ### Automation-First - Shows what orchestrator did overnight - Builds trust through transparency - Explains reasoning for all automated decisions ### Action-Oriented - Prioritizes tasks over information display - Clear consequences for each action - Large touch-friendly buttons ### Progressive Disclosure - Shows 20% of info that matters 80% of time - Expandable details when needed - No overwhelming metrics ### Mobile-First - One-handed operation - Large touch targets (min 44px) - Responsive grid layouts ### Trust-Building - Narrative format ("I planned your day") - Reasoning inputs transparency - Clear status indicators ## User Segments Supported 1. Solo Bakery Owner (Primary) - Simple health indicator - Action checklist (max 3-5 items) - Mobile-optimized 2. Multi-Location Owner - Multi-tenant support (existing) - Comparison capabilities - Delegation ready 3. Enterprise/Central Bakery (Future) - Network topology support - Advanced analytics ready ## JTBD Analysis Delivered Main Job: "Help me quickly understand bakery status and know what needs my intervention" Emotional Jobs Addressed: - Feel in control despite automation - Reduce daily anxiety - Feel competent with technology - Trust system as safety net Social Jobs Addressed: - Demonstrate professional management - Avoid being bottleneck - Show sustainability ## Technical Stack Backend: Python, FastAPI, SQLAlchemy, PostgreSQL Frontend: React, TypeScript, TanStack Query, Tailwind CSS Architecture: Microservices with circuit breakers ## Breaking Changes - Complete dashboard page rewrite (old version backed up) - New API endpoints require orchestrator service deployment - Database migrations needed for reasoning fields ## Migration Required Run migrations to add new model fields: - purchase_orders: reasoning, consequence, reasoning_data - production_batches: reasoning, reasoning_data ## Documentation See DASHBOARD_REDESIGN_SUMMARY.md for complete implementation details, JTBD analysis, success metrics, and deployment guide. BREAKING CHANGE: Dashboard page completely redesigned with new data structures
2025-11-07 17:10:17 +00:00
}
export default NewDashboardPage;