wco_email 0.1.1.70 → 0.1.1.72

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: 249540fd84b0ce5ea99213967d16b3ad3725205977b8c8c58c4403cbc15da633
4
- data.tar.gz: f10a13da33aa7a1d831f8500f1002b10c40f8d6615ef52bfa1706c6904de1689
3
+ metadata.gz: a89ead1c6c8d9ebbe889f41b1774704273e4a5e54331144471886568a15204ca
4
+ data.tar.gz: 915da345d487943f28596f7ef3284512f2053376464a8b2b2a2d3ca87325a6fd
5
5
  SHA512:
6
- metadata.gz: 4fdf651791267e92b665ac6ccf4c209636fb716e66f836fe231b428fafdf92d1db79367b4fec2a826633c40c59633a1cdf633d719ddde13c33be43ade8c046b6
7
- data.tar.gz: 6571ee7fcdbecfc3090cdc15286d34ddeb39f983e83d1bdaffe1ae56bf6d32b9bdb0181512787636a5b0ce4320ca25615d2bd43dd005cf87a6eb2c0d645c670b
6
+ metadata.gz: 2833b5a86c622095f928a651fea62e3f685cd54046729b4c25852305043b7f0658cca71390ebebcb9e3f9f1866cc93a6cfdedb852bcc51b09a637889186aed21
7
+ data.tar.gz: dda2f825aa9a2ef1eee37805f387bcfce0d38dd022b0981d3c7f344741f4e00c3db4e88fc1467c2938139f06d37b7ee4036fcf43bf5a56f28e2404bda9730a57
@@ -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]
@@ -6,17 +6,17 @@
6
6
 
7
7
  .flex-row
8
8
  .flex-row
9
- %label from&nbsp;
9
+ %label From&nbsp;
10
10
  = f.select :from_email, options_for_select( WcoEmail::EmailTemplate.from_emails_list, selected: ctx.from_email ), {}, class: 'select2'
11
- %label &nbsp;to&nbsp;
11
+ %label &nbsp;To&nbsp;
12
12
  = f.select :lead, options_for_select( @leads_list, selected: lead_id ), {}, class: 'select2', required: true
13
13
  .flex-row
14
- %label &nbsp;template&nbsp;
14
+ %label &nbsp;Template&nbsp;
15
15
  = f.select :email_template_id, options_for_select( @email_templates_list, selected: ctx.email_template_id ), {}, class: 'select2', required: true
16
16
  = link_to '[+]', new_email_template_path, target: :_blank
17
- -# .flex-row
18
- -# %label Subject&nbsp;
19
- -# = f.text_field :subject, class: 'w-100', disabled: true
17
+ .flex-row
18
+ %label Subject&nbsp;
19
+ = f.text_field :subject, class: 'w-100' # , disabled: true
20
20
  .field
21
21
  = f.text_area :body, class: 'tinymce'
22
22
  .flex-row
@@ -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
+ [-]
@@ -1,4 +1,8 @@
1
1
 
2
+ -##
3
+ -## 2024-04-13 Before email_filter_condition was introduced
4
+ -##
5
+
2
6
  - url = email_filter.new_record? ? email_filters_path : email_filter_path( email_filter )
3
7
  .email-filters--from
4
8
  = form_for email_filter, url: url, as: :email_filter do |f|
@@ -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'
@@ -0,0 +1,5 @@
1
+
2
+ .emails-ns.email-filters-new.maxwidth
3
+ .header
4
+ %h2.title New2 Email Filter
5
+ = render 'form2', email_filter: @email_filter
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.70
4
+ version: 0.1.1.72
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-13 00:00:00.000000000 Z
11
+ date: 2024-04-25 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