diff --git a/src/components/kanban/KanbanCard.jsx b/src/components/kanban/KanbanCard.jsx index b3906b8..d72fe9f 100644 --- a/src/components/kanban/KanbanCard.jsx +++ b/src/components/kanban/KanbanCard.jsx @@ -2,6 +2,7 @@ import React from 'react'; import { useDraggable } from '@dnd-kit/core'; import { CSS } from '@dnd-kit/utilities'; import { MapPin, User, Clock, CloudLightning } from 'lucide-react'; +import { DEMO_TODAY } from '../../data/mockStore'; function getInitials(name) { return (name || '').split(' ').map(w => w[0]).join('').slice(0, 2).toUpperCase(); @@ -11,7 +12,7 @@ function getDaysInStage(activity) { if (!activity?.length) return 0; const last = activity[0]; const lastDate = new Date(last.date); - const now = new Date('2026-04-07'); + const now = DEMO_TODAY; return Math.max(0, Math.floor((now - lastDate) / 86400000)); } diff --git a/src/data/mockStore.jsx b/src/data/mockStore.jsx index 1662360..4e45ba1 100644 --- a/src/data/mockStore.jsx +++ b/src/data/mockStore.jsx @@ -2,6 +2,9 @@ import React, { createContext, useContext, useState, useEffect } from 'react'; import { toast } from 'sonner'; import { logger } from '../utils/logger'; +// Fixed "today" for the demo so seeded dates never go stale or land in the future. +export const DEMO_TODAY = new Date('2026-05-29T12:00:00'); + // --- DATA CONSTANTS (Extracted from old App.jsx) --- const RAW_LOCATIONS = [