fix issues

This commit is contained in:
2026-01-01 15:17:09 +01:00
parent f001df3744
commit aee182b09e
17 changed files with 241 additions and 442 deletions

View File

@@ -78,6 +78,14 @@ export function AdminDashboardPage() {
return null;
}
// Temporary UI fields (not yet provided by API/ViewModel)
const adminCount = stats.systemAdmins;
const recentActivity: Array<{ description: string; timestamp: string; type: string }> = [];
const systemHealth = 'Healthy';
const totalSessions = 0;
const activeSessions = 0;
const avgSessionDuration = '—';
return (
<div className="container mx-auto p-6 space-y-6">
{/* Header */}
@@ -112,7 +120,7 @@ export function AdminDashboardPage() {
<div className="flex items-center justify-between">
<div>
<div className="text-sm text-gray-400 mb-1">Admins</div>
<div className="text-3xl font-bold text-white">{stats.adminCount}</div>
<div className="text-3xl font-bold text-white">{adminCount}</div>
</div>
<Shield className="w-8 h-8 text-purple-400" />
</div>
@@ -145,8 +153,8 @@ export function AdminDashboardPage() {
<Card>
<h3 className="text-lg font-semibold text-white mb-4">Recent Activity</h3>
<div className="space-y-3">
{stats.recentActivity.length > 0 ? (
stats.recentActivity.map((activity, index) => (
{recentActivity.length > 0 ? (
recentActivity.map((activity, index: number) => (
<div
key={index}
className="flex items-center justify-between p-3 bg-iron-gray/30 rounded-lg border border-charcoal-outline/50"
@@ -178,20 +186,20 @@ export function AdminDashboardPage() {
<div className="flex items-center justify-between">
<span className="text-sm text-gray-400">System Health</span>
<span className="px-2 py-1 text-xs rounded-full bg-performance-green/20 text-performance-green">
{stats.systemHealth}
{systemHealth}
</span>
</div>
<div className="flex items-center justify-between">
<span className="text-sm text-gray-400">Total Sessions</span>
<span className="text-white font-medium">{stats.totalSessions}</span>
<span className="text-white font-medium">{totalSessions}</span>
</div>
<div className="flex items-center justify-between">
<span className="text-sm text-gray-400">Active Sessions</span>
<span className="text-white font-medium">{stats.activeSessions}</span>
<span className="text-white font-medium">{activeSessions}</span>
</div>
<div className="flex items-center justify-between">
<span className="text-sm text-gray-400">Avg Session Duration</span>
<span className="text-white font-medium">{stats.avgSessionDuration}</span>
<span className="text-white font-medium">{avgSessionDuration}</span>
</div>
</div>
</Card>
@@ -214,4 +222,4 @@ export function AdminDashboardPage() {
</Card>
</div>
);
}
}