Commit 6e7ed452 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Reorganize tutorial sidebar: group sub-topics under parent sections

Removed 12 standalone sidebar entries that belong under Membership or
Sports Activity. They remain accessible via "related sections" links
on the parent section pages and via direct URL.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent d87bae91
......@@ -283,23 +283,26 @@ class TutorialController extends Controller
'scenarios' => ['label' => 'سيناريوهات كاملة', 'icon' => 'play-circle','color' => '#6366F1'],
];
private const MEMBERSHIP_RELATED = ['carnets', 'interviews', 'installments', 'seasonal', 'fines', 'subscriptions'];
private const SA_RELATED = ['coaches', 'facilities', 'tournaments', 'reservations', 'match-center', 'pool-management'];
public function index(Request $request): Response
{
$modules = [
'sports-activity' => [
'title' => 'النشاط الرياضي',
'subtitle' => 'إدارة المرافق والأنشطة والأكاديميات',
'icon' => 'activity',
'color' => '#8B5CF6',
'count' => count(self::SA_TUTORIALS),
],
'membership' => [
'title' => 'شئون العضوية',
'subtitle' => 'التسجيل والرسوم والتحويلات',
'subtitle' => 'التسجيل والرسوم والتحويلات والكارنيهات',
'icon' => 'users',
'color' => '#3B82F6',
'count' => count(self::MEMBERSHIP_TUTORIALS),
],
'sports-activity' => [
'title' => 'النشاط الرياضي',
'subtitle' => 'المرافق والأكاديميات والبطولات والحجوزات',
'icon' => 'activity',
'color' => '#8B5CF6',
'count' => count(self::SA_TUTORIALS),
],
'treasury' => [
'title' => 'دورة التحصيلات',
'subtitle' => 'الخزنة الفرعية والرئيسية والإيداعات',
......@@ -309,7 +312,11 @@ class TutorialController extends Controller
],
];
$hidden = array_merge(self::MEMBERSHIP_RELATED, self::SA_RELATED);
foreach (TutorialRegistry::getSections() as $key => $section) {
if (in_array($key, $hidden, true)) {
continue;
}
$modules[$key] = [
'title' => $section['title'],
'subtitle' => $section['subtitle'],
......
......@@ -67,6 +67,37 @@
</div>
<?php endforeach; ?>
<!-- Related Sections -->
<div style="margin-top:40px;padding-top:24px;border-top:2px solid #F3F4F6;">
<h3 style="font-size:16px;font-weight:700;color:#6B7280;margin:0 0 14px;">شروحات ذات صلة</h3>
<div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));gap:10px;">
<a href="/tutorials/carnets" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#0284C715;"><i data-lucide="id-card" style="width:16px;height:16px;color:#0284C7;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">الكارنيهات</span>
</a>
<a href="/tutorials/interviews" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#0EA5E915;"><i data-lucide="message-square" style="width:16px;height:16px;color:#0EA5E9;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">المقابلات</span>
</a>
<a href="/tutorials/installments" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#06B6D415;"><i data-lucide="calendar-range" style="width:16px;height:16px;color:#06B6D4;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">التقسيط</span>
</a>
<a href="/tutorials/seasonal" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#F59E0B15;"><i data-lucide="sun" style="width:16px;height:16px;color:#F59E0B;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">العضوية الموسمية</span>
</a>
<a href="/tutorials/fines" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#DC262615;"><i data-lucide="alert-triangle" style="width:16px;height:16px;color:#DC2626;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">المخالفات</span>
</a>
<a href="/tutorials/subscriptions" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#05966915;"><i data-lucide="calendar-check" style="width:16px;height:16px;color:#059669;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">الاشتراكات</span>
</a>
</div>
</div>
</div>
<script>document.addEventListener('DOMContentLoaded', function() { if (typeof lucide !== 'undefined') lucide.createIcons(); });</script>
......
......@@ -67,6 +67,37 @@
</div>
<?php endforeach; ?>
<!-- Related Sections -->
<div style="margin-top:40px;padding-top:24px;border-top:2px solid #F3F4F6;">
<h3 style="font-size:16px;font-weight:700;color:#6B7280;margin:0 0 14px;">شروحات ذات صلة</h3>
<div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));gap:10px;">
<a href="/tutorials/coaches" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#16A34A15;"><i data-lucide="user-check" style="width:16px;height:16px;color:#16A34A;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">المدربين</span>
</a>
<a href="/tutorials/facilities" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#4F46E515;"><i data-lucide="building" style="width:16px;height:16px;color:#4F46E5;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">المرافق</span>
</a>
<a href="/tutorials/tournaments" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#CA8A0415;"><i data-lucide="trophy" style="width:16px;height:16px;color:#CA8A04;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">البطولات</span>
</a>
<a href="/tutorials/reservations" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#3B82F615;"><i data-lucide="calendar" style="width:16px;height:16px;color:#3B82F6;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">الحجوزات</span>
</a>
<a href="/tutorials/match-center" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#DC262615;"><i data-lucide="tv" style="width:16px;height:16px;color:#DC2626;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">مركز المباريات</span>
</a>
<a href="/tutorials/pool-management" style="display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid #E5E7EB;text-decoration:none;color:inherit;transition:all .15s ease;">
<div style="width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#0EA5E915;"><i data-lucide="waves" style="width:16px;height:16px;color:#0EA5E9;"></i></div>
<span style="font-size:13px;font-weight:600;color:#1A1A2E;">إدارة حمامات السباحة</span>
</a>
</div>
</div>
</div>
<script>document.addEventListener('DOMContentLoaded', function() { if (typeof lucide !== 'undefined') lucide.createIcons(); });</script>
......
......@@ -23,27 +23,15 @@ MenuRegistry::register('tutorials', [
['label_ar' => 'الخزينة الرئيسية', 'label_en' => 'Cashier', 'route' => '/tutorials/cashier', 'permission' => 'tutorials.view', 'order' => 8],
['label_ar' => 'المبيعات', 'label_en' => 'Sales', 'route' => '/tutorials/sales', 'permission' => 'tutorials.view', 'order' => 9],
['label_ar' => 'المدفوعات', 'label_en' => 'Payments', 'route' => '/tutorials/payments', 'permission' => 'tutorials.view', 'order' => 10],
['label_ar' => 'المدربين', 'label_en' => 'Coaches', 'route' => '/tutorials/coaches', 'permission' => 'tutorials.view', 'order' => 11],
['label_ar' => 'الكارنيهات', 'label_en' => 'Carnets', 'route' => '/tutorials/carnets', 'permission' => 'tutorials.view', 'order' => 12],
['label_ar' => 'المرافق', 'label_en' => 'Facilities', 'route' => '/tutorials/facilities', 'permission' => 'tutorials.view', 'order' => 13],
['label_ar' => 'البطولات', 'label_en' => 'Tournaments', 'route' => '/tutorials/tournaments', 'permission' => 'tutorials.view', 'order' => 14],
['label_ar' => 'الإيجارات', 'label_en' => 'Rentals', 'route' => '/tutorials/rentals', 'permission' => 'tutorials.view', 'order' => 15],
['label_ar' => 'الدعم الفني', 'label_en' => 'Support', 'route' => '/tutorials/support', 'permission' => 'tutorials.view', 'order' => 16],
['label_ar' => 'الإعدادات', 'label_en' => 'Settings', 'route' => '/tutorials/settings', 'permission' => 'tutorials.view', 'order' => 17],
['label_ar' => 'المخالفات', 'label_en' => 'Fines', 'route' => '/tutorials/fines', 'permission' => 'tutorials.view', 'order' => 18],
['label_ar' => 'الأدوار والصلاحيات', 'label_en' => 'Roles', 'route' => '/tutorials/roles', 'permission' => 'tutorials.view', 'order' => 19],
['label_ar' => 'المقابلات', 'label_en' => 'Interviews', 'route' => '/tutorials/interviews', 'permission' => 'tutorials.view', 'order' => 20],
['label_ar' => 'التقسيط', 'label_en' => 'Installments', 'route' => '/tutorials/installments', 'permission' => 'tutorials.view', 'order' => 21],
['label_ar' => 'التقارير', 'label_en' => 'Reports', 'route' => '/tutorials/reports', 'permission' => 'tutorials.view', 'order' => 22],
['label_ar' => 'العضوية الموسمية', 'label_en' => 'Seasonal', 'route' => '/tutorials/seasonal', 'permission' => 'tutorials.view', 'order' => 23],
['label_ar' => 'المستندات', 'label_en' => 'Documents', 'route' => '/tutorials/documents', 'permission' => 'tutorials.view', 'order' => 24],
['label_ar' => 'الفروع', 'label_en' => 'Branches', 'route' => '/tutorials/branches', 'permission' => 'tutorials.view', 'order' => 25],
['label_ar' => 'الأخبار', 'label_en' => 'News', 'route' => '/tutorials/news', 'permission' => 'tutorials.view', 'order' => 26],
['label_ar' => 'سير العمل', 'label_en' => 'Workflow', 'route' => '/tutorials/workflow', 'permission' => 'tutorials.view', 'order' => 27],
['label_ar' => 'الاشتراكات', 'label_en' => 'Subscriptions', 'route' => '/tutorials/subscriptions', 'permission' => 'tutorials.view', 'order' => 28],
['label_ar' => 'الحجوزات', 'label_en' => 'Reservations', 'route' => '/tutorials/reservations', 'permission' => 'tutorials.view', 'order' => 29],
['label_ar' => 'مركز المباريات', 'label_en' => 'Match Center', 'route' => '/tutorials/match-center', 'permission' => 'tutorials.view', 'order' => 30],
['label_ar' => 'إدارة حمامات السباحة', 'label_en' => 'Pool Management', 'route' => '/tutorials/pool-management', 'permission' => 'tutorials.view', 'order' => 31],
['label_ar' => 'الإيجارات', 'label_en' => 'Rentals', 'route' => '/tutorials/rentals', 'permission' => 'tutorials.view', 'order' => 11],
['label_ar' => 'الدعم الفني', 'label_en' => 'Support', 'route' => '/tutorials/support', 'permission' => 'tutorials.view', 'order' => 12],
['label_ar' => 'الإعدادات', 'label_en' => 'Settings', 'route' => '/tutorials/settings', 'permission' => 'tutorials.view', 'order' => 13],
['label_ar' => 'الأدوار والصلاحيات', 'label_en' => 'Roles', 'route' => '/tutorials/roles', 'permission' => 'tutorials.view', 'order' => 14],
['label_ar' => 'التقارير', 'label_en' => 'Reports', 'route' => '/tutorials/reports', 'permission' => 'tutorials.view', 'order' => 15],
['label_ar' => 'المستندات', 'label_en' => 'Documents', 'route' => '/tutorials/documents', 'permission' => 'tutorials.view', 'order' => 16],
['label_ar' => 'الفروع', 'label_en' => 'Branches', 'route' => '/tutorials/branches', 'permission' => 'tutorials.view', 'order' => 17],
['label_ar' => 'الأخبار', 'label_en' => 'News', 'route' => '/tutorials/news', 'permission' => 'tutorials.view', 'order' => 18],
['label_ar' => 'سير العمل', 'label_en' => 'Workflow', 'route' => '/tutorials/workflow', 'permission' => 'tutorials.view', 'order' => 19],
],
]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment