mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-01 03:27:52 +00:00 
			
		
		
		
	 99eaf59509
			
		
	
	99eaf59509
	
	
	
		
			
			* Ability to change the account name * Ability to set a language to the account Addresses: #667 #307 Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
		
			
				
	
	
		
			119 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			119 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import { frontendURL } from '../helper/URLHelper';
 | |
| import auth from '../api/auth';
 | |
| 
 | |
| const user = auth.getCurrentUser() || {};
 | |
| const accountId = user.account_id;
 | |
| 
 | |
| export default {
 | |
|   common: {
 | |
|     routes: [
 | |
|       'home',
 | |
|       'inbox_dashboard',
 | |
|       'inbox_conversation',
 | |
|       'conversation_through_inbox',
 | |
|       'settings_account_reports',
 | |
|       'billing_deactivated',
 | |
|       'profile_settings',
 | |
|       'profile_settings_index',
 | |
|     ],
 | |
|     menuItems: {
 | |
|       assignedToMe: {
 | |
|         icon: 'ion-chatbox-working',
 | |
|         label: 'CONVERSATIONS',
 | |
|         hasSubMenu: false,
 | |
|         key: '',
 | |
|         toState: frontendURL(`accounts/${accountId}/dashboard`),
 | |
|         toolTip: 'Conversation from all subscribed inboxes',
 | |
|         toStateName: 'home',
 | |
|       },
 | |
|       report: {
 | |
|         icon: 'ion-arrow-graph-up-right',
 | |
|         label: 'REPORTS',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(`accounts/${accountId}/reports`),
 | |
|         toStateName: 'settings_account_reports',
 | |
|       },
 | |
|       settings: {
 | |
|         icon: 'ion-settings',
 | |
|         label: 'SETTINGS',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(`accounts/${accountId}/settings`),
 | |
|         toStateName: 'settings_home',
 | |
|       },
 | |
|     },
 | |
|   },
 | |
|   settings: {
 | |
|     routes: [
 | |
|       'agent_list',
 | |
|       'agent_new',
 | |
|       'canned_list',
 | |
|       'canned_new',
 | |
|       'settings_inbox',
 | |
|       'settings_inbox_new',
 | |
|       'settings_inbox_list',
 | |
|       'settings_inbox_show',
 | |
|       'settings_inboxes_page_channel',
 | |
|       'settings_inboxes_add_agents',
 | |
|       'settings_inbox_finish',
 | |
|       'billing',
 | |
|       'settings_integrations',
 | |
|       'settings_integrations_webhook',
 | |
|       'general_settings',
 | |
|       'general_settings_index',
 | |
|     ],
 | |
|     menuItems: {
 | |
|       back: {
 | |
|         icon: 'ion-ios-arrow-back',
 | |
|         label: 'HOME',
 | |
|         hasSubMenu: false,
 | |
|         toStateName: 'home',
 | |
|         toState: frontendURL(`accounts/${accountId}/dashboard`),
 | |
|       },
 | |
|       agents: {
 | |
|         icon: 'ion-person-stalker',
 | |
|         label: 'AGENTS',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(`accounts/${accountId}/settings/agents/list`),
 | |
|         toStateName: 'agent_list',
 | |
|       },
 | |
|       inboxes: {
 | |
|         icon: 'ion-archive',
 | |
|         label: 'INBOXES',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(`accounts/${accountId}/settings/inboxes/list`),
 | |
|         toStateName: 'settings_inbox_list',
 | |
|       },
 | |
|       cannedResponses: {
 | |
|         icon: 'ion-chatbox-working',
 | |
|         label: 'CANNED_RESPONSES',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(
 | |
|           `accounts/${accountId}/settings/canned-response/list`
 | |
|         ),
 | |
|         toStateName: 'canned_list',
 | |
|       },
 | |
|       billing: {
 | |
|         icon: 'ion-card',
 | |
|         label: 'BILLING',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(`accounts/${accountId}/settings/billing`),
 | |
|         toStateName: 'billing',
 | |
|       },
 | |
|       settings_integrations: {
 | |
|         icon: 'ion-flash',
 | |
|         label: 'INTEGRATIONS',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(`accounts/${accountId}/settings/integrations`),
 | |
|         toStateName: 'settings_integrations',
 | |
|       },
 | |
|       general_settings: {
 | |
|         icon: 'ion-gear-a',
 | |
|         label: 'ACCOUNT_SETTINGS',
 | |
|         hasSubMenu: false,
 | |
|         toState: frontendURL(`accounts/${accountId}/settings/general`),
 | |
|         toStateName: 'general_settings',
 | |
|       },
 | |
|     },
 | |
|   },
 | |
| };
 |