@@ -5,6 +5,7 @@ import Link from 'next/link';
55import { ArrowLeft , Users } from 'lucide-react' ;
66import type { User } from '@vector-institute/aieng-auth-core' ;
77import type { AnalyticsSnapshot , TeamMetrics } from '@/lib/types' ;
8+ import { Tooltip } from '@/app/components/tooltip' ;
89
910interface TemplateTeamsContentProps {
1011 user : User | null ;
@@ -154,7 +155,7 @@ export default function TemplateTeamsContent({ user, templateName }: TemplateTea
154155 { /* Main Content */ }
155156 < div className = "max-w-7xl mx-auto px-4 md:px-8 pb-8" >
156157 { /* Summary Cards */ }
157- < div className = "grid gap-6 md:grid-cols-4 mb-8 animate-fade-in" >
158+ < div className = "grid gap-6 md:grid-cols-3 mb-8 animate-fade-in" >
158159 < div className = "bg-white dark:bg-slate-800 rounded-2xl shadow-xl border-2 border-slate-200 dark:border-slate-700 p-6" >
159160 < div className = "text-sm font-semibold text-slate-600 dark:text-slate-400 uppercase tracking-wider mb-2" >
160161 Total Workspaces
@@ -181,15 +182,6 @@ export default function TemplateTeamsContent({ user, templateName }: TemplateTea
181182 { template . total_workspace_hours . toLocaleString ( ) } h
182183 </ div >
183184 </ div >
184-
185- < div className = "bg-white dark:bg-slate-800 rounded-2xl shadow-xl border-2 border-slate-200 dark:border-slate-700 p-6" >
186- < div className = "text-sm font-semibold text-slate-600 dark:text-slate-400 uppercase tracking-wider mb-2" >
187- Avg Hours
188- </ div >
189- < div className = "text-3xl font-bold text-slate-900 dark:text-white" >
190- { template . avg_workspace_hours . toLocaleString ( ) } h
191- </ div >
192- </ div >
193185 </ div >
194186
195187 { /* Teams Table */ }
@@ -213,16 +205,24 @@ export default function TemplateTeamsContent({ user, templateName }: TemplateTea
213205 Team
214206 </ th >
215207 < th className = "px-6 py-4 text-right text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider" >
216- Workspaces
208+ < Tooltip content = "Number of workspaces created by this team from this template" >
209+ Workspaces
210+ </ Tooltip >
217211 </ th >
218212 < th className = "px-6 py-4 text-right text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider" >
219- Total Hours
213+ < Tooltip content = "Number of unique team members who have used workspaces in the last 7 days" >
214+ Active Users
215+ </ Tooltip >
220216 </ th >
221217 < th className = "px-6 py-4 text-right text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider" >
222- Avg Hours
218+ < Tooltip content = "Sum of all workspace lifetime hours for this team" >
219+ Total Hours
220+ </ Tooltip >
223221 </ th >
224222 < th className = "px-6 py-4 text-right text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider" >
225- Active Days
223+ < Tooltip content = "Number of days with activity in the last 7 days for this team" position = "right" >
224+ Active Days
225+ </ Tooltip >
226226 </ th >
227227 </ tr >
228228 </ thead >
@@ -240,11 +240,13 @@ export default function TemplateTeamsContent({ user, templateName }: TemplateTea
240240 < td className = "px-6 py-4 text-right text-sm text-slate-700 dark:text-slate-300" >
241241 { team . workspaces_for_template }
242242 </ td >
243- < td className = "px-6 py-4 text-right text-sm text-slate-700 dark:text-slate-300" >
244- { team . total_workspace_hours . toLocaleString ( ) } h
243+ < td className = "px-6 py-4 text-right text-sm" >
244+ < span className = "inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-vector-violet/10 text-vector-violet border border-vector-violet/30" >
245+ { team . unique_active_users }
246+ </ span >
245247 </ td >
246248 < td className = "px-6 py-4 text-right text-sm text-slate-700 dark:text-slate-300" >
247- { team . avg_workspace_hours . toLocaleString ( ) } h
249+ { team . total_workspace_hours . toLocaleString ( ) } h
248250 </ td >
249251 < td className = "px-6 py-4 text-right text-sm text-vector-turquoise" >
250252 { team . active_days }
0 commit comments