feat: reorganize admin settings with tabbed interface and documentation
- Reorganized admin settings into tabbed interface (General, Security, Payment Methods) - Vertical tabs on desktop, horizontal scrollable on mobile - Moved Payment Methods from separate menu to Settings tab - Fixed admin profile reuse and dashboard blocking - Fixed maintenance mode guard to use AppConfig model - Added admin auto-redirect after login (admins → /admin, users → /) - Reorganized documentation into docs/ folder structure - Created comprehensive README and documentation index - Added PWA and Web Push notifications to to-do list
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useState, useCallback } from "react"
|
||||
import { Routes, Route, useLocation, useNavigate } from "react-router-dom"
|
||||
import { Routes, Route, useLocation, useNavigate, Navigate } from "react-router-dom"
|
||||
import { useAuth } from "@/contexts/AuthContext"
|
||||
import { DashboardLayout } from "./layout/DashboardLayout"
|
||||
import { Overview } from "./pages/Overview"
|
||||
import { Wallets } from "./pages/Wallets"
|
||||
@@ -7,8 +8,14 @@ import { Transactions } from "./pages/Transactions"
|
||||
import { Profile } from "./pages/Profile"
|
||||
|
||||
export function Dashboard() {
|
||||
const { user } = useAuth()
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
|
||||
// Block admins from accessing member dashboard
|
||||
if (user?.role === 'admin') {
|
||||
return <Navigate to="/admin" replace />
|
||||
}
|
||||
const [fabWalletDialogOpen, setFabWalletDialogOpen] = useState(false)
|
||||
const [fabTransactionDialogOpen, setFabTransactionDialogOpen] = useState(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user