wco_email 0.1.1.116 → 0.1.1.117

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: d540b4d180387eb9c8b20e77a1aa6f394f5e0ec35ca540dca9c81529c115d0e2
4
- data.tar.gz: d3ebe46e5165897be224c4eeab7e74119732b9bb7e1c276f5a9dc8460102c590
3
+ metadata.gz: ec62edaefde7f02c66548edb5178e5a178c97aa11f570dbcd26e8b0252a25a8f
4
+ data.tar.gz: 186a42fa6d54d069c10216a3976949ef487381d8b1b21282c388482f1bacb58c
5
5
  SHA512:
6
- metadata.gz: befcb0afc5638bca4fbdca5c6ff67289b96b5a5d842b483d33fc55ef2195129765c557b95d53484ae278eaca0cbb19bde347bf9288173f634fa9ab0b7ed0e331
7
- data.tar.gz: f41dbf64f8ad2e2679d75f5bd0706115871a2943533a8274172f61ba1e1dfa8c7a4ae06efd0462d1bc9bd3103b206a0a5291975c960348c63a515185e8b5d6b5
6
+ metadata.gz: '09eb81d24cedae7fd885149f1cb5ed455b8436665ce1058c91541aaafc04e8041bceb470bfa30c5ae87a7d0cc051e57fb1243f9bb6a211a658ad77b3a19a2ebc'
7
+ data.tar.gz: f0c32984b659fbf98700562df9beabfc5e291d5366cb8c1ec750b46729de307f7835743b3d8baa193b7f8f415cc49a3358609380d07b184588571be05465ed41
@@ -8,6 +8,7 @@ class WcoEmail::Api::EmailFiltersController < WcoEmail::ApiController
8
8
  if @item.save
9
9
  render json: { id: @item.id.to_s }, status: :ok
10
10
  else
11
+ puts! @item.errors.full_messages, 'could not api-create EmailFilter'
11
12
  render json: { messages: @item.errors.full_messages }, status: 400
12
13
  end
13
14
  end
@@ -59,9 +60,9 @@ class WcoEmail::Api::EmailFiltersController < WcoEmail::ApiController
59
60
 
60
61
  def email_filter_pparams
61
62
  params[:email_filter].permit({
62
- actions_attributes: [ :id, :_destroy, :kind, :value ],
63
- conditions_attributes: [ :id, :_destroy, :field, :operator, :value ],
64
- skip_conditions_attributes: [ :id, :_destroy, :field, :operator, :value ],
63
+ actions_attributes: [ :aject_id, :aject_type, :id, :_destroy, :kind, :value ],
64
+ conditions_attributes: [ :id, :_destroy, :field, :operator, :value ],
65
+ skip_conditions_attributes: [ :aject_id, :aject_type, :id, :_destroy, :field, :operator, :value ],
65
66
  })
66
67
  end
67
68
 
@@ -1,19 +1,23 @@
1
1
 
2
- Wco::Obf ||= Wco::ObfuscatedRedirect
2
+ # Wco::Obf ||= Wco::ObfuscatedRedirect
3
3
 
4
4
  class WcoEmail::ApplicationController < Wco::ApplicationController
5
5
 
6
6
  layout 'wco_email/application'
7
7
 
8
+ before_action :set_lists
9
+
10
+ def config_page
11
+ authorize! :config, WcoEmail
12
+ end
8
13
 
9
14
  ##
10
15
  ## private
11
16
  ##
12
17
  private
13
18
 
14
-
15
- def set_lists
16
- @tags_list = Wco::Tag.list
17
- end
19
+ # def set_lists
20
+ # super
21
+ # end
18
22
 
19
23
  end
@@ -0,0 +1,65 @@
1
+
2
+ class WcoEmail::ConfigsController < WcoEmail::ApplicationController
3
+ before_action :set_config, only: %i[show edit update destroy]
4
+
5
+ def index
6
+ @configs = WcoEmail::Config.all
7
+ authorize! :index, WcoEmail::Config
8
+ end
9
+
10
+ def show
11
+ authorize! :index, WcoEmail::Config
12
+ end
13
+
14
+ def new
15
+ @config = WcoEmail::Config.new
16
+ authorize! :index, WcoEmail::Config
17
+ end
18
+
19
+ def edit
20
+ authorize! :index, WcoEmail::Config
21
+ end
22
+
23
+ def create
24
+ @config = WcoEmail::Config.new(config_params)
25
+ authorize! :index, WcoEmail::Config
26
+
27
+ if @config.save
28
+ flash[:notice] = 'Success.'
29
+ redirect_to action: 'index'
30
+ else
31
+ render :new, status: :unprocessable_entity
32
+ end
33
+ end
34
+
35
+ def update
36
+ authorize! :index, WcoEmail::Config
37
+ if @config.update(config_params)
38
+ flash[:notice] = 'Success.'
39
+ redirect_to action: 'index'
40
+ else
41
+ render :edit, status: :unprocessable_entity
42
+ end
43
+ end
44
+
45
+ def destroy
46
+ authorize! :index, WcoEmail::Config
47
+ @config.destroy
48
+ redirect_to action: 'index'
49
+ end
50
+
51
+ ##
52
+ ## private
53
+ ##
54
+ private
55
+
56
+ def set_config
57
+ @config = WcoEmail::Config.find(params[:id])
58
+ rescue Mongoid::Errors::DocumentNotFound
59
+ redirect_to wco_email.configs_path, alert: 'Config not found'
60
+ end
61
+
62
+ def config_params
63
+ params.require(:config).permit(:key, :value, :descr)
64
+ end
65
+ end
@@ -115,11 +115,11 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
115
115
  end
116
116
 
117
117
  def set_lists
118
+ super
119
+
118
120
  @email_templates_list = [ [nil, nil] ] + WcoEmail::EmailTemplate.all.map { |tmpl| [ tmpl.slug, tmpl.id ] }
119
121
  @leads_list = Wco::Lead.list
120
122
  @office_action_templates_list = Wco::OfficeActionTemplate.list
121
- @tags = Wco::Tag.all
122
- @tags_list = Wco::Tag.list
123
123
  end
124
124
 
125
125
  end
@@ -8,26 +8,18 @@
8
8
  %li= link_to 'Inbox', conversations_in_path('inbox')
9
9
  %li
10
10
  = link_to 'Stubs', wco_email.message_stubs_path
11
- (#{WcoEmail::MessageStub.pending.length})
11
+ (pending:#{WcoEmail::MessageStub.pending.length})
12
12
  (#{WcoEmail::MessageStub.all.length})
13
13
  = link_to '[+]', wco_email.new_message_stub_path
14
14
  %li= render '/wco_email/email_templates/header'
15
- %li= render '/wco_email/email_campaigns/header'
16
15
  %li= render '/wco_email/email_filters/main_header'
17
16
  %li= render '/wco_email/contexts/header'
18
- %li= render '/wco/unsubscribes/header'
19
-
20
-
17
+ -# %li= render '/wco/unsubscribes/header'
21
18
 
22
19
  %ul
23
20
  %li= render '/wco_email/email_action_templates/header'
24
21
  %li= render '/wco_email/email_actions/header'
25
- %li= render '/wco/obfuscated_redirects/header'
26
-
27
- -# %li= render '/wco_email/lead_action_templates/header'
28
- -# %li= render '/wco_email/lead_actions/header'
29
-
30
- -# %li
31
- -# = link_to "OActions (#{Wco::OfficeAction.all.length})", office_actions_path
32
- -# = link_to '[+]', new_office_action_path
22
+ %li= render '/wco_email/email_campaigns/header'
33
23
 
24
+ %ul
25
+ %li= link_to 'Email Config', wco_email.configs_path
@@ -1,5 +1,13 @@
1
1
 
2
2
  .application--sidebar
3
+ sidebar tags
4
+ = link_to '[+]', wco.new_sidebar_tag_path
5
+ (#{@sidebar_tags.length}):
6
+ %ul.mr-2
7
+ - @sidebar_tags.each do |si_tag|
8
+ %li.text-nowrap= link_to si_tag, wco.tag_show2_path(si_tag)
9
+
10
+ all tags:
3
11
  %ul.tags-list
4
12
  - @tags.each do |tag|
5
13
  %li
@@ -0,0 +1,23 @@
1
+
2
+ = form_for @config do |form|
3
+ - if @config.errors.any?
4
+ .error-explanation
5
+ %h2= "#{pluralize(@config.errors.count, 'error')} prohibited this config from being saved:"
6
+ %ul
7
+ - @config.errors.full_messages.each do |message|
8
+ %li= message
9
+
10
+ .field
11
+ = form.label :key
12
+ = form.text_field :key
13
+
14
+ .field
15
+ = form.label :value
16
+ = form.text_field :value
17
+
18
+ .field
19
+ = form.label :descr
20
+ = form.text_area :descr
21
+
22
+ .actions
23
+ = form.submit
@@ -0,0 +1,6 @@
1
+
2
+ .configs-edit
3
+ %h1 Edit Config
4
+ = render 'form'
5
+
6
+ = link_to 'Back', wco_email.configs_path
@@ -0,0 +1,24 @@
1
+
2
+ .configs-index.maxwidth
3
+ %h5.text-center
4
+ Configurations
5
+
6
+ %table.bordered
7
+ %thead
8
+ %tr
9
+ %th Key
10
+ %th Value
11
+ %th Description
12
+
13
+ %tbody
14
+ - @configs.each do |config|
15
+ %tr
16
+ %td= config.key
17
+ %td= config.value
18
+ %td= config.descr
19
+ %td.actions
20
+ = link_to 'Show', wco_email.config_path(config)
21
+ = link_to 'Edit', wco_email.edit_config_path(config)
22
+ = link_to 'Destroy', wco_email.config_path(config), method: :delete, data: { confirm: 'Are you sure?' }
23
+
24
+ = link_to 'New Config', wco_email.new_config_path
@@ -0,0 +1,7 @@
1
+
2
+ .configs-new
3
+ %h1 New Config
4
+ = render 'form'
5
+
6
+ = link_to 'Back', wco_email.configs_path
7
+
@@ -23,7 +23,7 @@
23
23
  .col-4
24
24
  %label cc
25
25
  = f.text_field :cc, class: 'w-100'
26
- bcc: #{DEFAULT_BCC}
26
+ -# bcc: #{DEFAULT_BCC}
27
27
 
28
28
  .flex-row
29
29
  = f.label :subject
@@ -1,21 +1,21 @@
1
1
 
2
2
  - content_for :sidebar do
3
- = render 'wco_email/sidebar'
3
+ = render 'wco/sidebar'
4
4
 
5
5
  .conversations-index
6
6
  = render '/wco_email/conversations/search'
7
7
 
8
8
  .header
9
9
  %h5.title
10
- - if @tag
11
- Tag `#{@tag}`
12
- - if @tag_not
13
- Tag-not `#{@tag_not}`
10
+ - if params[:tagname]
11
+ Tag `#{params[:tagname]}`
12
+ - if params[:tagname_not]
13
+ Tag-not `#{params[:tagname_not]}`
14
14
  (#{@conversations.length})
15
15
 
16
16
  = render '/wco_email/conversations/tags_actions'
17
17
  = render '/wco/office_actions/actions'
18
18
 
19
- = render '/wco/paginate', resource: @conversations, param_name: :conv_page
19
+ = render '/wco/paginate', resource: @conversations, param_name: ::WcoEmail::Conversation::PAGE_PARAM_NAME
20
20
  = render '/wco_email/conversations/table', convs: @conversations
21
- = render '/wco/paginate', resource: @conversations, param_name: :conv_page
21
+ = render '/wco/paginate', resource: @conversations, param_name: ::WcoEmail::Conversation::PAGE_PARAM_NAME
@@ -1,6 +1,6 @@
1
1
 
2
2
  - content_for :sidebar do
3
- = render 'wco_email/sidebar'
3
+ = render 'wco/sidebar'
4
4
 
5
5
  .conversations-list
6
6
  = check_box_tag 'conversation_ids[]', @conversation.id.to_s, true, { class: 'i-sel', disabled: true }
data/config/routes.rb CHANGED
@@ -19,6 +19,8 @@ WcoEmail::Engine.routes.draw do
19
19
 
20
20
  post 'api/messages/from-postal/:secret', to: '/wco_email/api/messages#create_postal'
21
21
 
22
+ resources :configs
23
+
22
24
  get 'conversations/in/:tagname', to: '/wco_email/conversations#index', as: :conversations_in
23
25
  get 'conversations/not-in/:tagname_not', to: '/wco_email/conversations#index', as: :conversations_not_in
24
26
  get 'conversations/:id', to: '/wco_email/conversations#show', as: :conversation
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.116
4
+ version: 0.1.1.117
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-04 00:00:00.000000000 Z
11
+ date: 2026-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -317,6 +317,7 @@ files:
317
317
  - app/controllers/wco_email/api/messages_controller.rb
318
318
  - app/controllers/wco_email/api_controller.rb
319
319
  - app/controllers/wco_email/application_controller.rb
320
+ - app/controllers/wco_email/configs_controller.rb
320
321
  - app/controllers/wco_email/contexts_controller.rb
321
322
  - app/controllers/wco_email/conversations_controller.rb
322
323
  - app/controllers/wco_email/email_action_templates_controller.rb
@@ -372,7 +373,7 @@ files:
372
373
  - app/views/layouts/wco_email/application.haml
373
374
  - app/views/wco_email/_analytics.erb
374
375
  - app/views/wco_email/_main_header.haml
375
- - app/views/wco_email/_sidebar.haml
376
+ - app/views/wco_email/_sidebar.haml.bk
376
377
  - app/views/wco_email/api/contexts/summary.json.jbuilder
377
378
  - app/views/wco_email/api/conversations/index.json.jbuilder
378
379
  - app/views/wco_email/api/email_action_templates/index.json.jbuilder
@@ -381,6 +382,10 @@ files:
381
382
  - app/views/wco_email/api/email_filters/index.json.jbuilder
382
383
  - app/views/wco_email/api/email_filters/show.json.jbuilder
383
384
  - app/views/wco_email/api/email_templates/index.json.jbuilder
385
+ - app/views/wco_email/configs/_form.haml
386
+ - app/views/wco_email/configs/edit.haml
387
+ - app/views/wco_email/configs/index.haml
388
+ - app/views/wco_email/configs/new.haml
384
389
  - app/views/wco_email/contexts/_form.haml
385
390
  - app/views/wco_email/contexts/_form_reply.haml
386
391
  - app/views/wco_email/contexts/_header.haml
@@ -450,8 +455,6 @@ files:
450
455
  - app/views/wco_email/email_templates/new.haml
451
456
  - app/views/wco_email/email_templates/show.haml
452
457
  - app/views/wco_email/email_templates/show_iframe.haml
453
- - app/views/wco_email/lead_action_templates/_header.haml
454
- - app/views/wco_email/lead_actions/_header.haml
455
458
  - app/views/wco_email/message_stubs/_form.haml
456
459
  - app/views/wco_email/message_stubs/_index.haml
457
460
  - app/views/wco_email/message_stubs/_index_table.haml
@@ -1,7 +0,0 @@
1
-
2
- = link_to "Lead Action Tmpls (#{WcoEmail::LeadActionTemplate.all.length})", lead_action_templates_path
3
- .inline-search
4
- = form_tag lead_action_templates_path, method: :get do
5
- = text_field_tag :q
6
- = link_to '[+]', new_lead_action_template_path
7
-
@@ -1,8 +0,0 @@
1
-
2
-
3
-
4
- = link_to "Lead Actions (#{WcoEmail::LeadAction.all.length})", lead_actions_path
5
- .inline-search
6
- = form_tag lead_actions_path, method: :get do
7
- = text_field_tag :q
8
- = link_to '[+]', new_lead_action_path