wco_email 0.1.1.56 → 0.1.1.59
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/wco_email/application_controller.rb +0 -11
- data/app/controllers/wco_email/conversations_controller.rb +24 -14
- data/app/views/wco_email/_sidebar.haml +1 -2
- data/app/views/wco_email/conversations/index.haml +0 -1
- data/app/views/wco_email/conversations/show.haml +7 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 067ceadf61d8c83f7357fa0e64851fb56633e41edab0e3e25f3ad2eea7120e36
|
4
|
+
data.tar.gz: 47d9f2042d9fe87c10adba5554d0688857f60f152286e9d90766c3416f1b0b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b8beec1612551154590926440f93a3a7a333b7762ff331d335370273b95d83439eca10847140e6632dbb729122da928e408d2f948831881e7396b3c40c86322
|
7
|
+
data.tar.gz: 26645d72c64b9bbf8a76c0b4836beb895b514a88f44aef695a0f4c77ebe97e4d54edfbc1c9b8cfa1cd2f33d80eb04b6d70a5d83ef85eb3cda9b61e093bb83735
|
@@ -1,15 +1,4 @@
|
|
1
1
|
|
2
|
-
EC ||= WcoEmail::Conversation
|
3
|
-
EF ||= WcoEmail::EmailFilter
|
4
|
-
EM ||= WcoEmail::Message
|
5
|
-
ET ||= WcoEmail::EmailTemplate
|
6
|
-
MS ||= WcoEmail::MessageStub
|
7
|
-
EMS ||= MS
|
8
|
-
OA ||= Wco::OfficeAction
|
9
|
-
OAT ||= Wco::OfficeActionTemplate
|
10
|
-
OATT ||= Wco::OfficeActionTemplateTie
|
11
|
-
Sch ||= WcoEmail::EmailAction
|
12
|
-
|
13
2
|
class WcoEmail::ApplicationController < Wco::ApplicationController
|
14
3
|
|
15
4
|
layout 'wco_email/application'
|
@@ -52,11 +52,21 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
|
|
52
52
|
@conversations = @conversations.where( lead_ids: params[:lead_id] )
|
53
53
|
end
|
54
54
|
|
55
|
-
@conversations = @conversations.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
55
|
+
@conversations = @conversations.where(
|
56
|
+
# ).includes( :leads, :messages, :tags
|
57
|
+
).order_by( latest_at: :desc
|
58
|
+
).page( params[:conv_page] ).per( current_profile.per_page )
|
59
|
+
|
60
|
+
conversation_ids = @conversations.map &:id
|
61
|
+
|
62
|
+
@messages_hash = {}
|
63
|
+
messages = WcoEmail::Message.where(
|
64
|
+
:conversation_id.in => conversation_ids,
|
65
|
+
read_at: nil,
|
66
|
+
)
|
67
|
+
messages.map do |msg|
|
68
|
+
@messages_hash[msg.id.to_s] = msg
|
69
|
+
end
|
60
70
|
end
|
61
71
|
|
62
72
|
## merge conv1 into conv2, and delete conv1
|
@@ -102,15 +112,15 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
|
|
102
112
|
|
103
113
|
@conversation.messages.unread.update_all({ read_at: Time.now })
|
104
114
|
|
105
|
-
@other_convs = WcoEmail::Message.where( :message_id.in => @messages.map( &:in_reply_to_id )
|
106
|
-
|
107
|
-
|
108
|
-
other_convs_by_subj = WcoEmail::Conversation.where( subject: @conversation.subject
|
109
|
-
|
110
|
-
|
111
|
-
if @other_convs.present?
|
112
|
-
|
113
|
-
end
|
115
|
+
# @other_convs = WcoEmail::Message.where( :message_id.in => @messages.map( &:in_reply_to_id )
|
116
|
+
# ).where( :conversation_id.ne => @conversation.id
|
117
|
+
# ).map( &:conversation_id ).uniq
|
118
|
+
# other_convs_by_subj = WcoEmail::Conversation.where( subject: @conversation.subject
|
119
|
+
# ).where( :conversation_id.ne => @conversation.id
|
120
|
+
# ).map( &:id )
|
121
|
+
# if @other_convs.present? || other_convs_by_subj.present?
|
122
|
+
# @other_convs = WcoEmail::Conversation.find( @other_convs + other_convs_by_subj )
|
123
|
+
# end
|
114
124
|
end
|
115
125
|
|
116
126
|
def update
|
@@ -4,8 +4,7 @@
|
|
4
4
|
- @tags.each do |tag|
|
5
5
|
%li
|
6
6
|
= link_to tag.slug, conversations_in_path( tag.slug )
|
7
|
-
|
8
|
-
(#{tag.conversations.unread.length})
|
7
|
+
<b>#{tag.conversations.unread.length}</b>
|
9
8
|
(#{tag.conversations.length})
|
10
9
|
= link_to "not", conversations_not_in_path( tag.slug )
|
11
10
|
|
@@ -13,14 +13,13 @@
|
|
13
13
|
- @conversation.leads.each do |lead|
|
14
14
|
.Chip= link_to lead.email, wco.lead_path( lead )
|
15
15
|
|
16
|
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
%span.gray.mini= conv.id
|
16
|
+
-# - if @other_convs.present?
|
17
|
+
-# - @other_convs.each do |conv|
|
18
|
+
-# .d-flex
|
19
|
+
-# = button_to "Merge", merge_conversations_path( @conversation, conv ), data: { confirm: 'Are you sure?' }
|
20
|
+
-# = conv.subject
|
21
|
+
-# (#{conv.messages.length})
|
22
|
+
-# %span.gray.mini= conv.id
|
24
23
|
|
25
24
|
|
26
25
|
%ul.m-0.p-0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1.
|
4
|
+
version: 0.1.1.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|