From 99abbb8158153f02f39550a334bb01821c2fdf62 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Thu, 14 Oct 2021 12:55:46 +0530 Subject: [PATCH] feat: Display `sent` status of emails in email channel (#3125) --- .codeclimate.yml | 4 ++ .../widgets/conversation/ReplyBox.vue | 14 +++--- .../widgets/conversation/bubble/Actions.vue | 18 +++++++- .../dashboard/i18n/locale/en/chatlist.json | 1 + .../dashboard/settings/inbox/Settings.vue | 3 ++ app/javascript/shared/mixins/inboxMixin.js | 17 +++---- app/mailboxes/application_mailbox.rb | 2 +- app/mailboxes/reply_mailbox.rb | 4 +- app/mailers/conversation_reply_mailer.rb | 42 +++++++++++++----- app/models/contact_inbox.rb | 2 +- app/models/message.rb | 10 ++--- .../email_reply.html.erb | 8 ++++ .../conversation_reply_email_worker.rb | 8 ++-- app/workers/email_reply_worker.rb | 14 ++++++ .../mailers/conversation_reply_mailer_spec.rb | 35 +++++++++++---- spec/models/message_spec.rb | 8 ++++ .../conversation_reply_email_worker_spec.rb | 8 ++-- spec/workers/email_reply_worker_spec.rb | 44 +++++++++++++++++++ 18 files changed, 187 insertions(+), 55 deletions(-) create mode 100644 app/views/mailers/conversation_reply_mailer/email_reply.html.erb create mode 100644 app/workers/email_reply_worker.rb create mode 100644 spec/workers/email_reply_worker_spec.rb diff --git a/.codeclimate.yml b/.codeclimate.yml index ac38c27bb..50d5360fd 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -14,6 +14,10 @@ plugins: checks: similar-code: enabled: false + method-count: + enabled: true + config: + threshold: 25 exclude_patterns: - "spec/" - "**/specs/" diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue index 2de33e6af..661515adf 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue @@ -22,8 +22,8 @@ /> diff --git a/app/javascript/dashboard/components/widgets/conversation/bubble/Actions.vue b/app/javascript/dashboard/components/widgets/conversation/bubble/Actions.vue index 59a0a9896..597a5504d 100644 --- a/app/javascript/dashboard/components/widgets/conversation/bubble/Actions.vue +++ b/app/javascript/dashboard/components/widgets/conversation/bubble/Actions.vue @@ -1,6 +1,12 @@