Wire dashboards to the API and add customer portal plus discounts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-05 15:15:16 +03:30
co-authored by Cursor
parent af11d96fd0
commit b103e330ef
73 changed files with 8720 additions and 1605 deletions
+61
View File
@@ -1,9 +1,12 @@
import {
CakeSlice,
FolderTree,
MapPin,
Package,
Percent,
PlusCircle,
Settings,
UserRound,
Users,
type LucideIcon,
} from 'lucide-react'
@@ -93,6 +96,15 @@ export const navSections: NavSection[] = [
icon: Package,
items: [],
},
{
id: 'discounts',
title: 'کدهای تخفیف',
titleEn: 'Discounts',
description: 'تعریف و مدیریت کد تخفیف کاربران',
href: '/discounts',
icon: Percent,
items: [],
},
{
id: 'settings',
title: 'تنظیمات',
@@ -103,3 +115,52 @@ export const navSections: NavSection[] = [
items: [],
},
]
/** Header links — settings & discounts stay on home tiles only. */
export const adminHeaderSections: NavSection[] = navSections.filter(
(section) => section.id !== 'settings' && section.id !== 'discounts',
)
export const customerNavSections: NavSection[] = [
{
id: 'profile',
title: 'پروفایل من',
titleEn: 'Profile',
description: 'مشاهده و ویرایش اطلاعات حساب کاربری',
href: '/profile',
icon: UserRound,
items: [],
},
{
id: 'orders',
title: 'سفارش‌های من',
titleEn: 'My Orders',
description: 'پیگیری سفارش‌های ثبت‌شده',
href: '/orders',
icon: Package,
items: [],
},
{
id: 'discounts',
title: 'تخفیف‌های من',
titleEn: 'Discounts',
description: 'کدها و پیشنهادهای تخفیف شما',
href: '/discounts',
icon: Percent,
items: [],
},
{
id: 'addresses',
title: 'آدرس‌های من',
titleEn: 'Addresses',
description: 'مدیریت آدرس‌های ارسال',
href: '/addresses',
icon: MapPin,
items: [],
},
]
/** Header links only — profile lives under the name menu. */
export const customerHeaderSections: NavSection[] = customerNavSections.filter(
(section) => section.id !== 'profile',
)