wco_models 3.1.0.119 → 3.1.0.120

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: 50a9447b9d2b3daffc23cc0d2fcecafc2b819a6e242ca4bca1d7bc202957ef49
4
+ data.tar.gz: cc63c1be9da588cffdf4d44156ebb3d9f06c9719a422cb2e7bde71c7e3517673
5
5
  SHA512:
6
- metadata.gz: 86eaa4a03449ff4fe29b2400a44e49f3ee32579f218a9f9792347f95fcafa7cf73bbd1f6aa82cef7e6925bf2b9189c16d52f357b653ab75b89777b8590733d91
7
- data.tar.gz: c92ab51c0c823c44ff2f6e632bcb029d68478b1116c80c63650343656fa8b114ffd13260eb57e45c2606a7d6a33497a54ac47eff472e70757d094a2ef61cfc78
6
+ metadata.gz: 619f0b8e7cf7e418a014d71c0f1fc74d5bb669688f9cbb5d658675351d37891c424fd05f2c339225d70bffb0c29be5640cffe19deef4d7dde0b0b3fde966d359
7
+ data.tar.gz: 0b16e4a0e3800c3b0deb138981ce622cbe53e0868018dbab027e2325171a6a48dcc3a2c3815ffc791450800726b1660fd87e31cc03348c1ddc9e925987f48e55
@@ -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
@@ -38,9 +38,7 @@
38
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 })
39
39
 
40
40
  %td.tags.mini
41
- - conv.tags.each do |tag|
42
- .mb-1
43
- .Chip= tag.slug
41
+ = render '/wco/tags/chips', tags: conv.tags, cache_key: conv.cache_key
44
42
  %td.latest-at
45
43
  = pp_date conv.latest_at
46
44
  = 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.120
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