🚀 Route Elite Dashboard and Trojan Horse pages
This commit is contained in:
@@ -9,6 +9,9 @@ import { InvoicesPage } from './pages/invoices/InvoicesPage';
|
|||||||
import { CompaniesPage } from './pages/companies/CompaniesPage';
|
import { CompaniesPage } from './pages/companies/CompaniesPage';
|
||||||
import { StaffPage } from './pages/staff/StaffPage';
|
import { StaffPage } from './pages/staff/StaffPage';
|
||||||
import { SettingsPage } from './pages/settings/SettingsPage';
|
import { SettingsPage } from './pages/settings/SettingsPage';
|
||||||
|
import { MultiEntityDashboard } from './pages/Dashboard/MultiEntityDashboard';
|
||||||
|
import { TrojanHorseConverter } from './pages/Public/TrojanHorseConverter';
|
||||||
|
|
||||||
|
|
||||||
// ── Protected Route Guard ─────────────────────────────────
|
// ── Protected Route Guard ─────────────────────────────────
|
||||||
const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
|
const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
|
||||||
@@ -23,11 +26,13 @@ export default function App() {
|
|||||||
{/* Public Routes */}
|
{/* Public Routes */}
|
||||||
<Route path="/login" element={<LoginPage />} />
|
<Route path="/login" element={<LoginPage />} />
|
||||||
<Route path="/register" element={<RegisterPage />} />
|
<Route path="/register" element={<RegisterPage />} />
|
||||||
|
<Route path="/free-converter" element={<TrojanHorseConverter />} />
|
||||||
|
|
||||||
{/* Protected Dashboard Routes */}
|
{/* Protected Dashboard Routes */}
|
||||||
<Route path="/" element={<ProtectedRoute><MainLayout /></ProtectedRoute>}>
|
<Route path="/" element={<ProtectedRoute><MainLayout /></ProtectedRoute>}>
|
||||||
<Route index element={<Navigate to="/dashboard" replace />} />
|
<Route index element={<Navigate to="/dashboard" replace />} />
|
||||||
<Route path="dashboard" element={<DashboardPage />} />
|
<Route path="dashboard" element={<DashboardPage />} />
|
||||||
|
<Route path="elite-dashboard" element={<MultiEntityDashboard />} />
|
||||||
<Route path="invoices" element={<InvoicesPage />} />
|
<Route path="invoices" element={<InvoicesPage />} />
|
||||||
<Route path="companies" element={<CompaniesPage />} />
|
<Route path="companies" element={<CompaniesPage />} />
|
||||||
<Route path="staff" element={<StaffPage />} />
|
<Route path="staff" element={<StaffPage />} />
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ import {
|
|||||||
Building2,
|
Building2,
|
||||||
Users,
|
Users,
|
||||||
Settings,
|
Settings,
|
||||||
LogOut
|
LogOut,
|
||||||
|
Crown
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { useAuthStore } from '../../store/authStore';
|
import { useAuthStore } from '../../store/authStore';
|
||||||
|
|
||||||
const menuItems = [
|
const menuItems = [
|
||||||
{ icon: LayoutDashboard, label: 'الرئيسية', path: '/dashboard' },
|
{ icon: LayoutDashboard, label: 'الرئيسية', path: '/dashboard' },
|
||||||
|
{ icon: Crown, label: 'لوحة النخبة', path: '/elite-dashboard' },
|
||||||
{ icon: FileText, label: 'الفواتير', path: '/invoices' },
|
{ icon: FileText, label: 'الفواتير', path: '/invoices' },
|
||||||
{ icon: Building2, label: 'الشركات', path: '/companies' },
|
{ icon: Building2, label: 'الشركات', path: '/companies' },
|
||||||
{ icon: Users, label: 'الموظفون', path: '/staff' },
|
{ icon: Users, label: 'الموظفون', path: '/staff' },
|
||||||
|
|||||||
@@ -124,6 +124,16 @@ export default function LoginPage() {
|
|||||||
أنشئ حساباً جديداً
|
أنشئ حساباً جديداً
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Trojan Horse Marketing Link */}
|
||||||
|
<div className="mt-6 pt-6 border-t border-slate-100 text-center">
|
||||||
|
<Link
|
||||||
|
to="/free-converter"
|
||||||
|
className="inline-flex items-center justify-center gap-2 px-6 py-3 bg-emerald-50 text-emerald-600 rounded-xl font-bold hover:bg-emerald-100 transition-colors w-full border border-emerald-200 shadow-sm"
|
||||||
|
>
|
||||||
|
🚀 جرب أداة تحويل فواتير PDF إلى XML مجاناً
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user