From 597ef38c9adc016e4ce7f585c763036668527eaf Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Thu, 9 May 2024 14:41:07 -0300 Subject: [PATCH 1/6] feat: Add merge_brazil_contacts option to chatwoot settings --- src/components/instance/profile/Privacy.vue | 1 + src/components/instance/settings/Chatwoot.vue | 23 +++++++++++++++++++ src/i18n/en.js | 4 +++- src/i18n/es.js | 2 ++ src/i18n/pt.js | 2 ++ 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/components/instance/profile/Privacy.vue b/src/components/instance/profile/Privacy.vue index 5d4b5ef..277626f 100644 --- a/src/components/instance/profile/Privacy.vue +++ b/src/components/instance/profile/Privacy.vue @@ -127,6 +127,7 @@ const defaultObj = () => ({ sign_msg: true, reopen_conversation: true, conversation_pending: false, + merge_brazil_contacts: false, import_contacts: false, import_messages: false, days_limit_import_messages: 0, // Set as a number diff --git a/src/components/instance/settings/Chatwoot.vue b/src/components/instance/settings/Chatwoot.vue index 1748cef..e826e4d 100644 --- a/src/components/instance/settings/Chatwoot.vue +++ b/src/components/instance/settings/Chatwoot.vue @@ -231,6 +231,26 @@ +
+ + + +
@@ -276,6 +296,7 @@ const defaultObj = () => ({ sign_delimiter: "\n", reopen_conversation: true, conversation_pending: false, + merge_brazil_contacts: false, auto_create: undefined, import_contacts: false, import_messages: false, @@ -305,6 +326,7 @@ export default { sign_delimiter: "\n", reopen_conversation: true, conversation_pending: false, + merge_brazil_contacts: false, import_contacts: false, import_messages: false, days_limit_import_messages: 0, @@ -318,6 +340,7 @@ export default { sign_delimiter: "\n", reopen_conversation: true, conversation_pending: false, + merge_brazil_contacts: false, import_contacts: false, import_messages: false, days_limit_import_messages: 0, diff --git a/src/i18n/en.js b/src/i18n/en.js index c84f9a8..13a391d 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -74,7 +74,7 @@ export default { title: "Phone not connected", apiGenericError: "Could not load QR Code, if the error persists, restart the API and try again.", qr: "QR Code", - code: "Código", + code: "C�digo", }, options: { title: "Behavior", @@ -107,6 +107,8 @@ export default { conversationPendingHelp: "Starts the conversation as pending instead of open", autoCreate: "Create Inbox", autoCreateHelp: "Creates the inbox in Chatwoot if it doesn't exist", + mergeBrasilianContacts: "Merge Brazilian contacts", + mergeBrasilianContactsHelp: "If there are two contacts with the same number, one with the ninth digit and the other without it, they will be merged; valid only for Brazilian numbers.", importcontacts: "Import contacts", importcontactsHelp: "Import contacts to Chatwoot", importmessages: "Import messages", diff --git a/src/i18n/es.js b/src/i18n/es.js index b9aac3d..90180da 100644 --- a/src/i18n/es.js +++ b/src/i18n/es.js @@ -107,6 +107,8 @@ export default { conversationPendingHelp: "Inicia la conversación como pendiente en lugar de abierta", autoCreate: "Crear bandeja de entrada", autoCreateHelp: "Crea la bandeja de entrada en Chatwoot si no existe", + mergeBrasilianContacts: "Unir contactos brasileños", + mergeBrasilianContactsHelp: "Si hay dos contactos con el mismo número, uno con el dígito nueve y otro sin él, se fusionarán; válido únicamente para números brasileños.", importcontacts: "Importar contactos", importcontactsHelp: "Importa contactos a Chatwoot", importmessages: "Importar mensajes", diff --git a/src/i18n/pt.js b/src/i18n/pt.js index 6deca97..8aaa7d9 100644 --- a/src/i18n/pt.js +++ b/src/i18n/pt.js @@ -116,6 +116,8 @@ export default { "Inicia a conversa como pendente ao invés de aberta", autoCreate: "Criar Caixa de Entrada", autoCreateHelp: "Cria a caixa de entrada no Chatwoot caso ela não exista", + mergeBrasilianContacts: "Mesclar contatos brasileiros", + mergeBrasilianContactsHelp: "Se houver dois contatos com o mesmo número, sendo um com nono dígito e outro sem, eles serão mesclados; válido apenas para números brasileiros.", importcontacts: "Importar contatos", importcontactsHelp: "Importar contatos para o Chatwoot", importmessages: "Importar mensagens", From 9f69e151224deaa0d030662c2a2252da28f9620e Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Thu, 9 May 2024 14:42:52 -0300 Subject: [PATCH 2/6] feat: Update merge_brazil_contacts option to match minimum required version The merge_brazil_contacts option in the chatwoot settings has been updated to match the minimum required version of 1.7.5. This ensures compatibility with the latest features and improvements. --- src/components/instance/settings/Chatwoot.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/instance/settings/Chatwoot.vue b/src/components/instance/settings/Chatwoot.vue index e826e4d..60fabbe 100644 --- a/src/components/instance/settings/Chatwoot.vue +++ b/src/components/instance/settings/Chatwoot.vue @@ -234,13 +234,13 @@
Date: Thu, 9 May 2024 14:49:47 -0300 Subject: [PATCH 3/6] =?UTF-8?q?fix:=20Correct=20typo=20in=20English=20tran?= =?UTF-8?q?slation=20for=20"C=C3=B3digo"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/en.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/en.js b/src/i18n/en.js index 13a391d..9ef41f9 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -74,7 +74,7 @@ export default { title: "Phone not connected", apiGenericError: "Could not load QR Code, if the error persists, restart the API and try again.", qr: "QR Code", - code: "C�digo", + code: "Código", }, options: { title: "Behavior", From 87cfadf6736a03f578593b72f5f1f7d5c49e74e5 Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Thu, 9 May 2024 15:46:05 -0300 Subject: [PATCH 4/6] feat: Add name_inbox field to Chatwoot settings This commit adds the `name_inbox` field to the Chatwoot settings in both the `Privacy.vue` and `Chatwoot.vue` components. This field allows users to specify the name of the inbox to be used in Chatwoot. If not provided, it will default to the session name. --- src/components/instance/profile/Privacy.vue | 1 + src/components/instance/settings/Chatwoot.vue | 22 +++++++++++++++++++ src/i18n/en.js | 2 ++ src/i18n/es.js | 2 ++ src/i18n/pt.js | 2 ++ 5 files changed, 29 insertions(+) diff --git a/src/components/instance/profile/Privacy.vue b/src/components/instance/profile/Privacy.vue index 277626f..7ca54ad 100644 --- a/src/components/instance/profile/Privacy.vue +++ b/src/components/instance/profile/Privacy.vue @@ -124,6 +124,7 @@ const defaultObj = () => ({ url: "", account_id: "", token: "", + name_inbox: "", sign_msg: true, reopen_conversation: true, conversation_pending: false, diff --git a/src/components/instance/settings/Chatwoot.vue b/src/components/instance/settings/Chatwoot.vue index 60fabbe..04f389e 100644 --- a/src/components/instance/settings/Chatwoot.vue +++ b/src/components/instance/settings/Chatwoot.vue @@ -97,6 +97,25 @@ />
+
+ +
({ url: "", account_id: "", token: "", + name_inbox: "", sign_msg: true, sign_delimiter: "\n", reopen_conversation: true, @@ -322,6 +342,7 @@ export default { url: "", account_id: "", token: "", + name_inbox: "", sign_msg: true, sign_delimiter: "\n", reopen_conversation: true, @@ -336,6 +357,7 @@ export default { url: "", account_id: "", token: "", + name_inbox: "", sign_msg: true, sign_delimiter: "\n", reopen_conversation: true, diff --git a/src/i18n/en.js b/src/i18n/en.js index 9ef41f9..a2a9cce 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -97,6 +97,8 @@ export default { account_id: "Account ID", token: "Account Token", dayslimitimportmessages: "Days limit to import messages", + nameInbox: "Inbox name", + nameInboxHelp: "Inbox name to be used in Chatwoot. If not provided, it will default to the session name.", signMsg: "Sign messages", signMsgHelp: "Adds the agent name at the first line of the message", signDelimiter: "Signature delimiter", diff --git a/src/i18n/es.js b/src/i18n/es.js index 90180da..291f849 100644 --- a/src/i18n/es.js +++ b/src/i18n/es.js @@ -97,6 +97,8 @@ export default { account_id: "ID de Cuenta", token: "Token de Cuenta", dayslimitimportmessages: "Límite de días para importar mensajes", + nameInbox: "Nombre de la bandeja de entrada", + nameInboxHelp: "Nombre de la bandeja de entrada que se utilizará en Chatwoot. Si no se proporciona, será el nombre de la sesión por defecto.", signMsg: "Firmar en mensajes", signMsgHelp: "Agrega el nombre del agente en la primera línea del mensaje.", signDelimiter: "Delimitador de firma", diff --git a/src/i18n/pt.js b/src/i18n/pt.js index 8aaa7d9..acdad7a 100644 --- a/src/i18n/pt.js +++ b/src/i18n/pt.js @@ -103,6 +103,8 @@ export default { account_id: "ID da conta", token: "Token da conta", dayslimitimportmessages: "Limite de dias para importar mensagens", + nameInbox: "Nome da caixa de entrada", + nameInboxHelp: "Nome da caixa de entrada que será utilizado no Chatwoot. Se não for informado, será o nome da sessão.", signMsg: "Assinar mensagens", signMsgHelp: "Adiciona o nome do atendente na primeira linha da mensagem", signDelimiter: "Separador da assinatura da mensagem", From 983ff4290cfac6a2d1a6b886f1096ebd96fb0615 Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Thu, 9 May 2024 15:48:04 -0300 Subject: [PATCH 5/6] feat: Update Chatwoot.vue to display correct version availability hint --- src/components/instance/settings/Chatwoot.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/instance/settings/Chatwoot.vue b/src/components/instance/settings/Chatwoot.vue index 04f389e..cd58b81 100644 --- a/src/components/instance/settings/Chatwoot.vue +++ b/src/components/instance/settings/Chatwoot.vue @@ -108,7 +108,7 @@ :label="$t('chatwoot.nameInbox')" :hint=" !AppStore.versionSatisfies('>=1.7.4') - ? $t('version.availableFrom', { version: '>=1.7.4' }) + ? $t('version.availableFrom', { version: '1.7.4' }) : $t('chatwoot.nameInboxHelp') " :persistent-hint="!AppStore.versionSatisfies('>=1.7.4')" From ca95156832b92eee6ee4c11fbbe496bd4186c9fb Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Thu, 6 Jun 2024 11:32:35 -0300 Subject: [PATCH 6/6] Update en.js --- src/i18n/en.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/en.js b/src/i18n/en.js index a2a9cce..0cc6dd0 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -74,7 +74,7 @@ export default { title: "Phone not connected", apiGenericError: "Could not load QR Code, if the error persists, restart the API and try again.", qr: "QR Code", - code: "Código", + code: "Code", }, options: { title: "Behavior", @@ -216,4 +216,4 @@ export default { none: "Nobody", } } -} \ No newline at end of file +}