wco_models 3.1.0.75 → 3.1.0.77

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: 7ac0ff430c81efd11aced2ffa36e17bd8aebdad6e337ea3ef981adbe6154e35b
4
- data.tar.gz: bc47f58cbac8d53afd585068c2f2de34768176a268126b1f05779c8cda55ec68
3
+ metadata.gz: 75d573c20e2daa8d9ce98511e31788bef7f389ce4c67ff693e10cbd51062a704
4
+ data.tar.gz: aace2791f359a233c5ea2c48fb88e84e17fd6c0d0a92dd6a8e2d581f243de576
5
5
  SHA512:
6
- metadata.gz: b2b311cab305457585ca0a98e9f8381537747a3c2d6b5b407be0c8c0d88615b13292e6849118d81bc16cb30116b20a8a3b65b12f5fd9edb3a91512489333d84e
7
- data.tar.gz: f4484697303ebf15d0f39b35f835911c01ea812336d14ba833d0df4ca7de4fb3ac9b53313cdd328e81c234c64b162c8209d928f6d0952cef7a17b5cec9f5e914
6
+ metadata.gz: 55b718c4db30af9bae6c6448337e1195766ab2efbf6d35df0c1a6be1380de61be33f414cbd17610dbee94882d7c7b9329d4510ffd4c4a64ee73633d7c67d38fd
7
+ data.tar.gz: 8aabf72c5aef2900b195c704ee3875bb31c95ec1cf814f091d09692c9480265cd507ca510e5e48b2e67009b700b83231dc31a6c1ca8778432295155424d8f2a9
@@ -35,12 +35,12 @@ textarea {
35
35
 
36
36
  table.bordered {
37
37
  table-layout:fixed;
38
- width: 100%;
38
+ width: auto; // 100%;
39
39
  word-wrap: break-word;
40
40
 
41
41
  border: 1px solid gray;
42
- border-bottom: 0;
43
- border-right: 0;
42
+ // border-bottom: 0;
43
+ // border-right: 0;
44
44
 
45
45
  th {
46
46
  background: #ddd;
@@ -30,5 +30,10 @@ class WcoEmail::Conversation
30
30
  has_and_belongs_to_many :tags, class_name: 'Wco::Tag'
31
31
  has_and_belongs_to_many :leads, class_name: 'Wco::Lead'
32
32
 
33
+ belongs_to :filter, class_name: 'WcoEmail::EmailFilter', inverse_of: :conversations, optional: true
34
+
35
+ def to_s
36
+ "#{subject} (#{messages.length})"
37
+ end
33
38
  end
34
39
  Conv = WcoEmail::Conversation
@@ -42,5 +42,7 @@ class WcoEmail::EmailFilter
42
42
  belongs_to :email_template, class_name: 'WcoEmail::EmailTemplate', optional: true
43
43
  belongs_to :email_action_template, class_name: 'WcoEmail::EmailActionTemplate', optional: true
44
44
 
45
+ has_many :conversations, class_name: 'WcoEmail::Conversation', inverse_of: :filter
46
+
45
47
  end
46
48
 
@@ -77,6 +77,7 @@ class WcoEmail::Message
77
77
 
78
78
  def apply_filter filter
79
79
  puts! filter, 'WcoEmail::Message#apply_filter'
80
+ conv.filter = filter
80
81
 
81
82
  case filter.kind
82
83
 
@@ -77,9 +77,10 @@ class WcoEmail::MessageStub
77
77
  end
78
78
  conv = in_reply_to_msg.conversation
79
79
  else
80
- conv = WcoEmail::Conversation.find_or_create_by({
80
+ conv = WcoEmail::Conversation.unscoped.find_or_create_by({
81
81
  subject: subject,
82
82
  })
83
+ conv.deleted_at = nil
83
84
  end
84
85
 
85
86
 
@@ -73,13 +73,5 @@
73
73
  %ul
74
74
  - @lead.convs.each do |conv|
75
75
  %li
76
- = link_to conv.subject, wco_email.email_conversation_path( conv )
77
-
78
- -# .row
79
- -# .col-md-6
80
- -# = render 'ish_manager/galleries/index', galleries: @lead.galleries
81
- -# .col-md-6
82
- -# = render 'ish_manager/videos/index', videos: @lead.videos
83
-
84
-
76
+ = link_to conv.subject, wco_email.conversation_path( conv )
85
77
 
data/lib/wco_models.rb CHANGED
@@ -39,3 +39,4 @@ class Wco::HTTParty
39
39
  end
40
40
 
41
41
  ActiveSupport.escape_html_entities_in_json = true
42
+
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.75
4
+ version: 3.1.0.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -435,7 +435,6 @@ files:
435
435
  - app/views/wco/_analytics.erb
436
436
  - app/views/wco/_main_footer.haml
437
437
  - app/views/wco/_main_header.haml
438
- - app/views/wco/_main_header.haml-bk
439
438
  - app/views/wco/_paginate.haml
440
439
  - app/views/wco/_search.haml
441
440
  - app/views/wco/application/_auth_widget.haml
@@ -1,109 +0,0 @@
1
-
2
- .application--main-header.main-header{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
3
-
4
- %i.fa.fa-compress.collapse-expand#collapseHeaderMain
5
- Wco Suite
6
- .container
7
-
8
- %i.fa.fa-compress.collapse-expand#collapseHeaderOffice
9
- Wco Email & CRM
10
- .a
11
- %ul
12
- %li= link_to 'Tags', tags_path
13
- -# %li
14
- -# = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX), class: 'chip'
15
- -# = link_to '[+]', new_email_context_path
16
- %li
17
- = link_to "Tmpls (#{WcoEmail::EmailTemplate.all.length})", email_templates_path
18
- = link_to '[+]', new_email_template_path
19
- %li
20
- = link_to "Companies (#{Leadset.kept.length})", leadsets_path
21
- .inline-search
22
- = form_tag leadsets_path, method: :get do
23
- = text_field_tag :q
24
- = link_to '[+]', new_leadset_path
25
- %li
26
- = link_to "EActions", email_actions_path
27
- = link_to '[+]', new_email_action_path
28
- %ul
29
- %li
30
- = link_to "Filters (#{Office::EmailFilter.active.length})", email_filters_path
31
- = link_to '[+]', new_email_filter_path
32
- %li
33
- = link_to "Ctxs (#{Ctx.notsent.length})", email_contexts_path({ sent: false })
34
- = link_to '[+]', new_email_context_path
35
- %br
36
- = link_to 'summary', email_contexts_summary_path( format: :html )
37
- = link_to '[csv]', email_contexts_summary_path( format: :csv )
38
-
39
- %li
40
- = link_to "Leads (#{Lead.kept.length})", leads_path
41
- .inline-search
42
- = form_tag leads_path, method: :get do
43
- = text_field_tag :q
44
- = link_to '[+]', new_lead_path
45
- %li
46
- = link_to "Schs (#{Sch.active.length})", scheduled_email_actions_path
47
- = link_to '[+]', new_scheduled_email_action_path
48
-
49
- %ul
50
- %li
51
- = link_to 'OLATs', lead_action_templates_path
52
- = link_to '[+]', new_lead_action_template_path
53
- = link_to 'Lead Actions', lead_actions_path
54
-
55
-
56
- %li
57
- = link_to "Campaigns (#{Ish::EmailCampaign.all.length})", email_campaigns_path
58
- = link_to '[+]', new_email_campaign_path
59
- %li
60
- = link_to "OActions (#{Office::Action.all.length})", office_actions_path
61
- = link_to '[+]', new_office_action_path
62
- %li
63
- = link_to 'Unsubs', unsubscribes_path
64
- = link_to 'Analytics', analytics_path
65
-
66
- .c
67
-
68
- %i.fa.fa-compress.collapse-expand#collapseHeaderWco
69
- Wasya Co Rb
70
- .a
71
- %ul
72
- %li
73
- = link_to 'ApplianceTmpl\'s', appliance_tmpls_path
74
- %li
75
- = link_to 'Appliance\'s', appliances_path
76
- %li
77
- = link_to 'Serverhost\'s', serverhosts_path
78
- %ul
79
- %li
80
- = link_to 'Products & Prices', products_path
81
- %li
82
- = link_to 'Subscriptions', subscriptions_path
83
- = link_to '[+]', new_wco_subscription_path
84
- %li
85
- = link_to 'Wco::Leadset\'s', wco_leadsets_path
86
-
87
-
88
- .c
89
-
90
-
91
-
92
- -# %i.fa.fa-compress.collapse-expand#collapseHeaderIro Iro Wor
93
- -# .a
94
- -# %ul
95
- -# %li
96
- -# = link_to 'Alerts', iro_alerts_path
97
- -# = link_to 'Watchers', iro_watchers_path
98
- -# %li
99
- -# = link_to 'Plots', 'http://localhost:3000/iron_warbler/NOPE-1', target: '_blank'
100
- -# %li
101
- -# = link_to 'Purses', iro_purses_path
102
- -# - Iro::Purse.all.map do |p|
103
- -# = "[#{p.id}"
104
- -# = link_to "show", iro_purse_path(p)
105
- -# = link_to "gui", iro_purse_path({ id: p.id, kind: 'show_gameui' })
106
- -# = "]"
107
- -# = link_to '[+]', new_iro_purse_path
108
- -# .c
109
-