mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	 161024db9d
			
		
	
	161024db9d
	
	
	
		
			
			This pull request includes multiple changes to the sidebar and route metas to configure visibility of features on the dashboard. Here's a summary of the changes 1. Added `installationTypes`, field to routes `meta`, this works along side `permissions` and `featureFlags` This allows us to decide weather a particular feature is accessible on a particular type. For instance, the Billing pages should only be available on Cloud 2. Updated `usePolicy` and `policy.vue` to use the new `installationTypes` config 3. Updated Sidebar related components to remove `showOnlyOnCloud` to use the new policy updates. Testing the PR Here's the matrix of cases: https://docs.google.com/spreadsheets/d/15AAJntJZoyudaby77BOnRcC4435FGuT7PXbUXoTyU50/edit?usp=sharing --------- Co-authored-by: Pranav <pranav@chatwoot.com> Co-authored-by: Sojan Jose <sojan@pepalo.com> Co-authored-by: Pranav <pranavrajs@gmail.com>
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| export const FEATURE_FLAGS = {
 | |
|   AGENT_BOTS: 'agent_bots',
 | |
|   AGENT_MANAGEMENT: 'agent_management',
 | |
|   AUTO_RESOLVE_CONVERSATIONS: 'auto_resolve_conversations',
 | |
|   AUTOMATIONS: 'automations',
 | |
|   CAMPAIGNS: 'campaigns',
 | |
|   CANNED_RESPONSES: 'canned_responses',
 | |
|   CRM: 'crm',
 | |
|   CUSTOM_ATTRIBUTES: 'custom_attributes',
 | |
|   INBOX_MANAGEMENT: 'inbox_management',
 | |
|   INTEGRATIONS: 'integrations',
 | |
|   LABELS: 'labels',
 | |
|   MACROS: 'macros',
 | |
|   HELP_CENTER: 'help_center',
 | |
|   REPORTS: 'reports',
 | |
|   TEAM_MANAGEMENT: 'team_management',
 | |
|   VOICE_RECORDER: 'voice_recorder',
 | |
|   AUDIT_LOGS: 'audit_logs',
 | |
|   INBOX_VIEW: 'inbox_view',
 | |
|   SLA: 'sla',
 | |
|   RESPONSE_BOT: 'response_bot',
 | |
|   CHANNEL_EMAIL: 'channel_email',
 | |
|   CHANNEL_FACEBOOK: 'channel_facebook',
 | |
|   CHANNEL_TWITTER: 'channel_twitter',
 | |
|   CHANNEL_WEBSITE: 'channel_website',
 | |
|   CUSTOM_REPLY_DOMAIN: 'custom_reply_domain',
 | |
|   CUSTOM_REPLY_EMAIL: 'custom_reply_email',
 | |
|   DISABLE_BRANDING: 'disable_branding',
 | |
|   EMAIL_CONTINUITY_ON_API_CHANNEL: 'email_continuity_on_api_channel',
 | |
|   INBOUND_EMAILS: 'inbound_emails',
 | |
|   IP_LOOKUP: 'ip_lookup',
 | |
|   LINEAR: 'linear_integration',
 | |
|   CAPTAIN: 'captain_integration',
 | |
|   CUSTOM_ROLES: 'custom_roles',
 | |
|   CHATWOOT_V4: 'chatwoot_v4',
 | |
|   REPORT_V4: 'report_v4',
 | |
|   CONTACT_CHATWOOT_SUPPORT_TEAM: 'contact_chatwoot_support_team',
 | |
| };
 | |
| 
 | |
| export const PREMIUM_FEATURES = [
 | |
|   FEATURE_FLAGS.SLA,
 | |
|   FEATURE_FLAGS.CAPTAIN,
 | |
|   FEATURE_FLAGS.CUSTOM_ROLES,
 | |
|   FEATURE_FLAGS.AUDIT_LOGS,
 | |
|   FEATURE_FLAGS.HELP_CENTER,
 | |
| ];
 |