Commit 9084d1f7 authored by Mahmoud Aglan's avatar Mahmoud Aglan

tutorials

parent d14f0c10
...@@ -299,52 +299,56 @@ class TutorialController extends Controller ...@@ -299,52 +299,56 @@ class TutorialController extends Controller
'scenarios' => ['label' => 'سيناريوهات كاملة', 'icon' => 'play-circle','color' => '#6366F1'], 'scenarios' => ['label' => 'سيناريوهات كاملة', 'icon' => 'play-circle','color' => '#6366F1'],
]; ];
private const MEMBERSHIP_RELATED = ['carnets', 'interviews', 'installments', 'seasonal', 'fines', 'subscriptions', 'documents']; private const SIDEBAR_GROUPS = [
private const SA_RELATED = ['coaches', 'facilities', 'tournaments', 'reservations', 'match-center', 'pool-management', 'playgrounds', 'sa-registration', 'player-affairs']; 'العمليات' => [
'membership' => ['title' => 'شئون العضوية', 'subtitle' => 'التسجيل والرسوم والتحويلات والكارنيهات', 'icon' => 'users', 'color' => '#3B82F6'],
'sports-activity'=> ['title' => 'الأنشطة الرياضية', 'subtitle' => 'المرافق والأكاديميات والمدربين واللاعبين', 'icon' => 'activity', 'color' => '#8B5CF6'],
'reservations' => ['title' => 'الحجوزات', 'subtitle' => 'إنشاء الحجز والتقويم والإلغاء', 'icon' => 'calendar', 'color' => '#3B82F6'],
'tournaments' => ['title' => 'البطولات', 'subtitle' => 'إنشاء بطولات وتسجيل وقرعة ونتائج', 'icon' => 'trophy', 'color' => '#CA8A04'],
'carnets' => ['title' => 'الكارنيهات والدعوات', 'subtitle' => 'الإصدار والطباعة ودخول الضيوف', 'icon' => 'id-card', 'color' => '#0284C7'],
'parents' => ['title' => 'أولياء الأمور', 'subtitle' => 'إدارة حسابات أولياء الأمور والربط باللاعبين', 'icon' => 'users', 'color' => '#7C3AED'],
],
'المالية' => [
'cashier' => ['title' => 'خزنة العضويات', 'subtitle' => 'طابور الدفع والورديات والتسويات', 'icon' => 'credit-card', 'color' => '#059669'],
'treasury' => ['title' => 'الخزنة الفرعية', 'subtitle' => 'التحصيل والورديات والتسوية مع الرئيسية', 'icon' => 'safe', 'color' => '#10B981'],
'payments' => ['title' => 'الخزينة والمدفوعات', 'subtitle' => 'أنواع الدفع والإيصالات وسير الإلغاء', 'icon' => 'wallet', 'color' => '#2563EB'],
'accounting' => ['title' => 'المحاسبة والدفتر العام','subtitle' => 'شجرة الحسابات والقيود والتقارير المالية', 'icon' => 'calculator', 'color' => '#059669'],
],
'سلسلة التوريد' => [
'inventory' => ['title' => 'إدارة المخازن', 'subtitle' => 'الأصناف والمخازن وحركات المخزون', 'icon' => 'warehouse', 'color' => '#0891B2'],
'procurement' => ['title' => 'المشتريات', 'subtitle' => 'طلبات الشراء والموردين والمدفوعات', 'icon' => 'shopping-cart', 'color' => '#D97706'],
'sales' => ['title' => 'المبيعات', 'subtitle' => 'نقاط البيع والباقات والعمولات', 'icon' => 'shopping-bag', 'color' => '#DC2626'],
],
'الشئون الإدارية' => [
'hr' => ['title' => 'الموارد البشرية', 'subtitle' => 'الموظفين والحضور والرواتب', 'icon' => 'briefcase', 'color' => '#7C3AED'],
'medical-board' => ['title' => 'اللجنة الطبية', 'subtitle' => 'الموافقات الطبية والفحوصات', 'icon' => 'heart-pulse', 'color' => '#DC2626'],
],
'التقارير والنظام' => [
'reports' => ['title' => 'التقارير', 'subtitle' => 'أنواع التقارير والفلاتر والتصدير', 'icon' => 'bar-chart-3', 'color' => '#8B5CF6'],
'roles' => ['title' => 'المستخدمون والصلاحيات','subtitle' => 'الأدوار والصلاحيات وحسابات الموظفين', 'icon' => 'shield', 'color' => '#7C3AED'],
'access-matrix' => ['title' => 'مصفوفة الصلاحيات', 'subtitle' => 'عرض ومقارنة صلاحيات الأدوار', 'icon' => 'grid-3x3', 'color' => '#6366F1'],
'rules' => ['title' => 'القواعد والتسعير', 'subtitle' => 'محرك القواعد وسياسات التسعير', 'icon' => 'sliders', 'color' => '#64748B'],
],
];
public function index(Request $request): Response public function index(Request $request): Response
{ {
$modules = [ $groups = [];
// ── العمليات (Operations) ────────────────────────── foreach (self::SIDEBAR_GROUPS as $groupLabel => $items) {
'membership' => [ $groupModules = [];
'title' => 'شئون العضوية', foreach ($items as $key => $meta) {
'subtitle' => 'التسجيل والرسوم والتحويلات والكارنيهات', $count = match ($key) {
'icon' => 'users', 'membership' => count(self::MEMBERSHIP_TUTORIALS),
'color' => '#3B82F6', 'sports-activity' => count(self::SA_TUTORIALS),
'count' => count(self::MEMBERSHIP_TUTORIALS), 'treasury' => count(self::TREASURY_TUTORIALS),
], default => count(TutorialRegistry::getTutorials($key)),
'sports-activity' => [ };
'title' => 'النشاط الرياضي', $groupModules[$key] = array_merge($meta, ['count' => $count]);
'subtitle' => 'المرافق والأكاديميات والبطولات والحجوزات',
'icon' => 'activity',
'color' => '#8B5CF6',
'count' => count(self::SA_TUTORIALS),
],
// ── المالية (Finance) ──────────────────────────────
'treasury' => [
'title' => 'دورة التحصيلات',
'subtitle' => 'الخزنة الفرعية والرئيسية والإيداعات',
'icon' => 'safe',
'color' => '#059669',
'count' => count(self::TREASURY_TUTORIALS),
],
];
$hidden = array_merge(self::MEMBERSHIP_RELATED, self::SA_RELATED);
foreach (TutorialRegistry::getSections() as $key => $section) {
if (in_array($key, $hidden, true)) {
continue;
} }
$modules[$key] = [ $groups[$groupLabel] = $groupModules;
'title' => $section['title'],
'subtitle' => $section['subtitle'],
'icon' => $section['icon'],
'color' => $section['color'],
'count' => count(TutorialRegistry::getTutorials($key)),
];
} }
return $this->view('Tutorials.Views.index', ['modules' => $modules]); return $this->view('Tutorials.Views.index', ['groups' => $groups]);
} }
public function treasury(Request $request): Response public function treasury(Request $request): Response
......
...@@ -230,6 +230,30 @@ final class TutorialRegistry ...@@ -230,6 +230,30 @@ final class TutorialRegistry
'icon' => 'headphones', 'icon' => 'headphones',
'color' => '#0D9488', 'color' => '#0D9488',
], ],
'parents' => [
'title' => 'أولياء الأمور',
'subtitle' => 'إدارة حسابات أولياء الأمور والربط باللاعبين',
'icon' => 'users',
'color' => '#7C3AED',
],
'medical-board' => [
'title' => 'اللجنة الطبية',
'subtitle' => 'الموافقات الطبية والفحوصات والشهادات',
'icon' => 'heart-pulse',
'color' => '#DC2626',
],
'access-matrix' => [
'title' => 'مصفوفة الصلاحيات',
'subtitle' => 'عرض ومقارنة صلاحيات الأدوار',
'icon' => 'grid-3x3',
'color' => '#6366F1',
],
'rules' => [
'title' => 'القواعد والتسعير',
'subtitle' => 'محرك القواعد وسياسات التسعير والخصومات',
'icon' => 'sliders',
'color' => '#64748B',
],
]; ];
} }
...@@ -272,6 +296,10 @@ final class TutorialRegistry ...@@ -272,6 +296,10 @@ final class TutorialRegistry
'audit' => self::auditTutorials(), 'audit' => self::auditTutorials(),
'playgrounds' => self::playgroundsTutorials(), 'playgrounds' => self::playgroundsTutorials(),
'sa-registration' => self::saRegistrationTutorials(), 'sa-registration' => self::saRegistrationTutorials(),
'parents' => self::parentsTutorials(),
'medical-board' => self::medicalBoardTutorials(),
'access-matrix' => self::accessMatrixTutorials(),
'rules' => self::rulesTutorials(),
default => [], default => [],
}; };
} }
...@@ -514,6 +542,10 @@ final class TutorialRegistry ...@@ -514,6 +542,10 @@ final class TutorialRegistry
'playgrounds' => 'sa-mirror.png', 'playgrounds' => 'sa-mirror.png',
'sa-registration' => 'sa-registration.png', 'sa-registration' => 'sa-registration.png',
'news' => 'dashboard.png', 'news' => 'dashboard.png',
'parents' => 'sa-players.png',
'medical-board' => 'sa-players.png',
'access-matrix' => 'roles-list.png',
'rules' => 'pricing-management.png',
]; ];
return $map[$section] ?? null; return $map[$section] ?? null;
} }
...@@ -1586,6 +1618,10 @@ final class TutorialRegistry ...@@ -1586,6 +1618,10 @@ final class TutorialRegistry
'audit' => self::auditCategories(), 'audit' => self::auditCategories(),
'playgrounds' => self::playgroundsCategories(), 'playgrounds' => self::playgroundsCategories(),
'sa-registration' => self::saRegistrationCategories(), 'sa-registration' => self::saRegistrationCategories(),
'parents' => self::parentsCategories(),
'medical-board' => self::medicalBoardCategories(),
'access-matrix' => self::accessMatrixCategories(),
'rules' => self::rulesCategories(),
default => [], default => [],
}; };
} }
...@@ -3653,4 +3689,74 @@ final class TutorialRegistry ...@@ -3653,4 +3689,74 @@ final class TutorialRegistry
'reports' => ['label' => 'التقارير', 'icon' => 'bar-chart-3', 'color' => '#7C3AED'], 'reports' => ['label' => 'التقارير', 'icon' => 'bar-chart-3', 'color' => '#7C3AED'],
]; ];
} }
private static function parentsTutorials(): array
{
return [
'add-parent' => ['title' => 'إضافة ولي أمر', 'subtitle' => 'إنشاء حساب ولي أمر وربطه بلاعب', 'icon' => 'user-plus', 'color' => '#7C3AED', 'category' => 'management', 'order' => 1],
'link-player' => ['title' => 'ربط لاعب بولي أمر', 'subtitle' => 'ربط لاعب مسجل بحساب ولي الأمر', 'icon' => 'link', 'color' => '#3B82F6', 'category' => 'management', 'order' => 2],
'parent-portal' => ['title' => 'بوابة ولي الأمر', 'subtitle' => 'ما يراه ولي الأمر وما يمكنه فعله', 'icon' => 'monitor', 'color' => '#059669', 'category' => 'portal', 'order' => 3],
'payment-history' => ['title' => 'سجل المدفوعات', 'subtitle' => 'عرض مدفوعات أبناء ولي الأمر', 'icon' => 'receipt', 'color' => '#F59E0B', 'category' => 'portal', 'order' => 4],
];
}
private static function parentsCategories(): array
{
return [
'management' => ['label' => 'الإدارة', 'icon' => 'users', 'color' => '#7C3AED'],
'portal' => ['label' => 'البوابة', 'icon' => 'monitor', 'color' => '#059669'],
];
}
private static function medicalBoardTutorials(): array
{
return [
'review-medical-scan' => ['title' => 'مراجعة شهادة طبية', 'subtitle' => 'فحص واعتماد أو رفض شهادة مرفوعة', 'icon' => 'file-check', 'color' => '#059669', 'category' => 'approvals', 'order' => 1],
'approve-player' => ['title' => 'اعتماد لياقة لاعب', 'subtitle' => 'الموافقة الطبية للسماح بالتدريب', 'icon' => 'check-circle', 'color' => '#10B981', 'category' => 'approvals', 'order' => 2],
'reject-with-notes' => ['title' => 'رفض مع ملاحظات', 'subtitle' => 'رفض الشهادة وطلب إعادة الفحص', 'icon' => 'x-circle', 'color' => '#DC2626', 'category' => 'approvals', 'order' => 3],
'medical-history' => ['title' => 'السجل الطبي', 'subtitle' => 'عرض تاريخ الفحوصات والموافقات', 'icon' => 'clipboard-list', 'color' => '#6366F1', 'category' => 'records', 'order' => 4],
];
}
private static function medicalBoardCategories(): array
{
return [
'approvals' => ['label' => 'الموافقات', 'icon' => 'check-circle', 'color' => '#059669'],
'records' => ['label' => 'السجلات', 'icon' => 'clipboard-list', 'color' => '#6366F1'],
];
}
private static function accessMatrixTutorials(): array
{
return [
'view-matrix' => ['title' => 'عرض المصفوفة', 'subtitle' => 'عرض صلاحيات جميع الأدوار في جدول واحد', 'icon' => 'grid-3x3', 'color' => '#6366F1', 'category' => 'view', 'order' => 1],
'compare-roles' => ['title' => 'مقارنة الأدوار', 'subtitle' => 'مقارنة صلاحيات دورين أو أكثر', 'icon' => 'columns', 'color' => '#8B5CF6', 'category' => 'view', 'order' => 2],
'export-matrix' => ['title' => 'تصدير المصفوفة', 'subtitle' => 'تصدير المصفوفة كجدول Excel', 'icon' => 'download', 'color' => '#059669', 'category' => 'view', 'order' => 3],
];
}
private static function accessMatrixCategories(): array
{
return [
'view' => ['label' => 'العرض والمقارنة', 'icon' => 'grid-3x3', 'color' => '#6366F1'],
];
}
private static function rulesTutorials(): array
{
return [
'pricing-rules' => ['title' => 'قواعد التسعير', 'subtitle' => 'إعداد قواعد حساب الأسعار التلقائية', 'icon' => 'calculator', 'color' => '#059669', 'category' => 'pricing', 'order' => 1],
'discount-rules' => ['title' => 'قواعد الخصومات', 'subtitle' => 'تعريف شروط الخصم التلقائي', 'icon' => 'badge-percent', 'color' => '#F59E0B', 'category' => 'pricing', 'order' => 2],
'fee-calculation' => ['title' => 'حساب الرسوم', 'subtitle' => 'كيف يحسب النظام رسوم العضوية والأنشطة', 'icon' => 'banknote', 'color' => '#3B82F6', 'category' => 'rules', 'order' => 3],
'rules-engine' => ['title' => 'محرك القواعد', 'subtitle' => 'إنشاء وتعديل القواعد العامة', 'icon' => 'sliders', 'color' => '#64748B', 'category' => 'rules', 'order' => 4],
];
}
private static function rulesCategories(): array
{
return [
'pricing' => ['label' => 'التسعير والخصومات', 'icon' => 'calculator', 'color' => '#059669'],
'rules' => ['label' => 'القواعد العامة', 'icon' => 'sliders', 'color' => '#64748B'],
];
}
} }
...@@ -2,36 +2,43 @@ ...@@ -2,36 +2,43 @@
<?php $__template->section('title'); ?>الشروحات<?php $__template->endSection(); ?> <?php $__template->section('title'); ?>الشروحات<?php $__template->endSection(); ?>
<?php $__template->section('content'); ?> <?php $__template->section('content'); ?>
<div style="max-width:900px;margin:0 auto;"> <div style="max-width:1000px;margin:0 auto;">
<div style="text-align:center;margin-bottom:40px;"> <div style="text-align:center;margin-bottom:40px;">
<div style="width:80px;height:80px;background:linear-gradient(135deg,#8B5CF6,#6366F1);border-radius:20px;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;"> <div style="width:80px;height:80px;background:linear-gradient(135deg,#8B5CF6,#6366F1);border-radius:20px;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;">
<i data-lucide="graduation-cap" style="width:40px;height:40px;color:#fff;"></i> <i data-lucide="graduation-cap" style="width:40px;height:40px;color:#fff;"></i>
</div> </div>
<h2 style="font-size:28px;font-weight:800;color:#1A1A2E;margin:0 0 8px;">مركز الشروحات</h2> <h2 style="font-size:28px;font-weight:800;color:#1A1A2E;margin:0 0 8px;">مركز الشروحات</h2>
<p style="font-size:15px;color:#6B7280;margin:0;">شروحات تفصيلية خطوة بخطوة لكل أقسام النظام</p> <p style="font-size:15px;color:#6B7280;margin:0;">شروحات تفصيلية خطوة بخطوة لكل أقسام النظام — مرتبة حسب القائمة الجانبية</p>
</div> </div>
<div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));gap:20px;"> <?php foreach ($groups as $groupLabel => $modules): ?>
<?php foreach ($modules as $key => $module): ?> <div style="margin-bottom:36px;">
<a href="/tutorials/<?= e($key) ?>" class="card" style="padding:28px;text-decoration:none;color:inherit;transition:all .2s;border:2px solid transparent;position:relative;overflow:hidden;"> <div style="display:flex;align-items:center;gap:10px;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #F3F4F6;">
<div style="position:absolute;top:0;right:0;width:100px;height:100px;background:<?= e($module['color']) ?>;opacity:0.05;border-radius:0 0 0 100px;"></div> <span style="font-size:13px;font-weight:700;color:#6B7280;text-transform:uppercase;letter-spacing:0.5px;"><?= e($groupLabel) ?></span>
<div style="display:flex;align-items:flex-start;gap:16px;"> </div>
<div style="width:56px;height:56px;background:<?= e($module['color']) ?>15;border-radius:14px;display:flex;align-items:center;justify-content:center;flex-shrink:0;"> <div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));gap:16px;">
<i data-lucide="<?= e($module['icon']) ?>" style="width:28px;height:28px;color:<?= e($module['color']) ?>;"></i> <?php foreach ($modules as $key => $module): ?>
</div> <a href="/tutorials/<?= e($key) ?>" class="card" style="padding:24px;text-decoration:none;color:inherit;transition:all .2s;border:2px solid transparent;position:relative;overflow:hidden;">
<div style="flex:1;"> <div style="position:absolute;top:0;right:0;width:80px;height:80px;background:<?= e($module['color']) ?>;opacity:0.05;border-radius:0 0 0 80px;"></div>
<h3 style="font-size:18px;font-weight:700;color:#1A1A2E;margin:0 0 4px;"><?= e($module['title']) ?></h3> <div style="display:flex;align-items:flex-start;gap:14px;">
<p style="font-size:13px;color:#6B7280;margin:0 0 12px;"><?= e($module['subtitle']) ?></p> <div style="width:48px;height:48px;background:<?= e($module['color']) ?>15;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;">
<span style="display:inline-flex;align-items:center;gap:4px;background:<?= e($module['color']) ?>15;color:<?= e($module['color']) ?>;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:600;"> <i data-lucide="<?= e($module['icon']) ?>" style="width:24px;height:24px;color:<?= e($module['color']) ?>;"></i>
<i data-lucide="book-open" style="width:12px;height:12px;"></i> </div>
<?= (int) $module['count'] ?> شرح <div style="flex:1;">
</span> <h3 style="font-size:16px;font-weight:700;color:#1A1A2E;margin:0 0 4px;"><?= e($module['title']) ?></h3>
<p style="font-size:12px;color:#6B7280;margin:0 0 10px;"><?= e($module['subtitle']) ?></p>
<span style="display:inline-flex;align-items:center;gap:4px;background:<?= e($module['color']) ?>15;color:<?= e($module['color']) ?>;padding:3px 8px;border-radius:16px;font-size:11px;font-weight:600;">
<i data-lucide="book-open" style="width:11px;height:11px;"></i>
<?= (int) $module['count'] ?> شرح
</span>
</div>
</div> </div>
</div> </a>
</a> <?php endforeach; ?>
<?php endforeach; ?> </div>
</div> </div>
<?php endforeach; ?>
</div> </div>
......
This diff is collapsed.
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