import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAuth } from '../../context/AuthContext'; import FinancialKPICards from '../../components/owner/FinancialKPICards'; import UrgentItemsPanel from '../../components/owner/UrgentItemsPanel'; import FinancialDetailsModal from '../../components/owner/FinancialDetailsModal'; import ActionCenterModal from '../../components/owner/ActionCenterModal'; import { SpotlightCard } from '../../components/SpotlightCard'; const OwnerSnapshot = () => { const { user } = useAuth(); const navigate = useNavigate(); // Modal States const [financialModal, setFinancialModal] = useState({ isOpen: false, type: 'revenue' }); const [actionModal, setActionModal] = useState({ isOpen: false, filter: 'all' }); // Handlers const handleFinancialClick = (type) => { setFinancialModal({ isOpen: true, type }); }; const handleActionClick = (id) => { // Map IDs to filter types const filterMap = { 'docs': 'docs', 'vendors': 'vendors', 'invoices': 'invoices', 'all': 'all' }; setActionModal({ isOpen: true, filter: filterMap[id] || 'all' }); }; // Get time of day for greeting const hour = new Date().getHours(); const greeting = hour < 12 ? 'Good Morning' : hour < 18 ? 'Good Afternoon' : 'Good Evening'; return (
Here's your business snapshot for today.
New invoice submitted by Texas Builders LLC
2 hours agoPayment received for Project P-2602
5 hours ago