Enhance course management by adding 'featured' and 'sort_order' fields to the database schema and related components. Update course filtering and display logic to prioritize featured courses in the catalog. Modify admin interfaces for course creation and editing to include new fields, ensuring proper handling in both the frontend and backend. Update documentation to reflect these changes.

This commit is contained in:
smhk1376 committed 2026-10-22 13:23:43 +03:30
1 parent 1641edfd01
commit 4b84409ed7
43 files changed
+703 -155

No files matched your search

+4
View File
@@ -47,6 +47,8 @@
|---|---|
| `course.categories` | many-to-many با `course_categories` (موضوع؛ ادمین) |
| `course.tags` | many-to-many با `course_tags` (نوع/منو؛ ادمین) |
| `course.featured` | تیک ویژه؛ چند دورهٔ جاری می‌توانند ویژه باشند (محدودیت تک‌ویژهٔ مقاله اینجا نیست) |
| `course.sortOrder` | عدد ترتیب؛ کوچک‌تر جلوتر (مثل دسته/تگ) |
| `program.group` | `standard` یا `executive` برای selector هوم |
| `event.endDate` | اگر null باشد رویداد تک‌روزه است |
| `article.featured` | حداکثر یک مقاله featured در هوم |
@@ -58,6 +60,8 @@
- هیچ مبلغ/ظرفیت واقعی محاسبه نمی‌شود تا DB وصل شود.
- منوی صفحهٔ اصلی فقط **یک** دراپ‌داون دوره دارد؛ لیبل ریشه = `courseNavParentTag`؛ فرزندان = تگ‌های `show_in_nav`. فیلتر پایدار با **slug**: `/professional?tag=` و `/professional?category=` (مستند: `docs/LINKS.md`).
- دسته و تگ فقط از ادمین تعریف می‌شوند (`/admin/course-categories`، `/admin/course-tags`)؛ هر دوره می‌تواند چند دسته و چند تگ داشته باشد.
- ترتیب لیست عمومی دوره: غیرآرشیو، سپس `featured`، سپس `sort_order` صعودی، سپس عنوان. هوم و جستجو همین ترتیب را می‌گیرند؛ هوم آرشیو را نشان نمی‌دهد.
- تگ `archive` (گزیدهٔ برگزارشده) در کتالوگ بلوک جدا و ظاهر ملایم‌تر است؛ `featured` دورهٔ آرشیو را به بلوک جاری بالا نمی‌آورد.
## Locale / Format Rules
- زبان UI: فارسی؛ `dir="rtl"`؛ اعداد نمایشی می‌توانند فارسی‌سازی شوند در لایهٔ UI.