189 lines
4.5 KiB
TypeScript
189 lines
4.5 KiB
TypeScript
import {
|
|
CakeSlice,
|
|
ClipboardPen,
|
|
FolderTree,
|
|
MapPin,
|
|
Package,
|
|
Percent,
|
|
PlusCircle,
|
|
Settings,
|
|
Sparkles,
|
|
UserRound,
|
|
Users,
|
|
type LucideIcon,
|
|
} from 'lucide-react'
|
|
|
|
export type NavItem = {
|
|
label: string
|
|
href: string
|
|
}
|
|
|
|
export type NavSection = {
|
|
id: string
|
|
title: string
|
|
titleEn: string
|
|
description: string
|
|
href: string
|
|
icon: LucideIcon
|
|
items: NavItem[]
|
|
}
|
|
|
|
export type ProductTile = {
|
|
id: string
|
|
title: string
|
|
titleEn: string
|
|
description: string
|
|
href: string
|
|
icon: LucideIcon
|
|
}
|
|
|
|
export const productTiles: ProductTile[] = [
|
|
{
|
|
id: 'products-list',
|
|
title: 'محصولات من',
|
|
titleEn: 'My Products',
|
|
description: 'مشاهده و مدیریت همه محصولات فروشگاه',
|
|
href: '/products/list',
|
|
icon: CakeSlice,
|
|
},
|
|
{
|
|
id: 'products-new',
|
|
title: 'ثبت محصول جدید',
|
|
titleEn: 'New Product',
|
|
description: 'افزودن شیرینی یا محصول تازه به فروشگاه',
|
|
href: '/products/new',
|
|
icon: PlusCircle,
|
|
},
|
|
{
|
|
id: 'products-categories',
|
|
title: 'دسته بندی محصولات',
|
|
titleEn: 'Categories',
|
|
description: 'مدیریت دستهبندیهای محصولات',
|
|
href: '/products/categories',
|
|
icon: FolderTree,
|
|
},
|
|
{
|
|
id: 'products-specials',
|
|
title: 'محصولات ویژه',
|
|
titleEn: 'Special Products',
|
|
description: 'مشاهده و مدیریت محصولات ویژه فروشگاه',
|
|
href: '/products/specials',
|
|
icon: Sparkles,
|
|
},
|
|
]
|
|
|
|
export const navSections: NavSection[] = [
|
|
{
|
|
id: 'products',
|
|
title: 'محصولات من',
|
|
titleEn: 'Products',
|
|
description: 'مدیریت شیرینیها و محصولات فروشگاه',
|
|
href: '/products',
|
|
icon: CakeSlice,
|
|
items: productTiles.map((tile) => ({
|
|
label: tile.title,
|
|
href: tile.href,
|
|
})),
|
|
},
|
|
{
|
|
id: 'users',
|
|
title: 'کاربران',
|
|
titleEn: 'Users',
|
|
description: 'مدیریت کاربران، نقشها و دسترسیها',
|
|
href: '/users',
|
|
icon: Users,
|
|
items: [
|
|
{ label: 'همه کاربران', href: '/users' },
|
|
{ label: 'ثبت کاربر جدید', href: '/users' },
|
|
],
|
|
},
|
|
{
|
|
id: 'orders',
|
|
title: 'سفارشات من',
|
|
titleEn: 'Orders',
|
|
description: 'پیگیری و مدیریت سفارشها',
|
|
href: '/orders',
|
|
icon: Package,
|
|
items: [],
|
|
},
|
|
{
|
|
id: 'special-orders',
|
|
title: 'سفارشات ویژه',
|
|
titleEn: 'Special Orders',
|
|
description: 'درخواستهای سفارشی کیک و شیرینی بدون پرداخت',
|
|
href: '/special-orders',
|
|
icon: ClipboardPen,
|
|
items: [],
|
|
},
|
|
{
|
|
id: 'discounts',
|
|
title: 'کدهای تخفیف',
|
|
titleEn: 'Discounts',
|
|
description: 'تعریف و مدیریت کد تخفیف کاربران',
|
|
href: '/discounts',
|
|
icon: Percent,
|
|
items: [],
|
|
},
|
|
{
|
|
id: 'settings',
|
|
title: 'تنظیمات',
|
|
titleEn: 'Settings',
|
|
description: 'تنظیمات فروشگاه و حساب کاربری',
|
|
href: '/settings',
|
|
icon: Settings,
|
|
items: [],
|
|
},
|
|
]
|
|
|
|
/** Header links — settings & discounts stay on home tiles only. */
|
|
export const adminHeaderSections: NavSection[] = navSections.filter(
|
|
(section) =>
|
|
section.id !== 'settings' &&
|
|
section.id !== 'discounts' &&
|
|
section.id !== 'special-orders',
|
|
)
|
|
|
|
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',
|
|
)
|