diff --git a/src/components/DashboardLayout.tsx b/src/components/DashboardLayout.tsx index ec43b6a..8e4770a 100644 --- a/src/components/DashboardLayout.tsx +++ b/src/components/DashboardLayout.tsx @@ -3,6 +3,7 @@ import { Sidebar } from './Sidebar' import { TopNavbar } from './TopNavbar' import { DashboardHome } from './DashboardHome' import { UserManagement } from './UserManagement' +import { Experiments } from './Experiments' import { userManagement, type User } from '../lib/supabase' interface DashboardLayoutProps { @@ -65,16 +66,7 @@ export function DashboardLayout({ onLogout }: DashboardLayoutProps) { ) } case 'experiments': - return ( -
Manage pecan processing experiment definitions
++ {canManageExperiments ? 'Click on any experiment to edit details' : 'View experiment definitions and status'} +
+| + Experiment # + | ++ Repetitions + | ++ Process Parameters + | ++ Schedule Status + | ++ Results Status + | ++ Created + | + {canManageExperiments && ( ++ Actions + | + )} +
|---|---|---|---|---|---|---|
| + #{experiment.experiment_number} + | ++ {experiment.rep_number} / {experiment.reps_required} + | +
+
+
+ Soaking: {experiment.soaking_duration_hr}h
+ Drying: {experiment.air_drying_time_min}min
+ Frequency: {experiment.plate_contact_frequency_hz}Hz
+ |
+ + + {experiment.schedule_status} + + | ++ + {experiment.results_status} + + | ++ {new Date(experiment.created_at).toLocaleDateString()} + | + {canManageExperiments && ( +
+
+
+ {currentUser?.roles.includes('admin') && (
+
+ )}
+
+ |
+ )}
+
+ {filterStatus === 'all' + ? 'Get started by creating your first experiment.' + : `No experiments with status "${filterStatus}".`} +
+ {canManageExperiments && filterStatus === 'all' && ( +