wco_models 3.1.0.100 → 3.1.0.101

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: 2f992057b3459389750e637a72ca85fbf5b89c2e43b27914e845c93550579c61
4
- data.tar.gz: ad1b76da7a02e9ba92dbd3593311b490d3021a1218dbc122536a7ca946184ef3
3
+ metadata.gz: d23c6a2b915f500b326bb8679196f05a144a3a200446e58c4f565c1be37b8f0f
4
+ data.tar.gz: 0307c5db1942f9a6c23b5a826b6bbefdf8b9dc29fe6f9cdd0663d0c048255251
5
5
  SHA512:
6
- metadata.gz: 1ea7a234b2d0e744882349f53f128bb36d39802b0265b4b68ffb6b99f79bdb078ded3e4d5ef49b53b02088f6fccf2b3eff20b9ce7324fb6542ca257ba8df2237
7
- data.tar.gz: 1c4471fcd47583f0a479ef797ed0260202c8ca04e89634e538c560b3058fe89938119216333263e4bceadc948087c001c070d598df1b0badbcf63e9ffcdd0950
6
+ metadata.gz: d2b93bc41ad17f3eded7a68900fdd52c23b31b8b57c6d3a6eaab59fe63e8273fdbab105272e26c22291d6ac2c777fca2b5939610335f5ab9d02b59778d103f86
7
+ data.tar.gz: f82a524c883c96e1ade3f28416c542eb110647b6264c93672b1f2505668cb7ff1a3c0a826e34ac026e4d0d34173340cdf3fbbdcf95cbedde2df408dfc343d8bf
@@ -0,0 +1,6 @@
1
+
2
+
3
+ td.convs {
4
+ text-align: center;
5
+ }
6
+
@@ -26,9 +26,11 @@ class Wco::LeadsController < Wco::ApplicationController
26
26
  authorize! :index, Wco::Lead
27
27
  @leads = Wco::Lead.all
28
28
 
29
- # if params[:q].present?
30
- # @leads = @leads.where(" email LIKE ? or name LIKE ? ", "%#{params[:q]}%", "%#{params[:q]}%" )
31
- # end
29
+ if params[:q].present?
30
+ @leads = @leads.any_of(
31
+ { email: /#{params[:q].downcase}/i },
32
+ { name: /#{params[:q].downcase}/i } )
33
+ end
32
34
 
33
35
  # if params[:q_tag_ids].present?
34
36
  # carry = nil
@@ -34,8 +34,10 @@
34
34
  %th Phone, address
35
35
  %th Tag
36
36
  %th created_at
37
- %th.ctxs Ctxs
38
- %th Sch
37
+
38
+ - if defined?( wco_email )
39
+ %th.convs Convs
40
+ %th Sch
39
41
 
40
42
  %tbody
41
43
  - leads.each do |lead|
@@ -53,19 +55,24 @@
53
55
  .a= lead.address if lead.address.present?
54
56
  %td
55
57
  %td= lead.created_at.to_s[0..10]
56
- %td.ctxs
57
- = lead.email_contexts.length
58
- -## without the N+1 but unfinished and messy:
59
- -# = email_contexts[lead.id] || '-'
60
58
 
61
- %td.sch
62
- = lead.email_actions.length
63
- = link_to '[+]', wco_email.new_email_action_path( lead_id: lead.id )
64
- -# %ul
65
- -# - lead.scheduled_email_actions.map do |sch_a|
66
- -# %li
67
- -# = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
68
- -# [x]
59
+
60
+ - if defined?( wco_email )
61
+ %td.convs
62
+ - if lead.conversations.length > 0
63
+ = link_to lead.conversations.length, wco_email.conversations_path( lead_id: lead.id )
64
+ - else
65
+ 0
66
+ -## without the N+1 but unfinished and messy:
67
+ -# = email_contexts[lead.id] || '-'
68
+ %td.sch
69
+ = lead.email_actions.length
70
+ = link_to '[+]', wco_email.new_email_action_path( lead_id: lead.id )
71
+ -# %ul
72
+ -# - lead.scheduled_email_actions.map do |sch_a|
73
+ -# %li
74
+ -# = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
75
+ -# [x]
69
76
 
70
77
  - if !defined?( skip_pagination ) || !skip_pagination
71
78
  = paginate leads, param_name: :leads_page
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.100
4
+ version: 3.1.0.101
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-01 00:00:00.000000000 Z
11
+ date: 2024-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -380,6 +380,7 @@ files:
380
380
  - app/assets/stylesheets/wco/alerts_notices.scss
381
381
  - app/assets/stylesheets/wco/application.css
382
382
  - app/assets/stylesheets/wco/chip.scss
383
+ - app/assets/stylesheets/wco/conversations.scss
383
384
  - app/assets/stylesheets/wco/galleries.scss
384
385
  - app/assets/stylesheets/wco/pagination.scss
385
386
  - app/assets/stylesheets/wco/photos.scss