Configuring access rights in the CRM Super Admin
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { OrgModuleKey } from '@mento/shared';
|
||||
|
||||
export type NavHubKey =
|
||||
| 'customers'
|
||||
| 'sales'
|
||||
@@ -43,6 +45,7 @@ export type NavHubCard = {
|
||||
icon: NavIconName;
|
||||
tint: NavHubTint;
|
||||
admin?: boolean;
|
||||
module?: OrgModuleKey;
|
||||
};
|
||||
|
||||
export type NavHubShortcut = {
|
||||
@@ -50,6 +53,7 @@ export type NavHubShortcut = {
|
||||
title: string;
|
||||
icon: NavIconName;
|
||||
admin?: boolean;
|
||||
module?: OrgModuleKey;
|
||||
};
|
||||
|
||||
export type NavHubDef = {
|
||||
@@ -70,8 +74,8 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'users',
|
||||
tint: 'mint',
|
||||
shortcuts: [
|
||||
{ to: '/contacts/people/new', title: 'شخص جدید', icon: 'user-plus' },
|
||||
{ to: '/contacts/companies/new', title: 'شرکت جدید', icon: 'building' },
|
||||
{ to: '/contacts/people/new', title: 'شخص جدید', icon: 'user-plus', module: 'customers' },
|
||||
{ to: '/contacts/companies/new', title: 'شرکت جدید', icon: 'building', module: 'customers' },
|
||||
],
|
||||
cards: [
|
||||
{
|
||||
@@ -80,6 +84,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'مخاطبان حقیقی و پروندههای مشتری',
|
||||
icon: 'user',
|
||||
tint: 'mint',
|
||||
module: 'customers',
|
||||
},
|
||||
{
|
||||
to: '/contacts?tab=companies',
|
||||
@@ -87,6 +92,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'سازمانها و مشتریان حقوقی',
|
||||
icon: 'building',
|
||||
tint: 'violet',
|
||||
module: 'customers',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -97,8 +103,8 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'briefcase',
|
||||
tint: 'mint',
|
||||
shortcuts: [
|
||||
{ to: '/deals/new', title: 'معامله جدید', icon: 'plus' },
|
||||
{ to: '/quotes/new', title: 'پیشفاکتور جدید', icon: 'document' },
|
||||
{ to: '/deals/new', title: 'معامله جدید', icon: 'plus', module: 'pipeline' },
|
||||
{ to: '/quotes/new', title: 'پیشفاکتور جدید', icon: 'document', module: 'quotes' },
|
||||
],
|
||||
cards: [
|
||||
{
|
||||
@@ -107,6 +113,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'سرنخها، معاملات و مراحل فروش',
|
||||
icon: 'filter',
|
||||
tint: 'mint',
|
||||
module: 'pipeline',
|
||||
},
|
||||
{
|
||||
to: '/settings/products',
|
||||
@@ -115,6 +122,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'box',
|
||||
tint: 'peach',
|
||||
admin: true,
|
||||
module: 'products',
|
||||
},
|
||||
{
|
||||
to: '/invoices',
|
||||
@@ -122,6 +130,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'صدور فاکتور و پیگیری پرداختها',
|
||||
icon: 'mail',
|
||||
tint: 'sky',
|
||||
module: 'invoices',
|
||||
},
|
||||
{
|
||||
to: '/quotes',
|
||||
@@ -129,6 +138,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'پیشنهاد قیمت و پیگیری تایید',
|
||||
icon: 'document',
|
||||
tint: 'amber',
|
||||
module: 'quotes',
|
||||
},
|
||||
{
|
||||
to: '/commissions',
|
||||
@@ -136,6 +146,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'سهم فروشندگان از فاکتورهای صادرشده',
|
||||
icon: 'dollar',
|
||||
tint: 'rose',
|
||||
module: 'commissions',
|
||||
},
|
||||
{
|
||||
to: '/sales/forecast',
|
||||
@@ -143,6 +154,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'تعیین اهداف و تحلیل عملکرد فروش',
|
||||
icon: 'target',
|
||||
tint: 'mint',
|
||||
module: 'sales_forecast',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -153,8 +165,8 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'check',
|
||||
tint: 'sky',
|
||||
shortcuts: [
|
||||
{ to: '/activities/new', title: 'فعالیت جدید', icon: 'plus' },
|
||||
{ to: '/activities/calendar', title: 'تقویم', icon: 'calendar' },
|
||||
{ to: '/activities/new', title: 'فعالیت جدید', icon: 'plus', module: 'activities' },
|
||||
{ to: '/activities/calendar', title: 'تقویم', icon: 'calendar', module: 'activities' },
|
||||
],
|
||||
cards: [
|
||||
{
|
||||
@@ -163,6 +175,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'کارها، تماسها و پیگیریهای جاری',
|
||||
icon: 'check',
|
||||
tint: 'mint',
|
||||
module: 'activities',
|
||||
},
|
||||
{
|
||||
to: '/activities/calendar',
|
||||
@@ -170,6 +183,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'نمای روز، هفته و زمانبندی کارها',
|
||||
icon: 'calendar',
|
||||
tint: 'violet',
|
||||
module: 'activities',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -180,8 +194,8 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'chat',
|
||||
tint: 'peach',
|
||||
shortcuts: [
|
||||
{ to: '/tickets/new', title: 'تیکت جدید', icon: 'plus' },
|
||||
{ to: '/tickets', title: 'تیکتها', icon: 'chat' },
|
||||
{ to: '/tickets/new', title: 'تیکت جدید', icon: 'plus', module: 'tickets' },
|
||||
{ to: '/tickets', title: 'تیکتها', icon: 'chat', module: 'tickets' },
|
||||
],
|
||||
cards: [
|
||||
{
|
||||
@@ -190,6 +204,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'درخواستها و پیامهای پشتیبانی',
|
||||
icon: 'chat',
|
||||
tint: 'peach',
|
||||
module: 'tickets',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -200,8 +215,18 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'sparkle',
|
||||
tint: 'violet',
|
||||
shortcuts: [
|
||||
{ to: '/settings/automations', title: 'قانون گردش کار', icon: 'layers' },
|
||||
{ to: '/settings/message-automations', title: 'قانون پیامک', icon: 'send' },
|
||||
{
|
||||
to: '/settings/automations',
|
||||
title: 'قانون گردش کار',
|
||||
icon: 'layers',
|
||||
module: 'workflow_automations',
|
||||
},
|
||||
{
|
||||
to: '/settings/message-automations',
|
||||
title: 'قانون پیامک',
|
||||
icon: 'send',
|
||||
module: 'message_automations',
|
||||
},
|
||||
],
|
||||
cards: [
|
||||
{
|
||||
@@ -211,6 +236,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'layers',
|
||||
tint: 'violet',
|
||||
admin: true,
|
||||
module: 'workflow_automations',
|
||||
},
|
||||
{
|
||||
to: '/settings/message-automations',
|
||||
@@ -219,6 +245,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'send',
|
||||
tint: 'sky',
|
||||
admin: true,
|
||||
module: 'message_automations',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -229,8 +256,8 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'apps-plus',
|
||||
tint: 'violet',
|
||||
shortcuts: [
|
||||
{ to: '/project-cards/new', title: 'کارت پروژه جدید', icon: 'plus' },
|
||||
{ to: '/cheques', title: 'ثبت چک', icon: 'document' },
|
||||
{ to: '/project-cards/new', title: 'کارت پروژه جدید', icon: 'plus', module: 'project_boards' },
|
||||
{ to: '/cheques', title: 'ثبت چک', icon: 'document', module: 'cheques' },
|
||||
],
|
||||
cards: [
|
||||
{
|
||||
@@ -240,6 +267,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'layers',
|
||||
tint: 'mint',
|
||||
admin: true,
|
||||
module: 'lead_forms',
|
||||
},
|
||||
{
|
||||
to: '/projects',
|
||||
@@ -247,6 +275,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'کارتها و مراحل اجرای کار',
|
||||
icon: 'flag',
|
||||
tint: 'violet',
|
||||
module: 'project_boards',
|
||||
},
|
||||
{
|
||||
to: '/inventory',
|
||||
@@ -254,6 +283,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'موجودی کالا و گردش داخلی',
|
||||
icon: 'box',
|
||||
tint: 'peach',
|
||||
module: 'inventory',
|
||||
},
|
||||
{
|
||||
to: '/cheques',
|
||||
@@ -261,6 +291,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'چکهای دریافتی و پرداختی',
|
||||
icon: 'document',
|
||||
tint: 'sky',
|
||||
module: 'cheques',
|
||||
},
|
||||
{
|
||||
to: '/attachments',
|
||||
@@ -268,6 +299,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'فایلهای متصل به یادداشتها',
|
||||
icon: 'document',
|
||||
tint: 'amber',
|
||||
module: 'attachments',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -278,8 +310,13 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
icon: 'settings',
|
||||
tint: 'sky',
|
||||
shortcuts: [
|
||||
{ to: '/settings/team#settings-team', title: 'تیم و نقشها', icon: 'users' },
|
||||
{ to: '/settings/tahesab', title: 'تهحساب', icon: 'chart' },
|
||||
{
|
||||
to: '/settings/team#settings-team',
|
||||
title: 'تیم و نقشها',
|
||||
icon: 'users',
|
||||
module: 'team_settings',
|
||||
},
|
||||
{ to: '/settings/tahesab', title: 'تهحساب', icon: 'chart', module: 'tahesab' },
|
||||
],
|
||||
cards: [
|
||||
{
|
||||
@@ -288,6 +325,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'نام سازمان و تنظیمات پایه',
|
||||
icon: 'building',
|
||||
tint: 'mint',
|
||||
module: 'team_settings',
|
||||
},
|
||||
{
|
||||
to: '/settings/team#settings-team',
|
||||
@@ -295,6 +333,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'اعضا، دسترسی و نقشها',
|
||||
icon: 'users',
|
||||
tint: 'violet',
|
||||
module: 'team_settings',
|
||||
},
|
||||
{
|
||||
to: '/settings/custom-fields',
|
||||
@@ -302,6 +341,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'فیلدهای اضافه روی پروندهها',
|
||||
icon: 'pencil',
|
||||
tint: 'peach',
|
||||
module: 'custom_fields',
|
||||
},
|
||||
{
|
||||
to: '/settings/currencies',
|
||||
@@ -309,6 +349,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'ارز پایه و نرخ تبدیل',
|
||||
icon: 'dollar',
|
||||
tint: 'sky',
|
||||
module: 'currencies',
|
||||
},
|
||||
{
|
||||
to: '/settings/tahesab',
|
||||
@@ -316,6 +357,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'اتصال مالی و تنظیمات حسابداری',
|
||||
icon: 'chart',
|
||||
tint: 'amber',
|
||||
module: 'tahesab',
|
||||
},
|
||||
{
|
||||
to: '/settings/faq',
|
||||
@@ -323,6 +365,7 @@ export const NAV_HUBS: NavHubDef[] = [
|
||||
desc: 'پرسشهای پرتکرار سازمان',
|
||||
icon: 'lightbulb',
|
||||
tint: 'rose',
|
||||
module: 'faq',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user