373 lines
9.7 KiB
TypeScript
373 lines
9.7 KiB
TypeScript
import type { OrgModuleKey } from '@mento/shared';
|
|
|
|
export type NavHubKey =
|
|
| 'customers'
|
|
| 'sales'
|
|
| 'activities'
|
|
| 'support'
|
|
| 'automations'
|
|
| 'tools'
|
|
| 'settings';
|
|
|
|
export type NavIconName =
|
|
| 'users'
|
|
| 'user'
|
|
| 'building'
|
|
| 'briefcase'
|
|
| 'filter'
|
|
| 'document'
|
|
| 'box'
|
|
| 'mail'
|
|
| 'send'
|
|
| 'sparkle'
|
|
| 'dollar'
|
|
| 'target'
|
|
| 'check'
|
|
| 'calendar'
|
|
| 'chat'
|
|
| 'apps-plus'
|
|
| 'layers'
|
|
| 'flag'
|
|
| 'settings'
|
|
| 'pencil'
|
|
| 'chart'
|
|
| 'lightbulb'
|
|
| 'plus'
|
|
| 'user-plus'
|
|
| 'mail';
|
|
|
|
export type NavHubTint = 'mint' | 'violet' | 'peach' | 'sky' | 'rose' | 'amber';
|
|
|
|
export type NavHubCard = {
|
|
to: string;
|
|
title: string;
|
|
desc: string;
|
|
icon: NavIconName;
|
|
tint: NavHubTint;
|
|
admin?: boolean;
|
|
module?: OrgModuleKey;
|
|
};
|
|
|
|
export type NavHubShortcut = {
|
|
to: string;
|
|
title: string;
|
|
icon: NavIconName;
|
|
admin?: boolean;
|
|
module?: OrgModuleKey;
|
|
};
|
|
|
|
export type NavHubDef = {
|
|
key: NavHubKey;
|
|
title: string;
|
|
desc: string;
|
|
icon: NavIconName;
|
|
tint: NavHubTint;
|
|
cards: NavHubCard[];
|
|
shortcuts: NavHubShortcut[];
|
|
};
|
|
|
|
export const NAV_HUBS: NavHubDef[] = [
|
|
{
|
|
key: 'customers',
|
|
title: 'مشتریان',
|
|
desc: 'اشخاص، شرکتها و پروندههای ارتباطی',
|
|
icon: 'users',
|
|
tint: 'mint',
|
|
shortcuts: [
|
|
{ to: '/contacts/people/new', title: 'شخص جدید', icon: 'user-plus', module: 'customers' },
|
|
{ to: '/contacts/companies/new', title: 'شرکت جدید', icon: 'building', module: 'customers' },
|
|
],
|
|
cards: [
|
|
{
|
|
to: '/contacts',
|
|
title: 'اشخاص',
|
|
desc: 'مخاطبان حقیقی و پروندههای مشتری',
|
|
icon: 'user',
|
|
tint: 'mint',
|
|
module: 'customers',
|
|
},
|
|
{
|
|
to: '/contacts?tab=companies',
|
|
title: 'شرکتها',
|
|
desc: 'سازمانها و مشتریان حقوقی',
|
|
icon: 'building',
|
|
tint: 'violet',
|
|
module: 'customers',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'sales',
|
|
title: 'فروش',
|
|
desc: 'مدیریت چرخه فروش و درآمد',
|
|
icon: 'briefcase',
|
|
tint: 'mint',
|
|
shortcuts: [
|
|
{ to: '/deals/new', title: 'معامله جدید', icon: 'plus', module: 'pipeline' },
|
|
{ to: '/quotes/new', title: 'پیشفاکتور جدید', icon: 'document', module: 'quotes' },
|
|
],
|
|
cards: [
|
|
{
|
|
to: '/pipeline',
|
|
title: 'کاریز فروش',
|
|
desc: 'سرنخها، معاملات و مراحل فروش',
|
|
icon: 'filter',
|
|
tint: 'mint',
|
|
module: 'pipeline',
|
|
},
|
|
{
|
|
to: '/settings/products',
|
|
title: 'محصولات و خدمات',
|
|
desc: 'مدیریت محصولات، قیمتها و موجودی',
|
|
icon: 'box',
|
|
tint: 'peach',
|
|
admin: true,
|
|
module: 'products',
|
|
},
|
|
{
|
|
to: '/invoices',
|
|
title: 'فاکتورها',
|
|
desc: 'صدور فاکتور و پیگیری پرداختها',
|
|
icon: 'mail',
|
|
tint: 'sky',
|
|
module: 'invoices',
|
|
},
|
|
{
|
|
to: '/quotes',
|
|
title: 'پیشفاکتورها',
|
|
desc: 'پیشنهاد قیمت و پیگیری تایید',
|
|
icon: 'document',
|
|
tint: 'amber',
|
|
module: 'quotes',
|
|
},
|
|
{
|
|
to: '/commissions',
|
|
title: 'پورسانت',
|
|
desc: 'سهم فروشندگان از فاکتورهای صادرشده',
|
|
icon: 'dollar',
|
|
tint: 'rose',
|
|
module: 'commissions',
|
|
},
|
|
{
|
|
to: '/sales/forecast',
|
|
title: 'هدف و پیشبینی',
|
|
desc: 'تعیین اهداف و تحلیل عملکرد فروش',
|
|
icon: 'target',
|
|
tint: 'mint',
|
|
module: 'sales_forecast',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'activities',
|
|
title: 'فعالیتها',
|
|
desc: 'کارها، تماسها و برنامهریزی روزانه',
|
|
icon: 'check',
|
|
tint: 'sky',
|
|
shortcuts: [
|
|
{ to: '/activities/new', title: 'فعالیت جدید', icon: 'plus', module: 'activities' },
|
|
{ to: '/activities/calendar', title: 'تقویم', icon: 'calendar', module: 'activities' },
|
|
],
|
|
cards: [
|
|
{
|
|
to: '/activities',
|
|
title: 'فعالیتهای من',
|
|
desc: 'کارها، تماسها و پیگیریهای جاری',
|
|
icon: 'check',
|
|
tint: 'mint',
|
|
module: 'activities',
|
|
},
|
|
{
|
|
to: '/activities/calendar',
|
|
title: 'تقویم فعالیتها',
|
|
desc: 'نمای روز، هفته و زمانبندی کارها',
|
|
icon: 'calendar',
|
|
tint: 'violet',
|
|
module: 'activities',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'support',
|
|
title: 'پشتیبانی',
|
|
desc: 'درخواستها و گفتگو با مشتری',
|
|
icon: 'chat',
|
|
tint: 'peach',
|
|
shortcuts: [
|
|
{ to: '/tickets/new', title: 'تیکت جدید', icon: 'plus', module: 'tickets' },
|
|
{ to: '/tickets', title: 'تیکتها', icon: 'chat', module: 'tickets' },
|
|
],
|
|
cards: [
|
|
{
|
|
to: '/tickets',
|
|
title: 'تیکتها',
|
|
desc: 'درخواستها و پیامهای پشتیبانی',
|
|
icon: 'chat',
|
|
tint: 'peach',
|
|
module: 'tickets',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'automations',
|
|
title: 'اتوماسیون',
|
|
desc: 'قوانین خودکار برای گردش کار و پیامک',
|
|
icon: 'sparkle',
|
|
tint: 'violet',
|
|
shortcuts: [
|
|
{
|
|
to: '/settings/automations',
|
|
title: 'قانون گردش کار',
|
|
icon: 'layers',
|
|
module: 'workflow_automations',
|
|
},
|
|
{
|
|
to: '/settings/message-automations',
|
|
title: 'قانون پیامک',
|
|
icon: 'send',
|
|
module: 'message_automations',
|
|
},
|
|
],
|
|
cards: [
|
|
{
|
|
to: '/settings/automations',
|
|
title: 'اتوماسیون گردش کار',
|
|
desc: 'اگر این شد، آن کارها را پشتسرهم انجام بده',
|
|
icon: 'layers',
|
|
tint: 'violet',
|
|
admin: true,
|
|
module: 'workflow_automations',
|
|
},
|
|
{
|
|
to: '/settings/message-automations',
|
|
title: 'اتوماسیون پیامکها',
|
|
desc: 'پیامک و ناتیف با تأخیر و تکرار',
|
|
icon: 'send',
|
|
tint: 'sky',
|
|
admin: true,
|
|
module: 'message_automations',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'tools',
|
|
title: 'ابزارها',
|
|
desc: 'فرمها، پروژه، انبار و اسناد مالی',
|
|
icon: 'apps-plus',
|
|
tint: 'violet',
|
|
shortcuts: [
|
|
{ to: '/project-cards/new', title: 'کارت پروژه جدید', icon: 'plus', module: 'project_boards' },
|
|
{ to: '/cheques', title: 'ثبت چک', icon: 'document', module: 'cheques' },
|
|
],
|
|
cards: [
|
|
{
|
|
to: '/settings/lead-forms',
|
|
title: 'فرمساز سرنخ',
|
|
desc: 'فرم عمومی برای جذب سرنخ تازه',
|
|
icon: 'layers',
|
|
tint: 'mint',
|
|
admin: true,
|
|
module: 'lead_forms',
|
|
},
|
|
{
|
|
to: '/projects',
|
|
title: 'کاریز پروژه',
|
|
desc: 'کارتها و مراحل اجرای کار',
|
|
icon: 'flag',
|
|
tint: 'violet',
|
|
module: 'project_boards',
|
|
},
|
|
{
|
|
to: '/inventory',
|
|
title: 'انبار',
|
|
desc: 'موجودی کالا و گردش داخلی',
|
|
icon: 'box',
|
|
tint: 'peach',
|
|
module: 'inventory',
|
|
},
|
|
{
|
|
to: '/cheques',
|
|
title: 'چکها',
|
|
desc: 'چکهای دریافتی و پرداختی',
|
|
icon: 'document',
|
|
tint: 'sky',
|
|
module: 'cheques',
|
|
},
|
|
{
|
|
to: '/attachments',
|
|
title: 'پیوستها',
|
|
desc: 'فایلهای متصل به یادداشتها',
|
|
icon: 'document',
|
|
tint: 'amber',
|
|
module: 'attachments',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'settings',
|
|
title: 'تنظیمات',
|
|
desc: 'سازمان، تیم و پیکربندی سیستم',
|
|
icon: 'settings',
|
|
tint: 'sky',
|
|
shortcuts: [
|
|
{
|
|
to: '/settings/team#settings-team',
|
|
title: 'تیم و نقشها',
|
|
icon: 'users',
|
|
module: 'team_settings',
|
|
},
|
|
{ to: '/settings/tahesab', title: 'تهحساب', icon: 'chart', module: 'tahesab' },
|
|
],
|
|
cards: [
|
|
{
|
|
to: '/settings/team#settings-org',
|
|
title: 'تنظیمات عمومی',
|
|
desc: 'نام سازمان و تنظیمات پایه',
|
|
icon: 'building',
|
|
tint: 'mint',
|
|
module: 'team_settings',
|
|
},
|
|
{
|
|
to: '/settings/team#settings-team',
|
|
title: 'تیم و نقشها',
|
|
desc: 'اعضا، دسترسی و نقشها',
|
|
icon: 'users',
|
|
tint: 'violet',
|
|
module: 'team_settings',
|
|
},
|
|
{
|
|
to: '/settings/custom-fields',
|
|
title: 'فیلدهای سفارشی',
|
|
desc: 'فیلدهای اضافه روی پروندهها',
|
|
icon: 'pencil',
|
|
tint: 'peach',
|
|
module: 'custom_fields',
|
|
},
|
|
{
|
|
to: '/settings/currencies',
|
|
title: 'ارزها',
|
|
desc: 'ارز پایه و نرخ تبدیل',
|
|
icon: 'dollar',
|
|
tint: 'sky',
|
|
module: 'currencies',
|
|
},
|
|
{
|
|
to: '/settings/tahesab',
|
|
title: 'تهحساب',
|
|
desc: 'اتصال مالی و تنظیمات حسابداری',
|
|
icon: 'chart',
|
|
tint: 'amber',
|
|
module: 'tahesab',
|
|
},
|
|
{
|
|
to: '/settings/faq',
|
|
title: 'FAQ',
|
|
desc: 'پرسشهای پرتکرار سازمان',
|
|
icon: 'lightbulb',
|
|
tint: 'rose',
|
|
module: 'faq',
|
|
},
|
|
],
|
|
},
|
|
];
|