Fix: wildcard permissions (GM modules visible), Admin link and module card
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -83,6 +83,16 @@ function DashboardContent() {
|
||||
href: '/marketing',
|
||||
description: 'الحملات التسويقية والعملاء المحتملين',
|
||||
permission: 'marketing'
|
||||
},
|
||||
{
|
||||
id: 'admin',
|
||||
name: 'لوحة الإدارة',
|
||||
nameEn: 'Admin Panel',
|
||||
icon: Shield,
|
||||
color: 'bg-red-500',
|
||||
href: '/admin',
|
||||
description: 'إدارة المستخدمين والأدوار وسجل العمليات',
|
||||
permission: 'admin'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -118,7 +128,7 @@ function DashboardContent() {
|
||||
</div>
|
||||
|
||||
{/* Admin Panel Link - Only for admins */}
|
||||
{user?.role?.name === 'المدير العام' && (
|
||||
{(hasPermission('admin', 'view') || user?.role?.name === 'المدير العام' || user?.role?.nameEn === 'General Manager') && (
|
||||
<Link
|
||||
href="/admin"
|
||||
className="p-2 hover:bg-red-50 rounded-lg transition-colors relative group"
|
||||
|
||||
Reference in New Issue
Block a user