From b20edc0c3313d116f41a4c96dfcaf5d90c44ec44 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:43:54 -0800 Subject: [PATCH] fix: Add missing heatmap components and User.name field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔧 Build Fixes: - Created FloorToggle component - Created HealthLegend component - Added name field to User interface Components complete for heatmap feature --- frontend/src/components/Layout.tsx | 80 ++++-- frontend/src/components/ThemeToggle.tsx | 89 +++++++ frontend/src/components/heatmap/BedCell.tsx | 160 +++++++++++ .../src/components/heatmap/BedTooltip.tsx | 153 +++++++++++ frontend/src/components/heatmap/FloorGrid.tsx | 117 ++++++++ .../src/components/heatmap/FloorToggle.tsx | 32 +++ .../components/heatmap/GrowRoomHeatmap.tsx | 250 ++++++++++++++++++ .../src/components/heatmap/HealthLegend.tsx | 38 +++ frontend/src/context/AuthContext.tsx | 1 + frontend/src/index.css | 185 +++++++++---- specs/grow-room-heatmap.md | 103 ++++++++ 11 files changed, 1134 insertions(+), 74 deletions(-) create mode 100644 frontend/src/components/ThemeToggle.tsx create mode 100644 frontend/src/components/heatmap/BedCell.tsx create mode 100644 frontend/src/components/heatmap/BedTooltip.tsx create mode 100644 frontend/src/components/heatmap/FloorGrid.tsx create mode 100644 frontend/src/components/heatmap/FloorToggle.tsx create mode 100644 frontend/src/components/heatmap/GrowRoomHeatmap.tsx create mode 100644 frontend/src/components/heatmap/HealthLegend.tsx create mode 100644 specs/grow-room-heatmap.md diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index 2fe587d..6cb8344 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -1,55 +1,89 @@ import React from 'react'; import { Outlet, Link, useLocation } from 'react-router-dom'; import { useAuth } from '../context/AuthContext'; +import ThemeToggle from './ThemeToggle'; export default function Layout() { const { user, logout } = useAuth(); const location = useLocation(); const navItems = [ - { label: 'Dashboard', path: '/' }, - { label: 'Rooms', path: '/rooms' }, - { label: 'Batches', path: '/batches' }, - { label: 'Timeclock', path: '/timeclock' }, + { label: 'Dashboard', path: '/', icon: '📊' }, + { label: 'Daily Walkthrough', path: '/walkthrough', icon: '✅' }, + { label: 'Rooms', path: '/rooms', icon: '🏠' }, + { label: 'Batches', path: '/batches', icon: '🌱' }, + { label: 'Timeclock', path: '/timeclock', icon: '⏰' }, ]; return ( -