From eff9c9bb7ebc12eb10aa7180022dd373fc25d244 Mon Sep 17 00:00:00 2001 From: adriano Date: Tue, 22 Feb 2022 21:53:10 -0300 Subject: [PATCH] =?UTF-8?q?Adi=C3=A7=C3=A3o=20da=20rule=20para=20que=20ape?= =?UTF-8?q?nas=20o=20usu=C3=A1rio=20master=20conecte=20ou=20desconecte=20a?= =?UTF-8?q?=20sess=C3=A3o=20do=20whatsapp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/Connections/index.js | 46 +++++++++++++++++++++---- frontend/src/rules.js | 1 + frontend/src/translate/languages/pt.js | 3 +- 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/frontend/src/pages/Connections/index.js b/frontend/src/pages/Connections/index.js index d1de3a3..323d2be 100644 --- a/frontend/src/pages/Connections/index.js +++ b/frontend/src/pages/Connections/index.js @@ -207,8 +207,14 @@ const Connections = () => { }; const renderActionButtons = whatsApp => { - return ( - <> + return ( + + ( + + <> {whatsApp.status === "qrcode" && ( )} - {whatsApp.status === "DISCONNECTED" && ( - <> + {whatsApp.status === "DISCONNECTED" && ( + + <> )} + + )} + /> + ); }; @@ -358,9 +369,20 @@ const Connections = () => { {i18n.t("connections.table.status")} - + + + ( + {i18n.t("connections.table.session")} - + + )} + /> + + + {i18n.t("connections.table.lastUpdate")} @@ -384,9 +406,19 @@ const Connections = () => { {renderStatusToolTips(whatsApp)} - + + ( + {renderActionButtons(whatsApp)} + )} + /> + + + {format(parseISO(whatsApp.updatedAt), "dd/MM/yy HH:mm")} diff --git a/frontend/src/rules.js b/frontend/src/rules.js index ff55307..29767af 100644 --- a/frontend/src/rules.js +++ b/frontend/src/rules.js @@ -38,6 +38,7 @@ const rules = { "btn-add-whatsapp", "btn-remove-whatsapp", "ticket-report:show", + "connection-button:show" ], }, }; diff --git a/frontend/src/translate/languages/pt.js b/frontend/src/translate/languages/pt.js index 43ba179..1020877 100644 --- a/frontend/src/translate/languages/pt.js +++ b/frontend/src/translate/languages/pt.js @@ -80,7 +80,8 @@ const messages = { qrcode: { title: "Esperando leitura do QR Code", content: - "Clique no botão 'QR CODE' e leia o QR Code com o seu celular para iniciar a sessão", + // "Clique no botão 'QR CODE' e leia o QR Code com o seu celular para iniciar a sessão", + "Entre em contato com o suporte para realizar a leitura do QR code", }, connected: { title: "Conexão estabelecida!",