wco_email 0.1.1.71 → 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: d19500786f1ed1265575707c15d0692ef028bce2787bb319bd79fb9fa565843c
4
- data.tar.gz: 7db5eb86566d1bfc24a191a6d5f95779be918789e83fb137270d98bb39f4f523
3
+ metadata.gz: a89ead1c6c8d9ebbe889f41b1774704273e4a5e54331144471886568a15204ca
4
+ data.tar.gz: 915da345d487943f28596f7ef3284512f2053376464a8b2b2a2d3ca87325a6fd
5
5
  SHA512:
6
- metadata.gz: 34f610f692aa355f5bb27b1f78078b674a7aa462fc10103d25b2267dbfe14b95da8ed1a3879375f42e38c443b9ca2e3fbdc4f67d14c8b89ce8966bcba350d296
7
- data.tar.gz: 0c29c54a11eb251087e12571e127a7569f6ded7fef5b9e406ca7d269c19a8be0555aafc6dcaf3b99db162d62286248e6c0f29cff4be1e9fd7b2f0b9159c9063f
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]
@@ -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.71
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