wco_models 3.1.0.119 → 3.1.0.121

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: 84a55005e82008356086a46abe9724464700fd8da3deec33ce95c037b23dbfb1
4
- data.tar.gz: 27deb4e92af7e8b2290e31e9ddeb49b7c49d12a5ec921e3c59bee4d5300a80c1
3
+ metadata.gz: 5ce1ab3e778ce161e0d3d32a2d946e8dcc53f2e5a43635927f0924a1ec36d8f5
4
+ data.tar.gz: 49266cc292198d736cbfa903fdf84952eb5a415733d9c64ea37d2eb8fe3a699a
5
5
  SHA512:
6
- metadata.gz: 86eaa4a03449ff4fe29b2400a44e49f3ee32579f218a9f9792347f95fcafa7cf73bbd1f6aa82cef7e6925bf2b9189c16d52f357b653ab75b89777b8590733d91
7
- data.tar.gz: c92ab51c0c823c44ff2f6e632bcb029d68478b1116c80c63650343656fa8b114ffd13260eb57e45c2606a7d6a33497a54ac47eff472e70757d094a2ef61cfc78
6
+ metadata.gz: 1b4b3d211b5bd2d3c0736a10a288c25caa093fbd17400de58e5b368565fa8b533e512ba6b2b8801709b558d72c773efac365634465a04b1be480b7c1caced67f
7
+ data.tar.gz: 07e425171c41bf69498dcfec734279ddbfbf660ee0602f58989dbb80c862d3019bce1c0f575c87a1dbc10e8a712813d183e6efe722298986c20b10a2314a9a0d
@@ -56,7 +56,7 @@ class WcoEmail::ApplicationMailer < ActionMailer::Base
56
56
  mail( from: @ctx.from_email,
57
57
  to: @ctx.to_email,
58
58
  cc: @ctx.cc,
59
- bcc: "poxlovi+sent@gmail.com",
59
+ bcc: "infostreamer+sent@yahoo.com",
60
60
  subject: ERB.new( @ctx.subject ).result( @ctx.get_binding ),
61
61
  body: rendered_str,
62
62
  content_type: "text/html" )
@@ -26,14 +26,15 @@ class WcoEmail::Conversation
26
26
  field :preview, default: ''
27
27
 
28
28
  has_many :messages, class_name: '::WcoEmail::Message'
29
- # default_scope ->{ includes(:messages) }
30
29
 
31
30
  has_and_belongs_to_many :tags, class_name: 'Wco::Tag', index: true
32
31
  has_and_belongs_to_many :leads, class_name: 'Wco::Lead', index: true
33
32
 
34
33
  belongs_to :filter, class_name: 'WcoEmail::EmailFilter', inverse_of: :conversations, optional: true
35
34
 
36
-
35
+ def cache_key
36
+ "#{self.class.name} #{id.to_s} #{updated_at}"
37
+ end
37
38
 
38
39
  def to_s
39
40
  "#{subject} (#{messages.length})"
@@ -26,8 +26,10 @@ class WcoEmail::Message
26
26
  field :subject
27
27
 
28
28
  field :part_html
29
+
29
30
  field :read_at, type: DateTime
30
31
  index({ read_at: -1 })
32
+ scope :unread, ->{ where( read_at: nil ) }
31
33
 
32
34
  def part_html_sanitized
33
35
  doc = Nokogiri::HTML part_html
@@ -235,7 +237,7 @@ class WcoEmail::Message
235
237
  end
236
238
  end
237
239
 
238
- scope :unread, ->{ where( read_at: nil ) }
240
+
239
241
 
240
242
  end
241
243
  ::Msg = WcoEmail::Message
@@ -0,0 +1,6 @@
1
+
2
+ - cache cache_key do
3
+ .tags--chips
4
+ - tags.each do |tag|
5
+ .mb-1
6
+ .Chip{ data: { tag: { id: tag.id.to_s } } }= tag.slug
@@ -27,20 +27,21 @@
27
27
  - else
28
28
  = link_to conv.subject, wco_email.conversation_path(conv)
29
29
  <b>#{conv.messages.unread.length}</b> (#{conv.messages.length})
30
- - conv.messages.unread.each do |msg|
31
- .border-bottom
32
- .gray= msg.preview_str
33
- = render '/wco_email/contexts/form_reply_mini', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
34
- - if conv.messages.unread.blank?
35
- - msg = conv.messages.last
36
- .border-bottom
37
- .gray= msg.preview_str
38
- = render '/wco_email/contexts/form_reply_mini', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
30
+
31
+ .gray= conv.preview
32
+
33
+ -# - conv.messages.unread.each do |msg|
34
+ -# .border-bottom
35
+ -# .gray= msg.preview_str
36
+ -# = render '/wco_email/contexts/form_reply_mini', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
37
+ -# - if conv.messages.unread.blank?
38
+ -# - msg = conv.messages.last
39
+ -# .border-bottom
40
+ -# .gray= msg.preview_str
41
+ -# = render '/wco_email/contexts/form_reply_mini', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
39
42
 
40
43
  %td.tags.mini
41
- - conv.tags.each do |tag|
42
- .mb-1
43
- .Chip= tag.slug
44
+ = render '/wco/tags/chips', tags: conv.tags, cache_key: conv.cache_key
44
45
  %td.latest-at
45
46
  = pp_date conv.latest_at
46
47
  = pp_time conv.latest_at
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.119
4
+ version: 3.1.0.121
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -583,6 +583,7 @@ files:
583
583
  - app/views/wco/sites/edit.haml
584
584
  - app/views/wco/sites/index.haml
585
585
  - app/views/wco/sites/new.haml
586
+ - app/views/wco/tags/_chips.haml
586
587
  - app/views/wco/tags/_form.haml
587
588
  - app/views/wco/tags/_header.haml
588
589
  - app/views/wco/tags/_index.haml