wco_email 0.1.1.71 → 0.1.1.73
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/wco_email/email_actions_controller.rb +13 -2
- data/app/controllers/wco_email/email_filters_controller.rb +6 -0
- data/app/views/wco_email/email_actions/index.haml +9 -9
- data/app/views/wco_email/email_filter_conditions/_form.haml +12 -0
- data/app/views/wco_email/email_filters/_form.haml +4 -0
- data/app/views/wco_email/email_filters/_form2.haml +46 -0
- data/app/views/wco_email/email_filters/new2.haml +5 -0
- data/config/routes.rb +4 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 126de881448d4a9f4f776b68c39afa8676637b654752390b502f1bb89ed6a30b
|
4
|
+
data.tar.gz: 7264f72eb0bde6a68faed340e3eeb1ac4179d27dbd2e2cfc03ebde2e9b10bb17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
@
|
26
|
-
authorize! :index, @
|
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
|
@@ -41,6 +41,12 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
|
|
41
41
|
@email_filter = WcoEmail::EmailFilter.new
|
42
42
|
authorize! :new, @email_filter
|
43
43
|
end
|
44
|
+
def new2
|
45
|
+
@email_filter = WcoEmail::EmailFilter.new
|
46
|
+
authorize! :new, @email_filter
|
47
|
+
|
48
|
+
@new_email_filter_condition = WcoEmail::EmailFilterCondition.new
|
49
|
+
end
|
44
50
|
|
45
51
|
def show
|
46
52
|
@email_filter = WcoEmail::EmailFilter.find params[:id]
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.header
|
4
4
|
%h2
|
5
5
|
Email Actions
|
6
|
-
(#{
|
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
|
-
- @
|
19
|
+
- @email_actions.each do |ea|
|
20
20
|
%tr
|
21
|
-
%td= link_to '[~]', edit_email_action_path(
|
22
|
-
%td=
|
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:
|
24
|
+
= render '/wco_email/email_action_templates/show_cell', tmpl: ea.tmpl
|
25
25
|
%td.to
|
26
|
-
= link_to
|
26
|
+
= link_to ea.lead.email, wco.lead_path(ea.lead)
|
27
27
|
%td.tmpl
|
28
|
-
= render '/wco_email/email_templates/show_cell', tmpl:
|
28
|
+
= render '/wco_email/email_templates/show_cell', tmpl: ea.tmpl.email_template
|
29
29
|
%td
|
30
|
-
= pp_date
|
31
|
-
= pp_time
|
30
|
+
= pp_date ea.perform_at.in_time_zone
|
31
|
+
= pp_time ea.perform_at.in_time_zone
|
32
32
|
|
33
33
|
|
34
34
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
.d-flex
|
3
|
+
.field
|
4
|
+
%label Field
|
5
|
+
= f.select :field, options_for_select(WcoEmail::EmailFilter::FIELD_OPTS)
|
6
|
+
.field
|
7
|
+
%label Matchtype
|
8
|
+
= f.select :matchtype, options_for_select(WcoEmail::EmailFilter::MATCHTYPE_OPTS)
|
9
|
+
.field
|
10
|
+
%label Value
|
11
|
+
= f.text_field :value
|
12
|
+
[-]
|
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
-##
|
3
|
+
-## 2024-04-13 Introducing email_filter_condition
|
4
|
+
-##
|
5
|
+
|
6
|
+
- url = email_filter.new_record? ? email_filters_path : email_filter_path( email_filter )
|
7
|
+
.email-filters--from.maxwidth
|
8
|
+
= form_for email_filter, url: url, as: :email_filter do |f|
|
9
|
+
|
10
|
+
%p If
|
11
|
+
- f.fields_for( :email_filter_conditions ) do |f_cond|
|
12
|
+
= render '/wco_email/email_filter_conditions/form', f: f_cond
|
13
|
+
= form_for @new_email_filter_condition do |ff|
|
14
|
+
= render '/wco_email/email_filter_conditions/form', f: ff
|
15
|
+
|
16
|
+
.d-flex [+]
|
17
|
+
%p Skip
|
18
|
+
- email_filter.email_filter_skip_conditions.each do |f_cond|
|
19
|
+
.d-flex
|
20
|
+
.field
|
21
|
+
%label Field
|
22
|
+
= f_cond.select :field, options_for_select(WcoEmail::EmailFilter::FIELD_OPTS, selected: f_cond.field)
|
23
|
+
.field
|
24
|
+
%label Matchtype
|
25
|
+
= f_cond.select :matchtype, options_for_select(WcoEmail::EmailFilter::MATCHTYPE_OPTS, selected: f_cond.matchtype)
|
26
|
+
.field
|
27
|
+
%label Value
|
28
|
+
= f_cond.text_field :value
|
29
|
+
[-]
|
30
|
+
.d-flex [+]
|
31
|
+
%p Then [test]
|
32
|
+
- email_filter.action_tmpls.each do |f_act_tmpl|
|
33
|
+
.d-flex
|
34
|
+
%label Office Action
|
35
|
+
.field
|
36
|
+
%label slug
|
37
|
+
= f_act_tmpl.slug
|
38
|
+
.field
|
39
|
+
%label config
|
40
|
+
= f_act_tmpl.text_area :config
|
41
|
+
[-]
|
42
|
+
.d-flex [+]
|
43
|
+
[perform]
|
44
|
+
|
45
|
+
.actions
|
46
|
+
= f.submit 'Go'
|
data/config/routes.rb
CHANGED
@@ -26,7 +26,11 @@ WcoEmail::Engine.routes.draw do
|
|
26
26
|
get 'contexts/summary', to: 'contexts#summary'
|
27
27
|
post 'contexts/send_immediate/:id', to: 'contexts#send_immediate', as: :send_context
|
28
28
|
resources :contexts
|
29
|
+
|
30
|
+
get 'email_filters/new2', to: 'email_filters#new2'
|
29
31
|
resources :email_filters
|
32
|
+
resources :email_filter_conditions
|
33
|
+
|
30
34
|
get 'email_templates/:id/iframe', to: 'email_templates#show_iframe', as: :email_template_iframe
|
31
35
|
resources :email_templates
|
32
36
|
|
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.
|
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-
|
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
|
@@ -401,11 +401,14 @@ files:
|
|
401
401
|
- app/views/wco_email/email_campaigns/index.haml
|
402
402
|
- app/views/wco_email/email_campaigns/new.haml
|
403
403
|
- app/views/wco_email/email_campaigns/show.haml
|
404
|
+
- app/views/wco_email/email_filter_conditions/_form.haml
|
404
405
|
- app/views/wco_email/email_filters/_form.haml
|
406
|
+
- app/views/wco_email/email_filters/_form2.haml
|
405
407
|
- app/views/wco_email/email_filters/_header.haml
|
406
408
|
- app/views/wco_email/email_filters/edit.haml
|
407
409
|
- app/views/wco_email/email_filters/index.haml
|
408
410
|
- app/views/wco_email/email_filters/new.haml
|
411
|
+
- app/views/wco_email/email_filters/new2.haml
|
409
412
|
- app/views/wco_email/email_filters/show.haml
|
410
413
|
- app/views/wco_email/email_templates/_form.haml
|
411
414
|
- app/views/wco_email/email_templates/_form_mini.haml
|