wco_email 0.1.1.72 → 0.1.1.73

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: a89ead1c6c8d9ebbe889f41b1774704273e4a5e54331144471886568a15204ca
4
- data.tar.gz: 915da345d487943f28596f7ef3284512f2053376464a8b2b2a2d3ca87325a6fd
3
+ metadata.gz: 126de881448d4a9f4f776b68c39afa8676637b654752390b502f1bb89ed6a30b
4
+ data.tar.gz: 7264f72eb0bde6a68faed340e3eeb1ac4179d27dbd2e2cfc03ebde2e9b10bb17
5
5
  SHA512:
6
- metadata.gz: 2833b5a86c622095f928a651fea62e3f685cd54046729b4c25852305043b7f0658cca71390ebebcb9e3f9f1866cc93a6cfdedb852bcc51b09a637889186aed21
7
- data.tar.gz: dda2f825aa9a2ef1eee37805f387bcfce0d38dd022b0981d3c7f344741f4e00c3db4e88fc1467c2938139f06d37b7ee4036fcf43bf5a56f28e2404bda9730a57
6
+ metadata.gz: 7a18ddfdd69412bac0a35cb7bfae4016d5ab955931329ecab4b22f0b7e1258d2c9119c755be6bf078fd775d2e6341c194767a6e2050eaf5e8939c4dee9006d92
7
+ data.tar.gz: 2e389076abd1dd1c3f01d7afb13764740817e41495ec66f5d3de0dc7a005e44ce9475411b9b6890958a4ae16ad3e34d4b5e73183564e1ed9fa738c260248b057
@@ -22,8 +22,19 @@ class WcoEmail::EmailActionsController < WcoEmail::ApplicationController
22
22
  end
23
23
 
24
24
  def index
25
- @schs = Sch.all
26
- authorize! :index, @schs
25
+ @email_actions = WcoEmail::EmailAction.all
26
+ authorize! :index, @email_actions
27
+ if params[:q]
28
+ email_template_ids = WcoEmail::EmailTemplate.where( slug: /#{params[:q]}/i ).map &:id
29
+ email_action_template_ids = WcoEmail::EmailActionTemplate.any_of(
30
+ { :email_template_id.in => email_template_ids },
31
+ { slug: /#{params[:q]}/i },
32
+ ).map &:id
33
+
34
+ @email_actions = @email_actions.where({
35
+ :email_action_template_id.in => email_action_template_ids,
36
+ })
37
+ end
27
38
  end
28
39
 
29
40
  def new
@@ -3,7 +3,7 @@
3
3
  .header
4
4
  %h2
5
5
  Email Actions
6
- (#{Sch.all.count})
6
+ (#{WcoEmail::EmailAction.all.length})
7
7
  = link_to '[+]', new_email_action_path
8
8
 
9
9
  %table.bordered.data-table
@@ -16,19 +16,19 @@
16
16
  %td.tmpl Email Template
17
17
  %td Perform at
18
18
  %tbody
19
- - @schs.each do |sch|
19
+ - @email_actions.each do |ea|
20
20
  %tr
21
- %td= link_to '[~]', edit_email_action_path(sch)
22
- %td= sch.status == 'active' ? 'Y' : '-'
21
+ %td= link_to '[~]', edit_email_action_path(ea)
22
+ %td= ea.status == 'active' ? 'Y' : '-'
23
23
  %td.email_action_template
24
- = render '/wco_email/email_action_templates/show_cell', tmpl: sch.tmpl
24
+ = render '/wco_email/email_action_templates/show_cell', tmpl: ea.tmpl
25
25
  %td.to
26
- = link_to sch.lead.email, wco.lead_path(sch.lead)
26
+ = link_to ea.lead.email, wco.lead_path(ea.lead)
27
27
  %td.tmpl
28
- = render '/wco_email/email_templates/show_cell', tmpl: sch.tmpl.email_template
28
+ = render '/wco_email/email_templates/show_cell', tmpl: ea.tmpl.email_template
29
29
  %td
30
- = pp_date sch.perform_at.in_time_zone
31
- = pp_time sch.perform_at.in_time_zone
30
+ = pp_date ea.perform_at.in_time_zone
31
+ = pp_time ea.perform_at.in_time_zone
32
32
 
33
33
 
34
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.72
4
+ version: 0.1.1.73
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-04-25 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3