wco_models 3.1.0.99 → 3.1.0.101

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: 68432c9fa2f3adfc44a984725755a6d4c24f8fb5d74f43d86105534123476bf9
4
- data.tar.gz: 2b06c258ba1ce9398fca79563825afc6163773aaf504d50ea9358e26251c0ba1
3
+ metadata.gz: d23c6a2b915f500b326bb8679196f05a144a3a200446e58c4f565c1be37b8f0f
4
+ data.tar.gz: 0307c5db1942f9a6c23b5a826b6bbefdf8b9dc29fe6f9cdd0663d0c048255251
5
5
  SHA512:
6
- metadata.gz: 7c14b5ad9a168631385b65f112fa725f03f42e8b615f9c42d1496c0976fe0c2a6d723f2eb133ccb9c6554334f3578807cfd62fa213477c660963b3e62660a21b
7
- data.tar.gz: 6dc918ba8b44f12b696614bfd4a127b0da3591f6f32ae58b623471742563f99d0a1fc02f38f5c42668d57d4b69bfc94175fc5d4d88446602bfd25cdf765848f5
6
+ metadata.gz: d2b93bc41ad17f3eded7a68900fdd52c23b31b8b57c6d3a6eaab59fe63e8273fdbab105272e26c22291d6ac2c777fca2b5939610335f5ab9d02b59778d103f86
7
+ data.tar.gz: f82a524c883c96e1ade3f28416c542eb110647b6264c93672b1f2505668cb7ff1a3c0a826e34ac026e4d0d34173340cdf3fbbdcf95cbedde2df408dfc343d8bf
@@ -12,8 +12,6 @@
12
12
  //= require vendor/jquery.fileupload
13
13
  //= require vendor/jquery-ui.min
14
14
  //
15
- // require select2
16
- //
17
15
  // require ./alerts-notices
18
16
  // require ./collapse-expand
19
17
  // require ./file_upload
@@ -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
@@ -67,10 +67,14 @@ class WcoHosting::ApplianceTmpl
67
67
 
68
68
  has_many :subscriptions, as: :product, class_name: 'Wco::Subscription'
69
69
 
70
+ field :product_id # stripe
71
+
70
72
  # belongs_to :price, class_name: 'Wco::Price', foreign_key: :wco_price_id
71
73
  has_one :price, as: :product, class_name: 'Wco::Price'
72
74
  field :price_id # stripe
73
75
 
74
-
76
+ def to_s
77
+ "#{kind}-#{version}"
78
+ end
75
79
  end
76
80
  AppTmpl = WcoHosting::ApplianceTmpl
@@ -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.99
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