wco_models 3.1.0.100 → 3.1.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f992057b3459389750e637a72ca85fbf5b89c2e43b27914e845c93550579c61
4
- data.tar.gz: ad1b76da7a02e9ba92dbd3593311b490d3021a1218dbc122536a7ca946184ef3
3
+ metadata.gz: 2dbbfb5980d35b44932dfad9406e4f98ced962b1d36a95a609152d5d0f29a9f2
4
+ data.tar.gz: 1d11fafb92797d83cb2f032019bbc758a196586364f9f4a94a3f106184c5e3ae
5
5
  SHA512:
6
- metadata.gz: 1ea7a234b2d0e744882349f53f128bb36d39802b0265b4b68ffb6b99f79bdb078ded3e4d5ef49b53b02088f6fccf2b3eff20b9ce7324fb6542ca257ba8df2237
7
- data.tar.gz: 1c4471fcd47583f0a479ef797ed0260202c8ca04e89634e538c560b3058fe89938119216333263e4bceadc948087c001c070d598df1b0badbcf63e9ffcdd0950
6
+ metadata.gz: d45ac39f5ec70b44a6a6c50fa6fe9010b2c8282ed7f5364dc8c76150504f324340c2c2e230dddb4ad1ac1e1bc7396da3a0ab5f0f99f813a14293f4571a1364b6
7
+ data.tar.gz: c5ac12d4a704c7948e0d1c5b84897c3194f4583f0c92d6d189dadb9a37326b8ec550787b4ad60b2c810a248a5bde446d3e668b984d7345317bf59dc615f6d792
@@ -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
@@ -42,7 +42,7 @@
42
42
  - @lead.ctxs.each do |ctx|
43
43
  %li
44
44
  = pp_date( ctx.sent_at ) || 'not sent'
45
- = link_to ctx.subject.presence||"No Subj?!", context_path(ctx)
45
+ = link_to ctx.subject.presence||"No Subj?!", wco_email.context_path(ctx)
46
46
 
47
47
  .col-md-6.schs
48
48
  %h5
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.102
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