wco_models 3.1.0.272 → 3.1.0.275

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: 5f7c6d7f6185fa8c1518b2dd96978eb2c7d17ad603adadf04689b0b841af2b65
4
- data.tar.gz: e0f12b129a69a1a1874c4801626ca1739d91dc4e59459f9102ddd3168444a806
3
+ metadata.gz: d5df9cb4bcb4f460b4cc64878583e88e60d82079b8bc0215a017eed561f7bd41
4
+ data.tar.gz: 8104ce3a762d78d9d11d15790feb8949ed5d5cec9c08515cc0f8eabca99412c1
5
5
  SHA512:
6
- metadata.gz: 00f46e4df9282b9d6ad131c86b8e40e8d7b0ed6fa1a772b7007e6b368a7d45879100d1e692ac0bc869db9fe1240610156fc65b73b554a8b432b8bb9dae9c85f0
7
- data.tar.gz: dbd1e01bf63728257c2c2c785ef4faa804da63d0f8a2904d6b3fdde7f54481d9f3246ba18b50b87921fdb60e9d373814dbc3b4898d3fb642c350dd8fb9f66abd
6
+ metadata.gz: 57173b9190a08c917608dd776ad1295bb3e191ec7ceb1f7db060e020860c08e8594fd6fd1c367dd433f9ef91730f4b6d835ded25d11667e1740da2c54d44eea0
7
+ data.tar.gz: 81b65826be767a52cf854d9abf484e16165bfac7ac3259a1d0ae40cbe88f870d50ab0b80fcc88687e5da509deaf7a7515db71288a4aec8a6825e75144de75a31
@@ -121,6 +121,8 @@ class Wco::TagsController < Wco::ApplicationController
121
121
  @leadsets = @tag.leadsets.page( params[::Wco::Leadset::PAGE_PARAM_NAME] ).per( current_profile.per_page )
122
122
  @reports = @tag.reports.page( params[:reports_page] ).per( current_profile.per_page )
123
123
 
124
+ @conversations, @messages, _ = WcoEmail::Conversation.load_conversations_messages_tag_by_params_and_profile( {tagname: @tag.slug}, current_profile )
125
+
124
126
  # render params['template'] || 'show'
125
127
  end
126
128
 
@@ -5,7 +5,7 @@ class WcoEmail::Conversation
5
5
  include Mongoid::Paranoia
6
6
  store_in collection: 'office_email_conversations'
7
7
 
8
- PAGE_PARAM_NAME = 'conversations_page'
8
+ PAGE_PARAM_NAME = 'conv_page'
9
9
 
10
10
  STATUS_UNREAD = 'status_unread'
11
11
  STATUS_READ = 'status_read'
@@ -24,6 +24,13 @@ class WcoEmail::EmailFilterAction
24
24
  belongs_to :aject, polymorphic: true # , optional: true # eg tag, EAT, OAT
25
25
  accepts_nested_attributes_for :aject, allow_destroy: true, reject_if: :all_blank
26
26
  # validates :aject_id, presence: true
27
+ def email_template
28
+ if aject.class == WcoEmail::EmailTemplate
29
+ return aject
30
+ else
31
+ throw 'this email_filter_action does not have an email_template'
32
+ end
33
+ end
27
34
 
28
35
  ## 2026-04-02 not anymore.
29
36
  # before_validation :check_value
@@ -102,6 +102,16 @@ class WcoEmail::Message
102
102
  config: config,
103
103
  })
104
104
 
105
+ when WcoEmail::EmailFilterAction::KIND_AUTORESPOND
106
+ ctx = WcoEmail::Context.new({
107
+ email_template: action.email_template,
108
+ lead_id: message.lead_id,
109
+ send_at: Time.now,
110
+ })
111
+ if action.email_template.respond_inline
112
+ ctx.reply_to_message_id = self.id
113
+ end
114
+ ctx.save!
105
115
 
106
116
  end
107
117
  end
@@ -24,10 +24,13 @@
24
24
 
25
25
  - if defined?( wco_email )
26
26
 
27
- - if @tag.conversations.present?
27
+ - if @conversations.present?
28
28
  %i.fa.fa-compress.collapse-expand#conversations
29
- Conversations (#{@tag.conversations.length}):
30
- .descr= render '/wco_email/conversations/table', convs: @tag.conversations.page( params[::WcoEmail::Conversation::PAGE_PARAM_NAME] )
29
+ Conversations (#{@conversations.length}):
30
+ .descr
31
+ = render '/wco/paginate', resource: @conversations, param_name: ::WcoEmail::Conversation::PAGE_PARAM_NAME
32
+ = render '/wco_email/conversations/table', convs: @conversations
33
+ = render '/wco/paginate', resource: @conversations, param_name: ::WcoEmail::Conversation::PAGE_PARAM_NAME
31
34
 
32
35
  - if @tag.email_templates.present?
33
36
  %hr
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.272
4
+ version: 3.1.0.275
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev