wco_models 3.1.0.175 → 3.1.0.177

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a05466d095355ec09936c5f72861b3292b272866d603196be5ace081f657c978
4
- data.tar.gz: 00af6f41df7a96e17cab793b68b2fb5f4cedf6f84582c956ea1924ee3c0a42d6
3
+ metadata.gz: 4eaa4ae791b0efb894e267ee640a2559d8cf3a0aec9e9c2b46ef28d19610d069
4
+ data.tar.gz: aba7e8635f3edc53fdaea60ce8739e9488215bd702309a23b8f3cc69708e9dda
5
5
  SHA512:
6
- metadata.gz: b5d501169a2186a206ce0ff1cad4875bf6fd0bf1bb3cd90aa1ee93c6f33f55e30f974c63a6a268c19f5237d464385098e18aa6c9adbd3b950d32551960c22403
7
- data.tar.gz: e3095c492065d542c85b29c93e54bce2bd0b7d6d653c6adbed89e9f230a57254c8155f39a7daefcfc2bb594c2a3fab4fb5b65cb1cd705332ba35b2d9c26eb797
6
+ metadata.gz: e242a74a1154595834d349d86f4b0475219439ee17e9762a257c7f40fa8761fb61cc3ef73e164045d6b2b7a7525756ac67a1d0f266943eb4ed27292b489aecef
7
+ data.tar.gz: 665b22dbd49c9fa79d24e0f349a6a30f639bfd7dec0db48a3e69758ae0e0984e14ceada8d33c39c6fe5ec98156f9884bd336472e2163828b001d8e0731bf24a4
@@ -166,6 +166,13 @@ textarea.monospace {
166
166
  margin: auto;
167
167
  }
168
168
 
169
+ .main-header {
170
+ .active,
171
+ ._ {
172
+ border-bottom: 2px solid red;
173
+ }
174
+ }
175
+
169
176
  .mini {
170
177
  font-size: 0.75em;
171
178
  }
@@ -71,7 +71,8 @@ class WcoEmail::ApplicationMailer < ActionMailer::Base
71
71
 
72
72
  @ctx.update({
73
73
  rendered_str: rendered_str,
74
- subject: rendered_subject,
74
+ sent_at: Time.now,
75
+ subject: rendered_subject,
75
76
  })
76
77
 
77
78
  mail( from: @ctx.from_email,
@@ -33,6 +33,48 @@ class WcoEmail::Conversation
33
33
 
34
34
  belongs_to :filter, class_name: 'WcoEmail::EmailFilter', inverse_of: :conversations, optional: true
35
35
 
36
+ def self.load_conversations_messages_tag_by_params_and_profile params, current_profile
37
+ @conversations = WcoEmail::Conversation.all
38
+
39
+ if params[:tagname]
40
+ @tag = Wco::Tag.find_by slug: params[:tagname]
41
+ @conversations = @conversations.where( :tag_ids.in => [ @tag.id ] )
42
+ end
43
+ if params[:tagname_not]
44
+ @tag_not = Wco::Tag.find_by slug: params[:tagname_not]
45
+ @conversations = @conversations.where( :tag_ids.nin => [ @tag_not.id ] )
46
+ end
47
+
48
+ if params[:subject].present?
49
+ @conversations = @conversations.where({ subject: /.*#{params[:subject]}.*/i })
50
+ end
51
+
52
+ if params[:from_email].present?
53
+ @conversations = @conversations.where({ from_emails: /.*#{params[:from_email]}.*/i })
54
+ end
55
+
56
+ if params[:lead_id].present?
57
+ @conversations = @conversations.where( lead_ids: params[:lead_id] )
58
+ end
59
+
60
+ @conversations = @conversations.where(
61
+ ).includes( :leads, :messages, :tags
62
+ ).order_by( latest_at: :desc
63
+ ).page( params[:conv_page] ).per( current_profile.per_page )
64
+
65
+ conversation_ids = @conversations.map &:id
66
+ messages = WcoEmail::Message.where(
67
+ :conversation_id.in => conversation_ids,
68
+ read_at: nil,
69
+ )
70
+ @messages_hash = {}
71
+ messages.map do |msg|
72
+ @messages_hash[msg.id.to_s] = msg
73
+ end
74
+
75
+ return [ @conversations, @messages_hash, @tag ]
76
+ end
77
+
36
78
  def cache_key
37
79
  "#{self.class.name} #{id.to_s} #{updated_at}"
38
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.175
4
+ version: 3.1.0.177
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-08-24 00:00:00.000000000 Z
11
+ date: 2024-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ahoy_matey
@@ -421,11 +421,11 @@ files:
421
421
  - app/assets/stylesheets/wco/conversations.scss
422
422
  - app/assets/stylesheets/wco/galleries.scss
423
423
  - app/assets/stylesheets/wco/leads_leadsets.scss
424
+ - app/assets/stylesheets/wco/main.scss
424
425
  - app/assets/stylesheets/wco/office_action_templates.scss
425
426
  - app/assets/stylesheets/wco/pagination.scss
426
427
  - app/assets/stylesheets/wco/photos.scss
427
428
  - app/assets/stylesheets/wco/sitemaps.scss
428
- - app/assets/stylesheets/wco/utils.scss
429
429
  - app/assets/stylesheets/wco/videos.scss
430
430
  - app/controllers/wco/api/leads_controller.rb
431
431
  - app/controllers/wco/api/obfuscated_redirects_controller.rb