feat: Add refresh button and admin restrictions

This commit is contained in:
gpt-engineer-app[bot]
2025-09-28 19:08:01 +00:00
parent c7825fbe03
commit 661bf77d95
2 changed files with 25 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import { Shield, ArrowLeft, Settings } from 'lucide-react';
import { Shield, ArrowLeft, Settings, RefreshCw } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Link } from 'react-router-dom';
import { ThemeToggle } from '@/components/theme/ThemeToggle';
@@ -30,6 +30,15 @@ export function AdminHeader() {
{/* Right Section - Admin actions */}
<div className="flex items-center gap-2">
<Button
variant="ghost"
size="sm"
onClick={() => window.location.reload()}
title="Refresh admin data"
>
<RefreshCw className="w-4 h-4" />
<span className="hidden sm:ml-2 sm:inline">Refresh</span>
</Button>
{permissions?.role_level === 'superuser' && (
<Button variant="ghost" size="sm" asChild>
<Link to="/admin/settings">