Signal only WIP
This commit is contained in:
parent
d9130fbaa2
commit
6288df7cf6
11 changed files with 676 additions and 1596 deletions
|
|
@ -1,26 +1,32 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": false,
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./*", "../../node_modules/*"]
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": ["**.d.ts", "**/*.ts", "**/*.tsx", "**/*.png, **/*.svg"],
|
||||
"exclude": ["node_modules", "babel__core", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"noEmit": false,
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
|
|
@ -24,5 +28,5 @@
|
|||
]
|
||||
},
|
||||
"include": ["**.d.ts", "**/*.ts", "**/*.tsx", "**/*.png, **/*.svg"],
|
||||
"exclude": ["node_modules", "babel__core"]
|
||||
"exclude": ["node_modules", "babel__core", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@
|
|||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"noEmit": false,
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
|
|
@ -25,5 +28,5 @@
|
|||
]
|
||||
},
|
||||
"include": ["**.d.ts", "**/*.ts", "**/*.tsx", "**/*.png, **/*.svg"],
|
||||
"exclude": ["node_modules", "babel__core"]
|
||||
"exclude": ["node_modules", "babel__core", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@
|
|||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"noEmit": false,
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
|
|
@ -25,5 +28,5 @@
|
|||
]
|
||||
},
|
||||
"include": ["**.d.ts", "**/*.ts", "**/*.tsx", "**/*.png, **/*.svg"],
|
||||
"exclude": ["node_modules", "babel__core"]
|
||||
"exclude": ["node_modules", "babel__core", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,13 @@ class CdrSignalReply
|
|||
@articleTypes: (articleTypes, ticket, ui) ->
|
||||
return articleTypes if !ui.permissionCheck('ticket.agent')
|
||||
|
||||
# Check CDR Link allowed channels setting
|
||||
allowedChannels = ui.Config.get('cdr_link_allowed_channels')
|
||||
if allowedChannels && allowedChannels.trim()
|
||||
whitelist = (channel.trim() for channel in allowedChannels.split(','))
|
||||
# Return early if 'cdr_signal' or 'signal message' not in whitelist
|
||||
return articleTypes if 'cdr_signal' not in whitelist && 'signal message' not in whitelist
|
||||
|
||||
return articleTypes if !ticket || !ticket.create_article_type_id
|
||||
|
||||
articleTypeCreate = App.TicketArticleType.find(ticket.create_article_type_id).name
|
||||
|
|
|
|||
|
|
@ -45,6 +45,13 @@ class CdrWhatsappReply
|
|||
@articleTypes: (articleTypes, ticket, ui) ->
|
||||
return articleTypes if !ui.permissionCheck('ticket.agent')
|
||||
|
||||
# Check CDR Link allowed channels setting
|
||||
allowedChannels = ui.Config.get('cdr_link_allowed_channels')
|
||||
if allowedChannels && allowedChannels.trim()
|
||||
whitelist = (channel.trim() for channel in allowedChannels.split(','))
|
||||
# Return early if 'cdr_whatsapp' or 'whatsapp message' not in whitelist
|
||||
return articleTypes if 'cdr_whatsapp' not in whitelist && 'whatsapp message' not in whitelist
|
||||
|
||||
return articleTypes if !ticket || !ticket.create_article_type_id
|
||||
|
||||
articleTypeCreate = App.TicketArticleType.find(ticket.create_article_type_id).name
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
class EnableDesktopBetaSwitch < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
# Enable the desktop beta switch to allow users to toggle between old and new UI
|
||||
Setting.set('ui_desktop_beta_switch', true)
|
||||
|
||||
# Also ensure the beta UI switch permission exists and is active
|
||||
permission = Permission.find_by(name: 'user_preferences.beta_ui_switch')
|
||||
if permission
|
||||
permission.update(active: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue