wco_email 0.1.1.77 → 0.1.1.79
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/api/contexts_controller.rb +27 -0
- data/app/controllers/wco_email/api_controller.rb +17 -1
- data/app/views/wco_email/api/contexts/summary.json.jbuilder +7 -0
- data/app/views/wco_email/conversations/_form_mini.haml +10 -0
- data/app/views/wco_email/conversations/show.haml +3 -3
- data/config/routes.rb +2 -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: b58a3dd161717ce20c856f41bba05608f46fea2980a140d0d6682aa1ee9b84ae
|
4
|
+
data.tar.gz: 8b3c97a4be02be686dcaa2191f0406f9f1d97d644e254a28276d938c32754a24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33132c87a7dc0464c73eac0fd3cdb5da973b74d642636840ccf55c623f45f44a6689502ea4fd66f0b098b285fbd1d182fd257cd98ca3a2621917022a99147940
|
7
|
+
data.tar.gz: 49eed8b4e6070bcf562d143f555f360eef874f3abc8b3e062b2dbae3bbf9f6d333e90bb3ec174c50c9c953bb07f0963c40a18906e747687598a417ccf8e728c5
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
class WcoEmail::Api::ContextsController < WcoEmail::ApiController
|
3
|
+
|
4
|
+
# before_action :set_lists
|
5
|
+
|
6
|
+
|
7
|
+
def summary
|
8
|
+
authorize! :summary, WcoEmail::Context
|
9
|
+
@results = WcoEmail::Context.summary
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
##
|
14
|
+
## Private
|
15
|
+
##
|
16
|
+
private
|
17
|
+
|
18
|
+
# def set_lists
|
19
|
+
# @email_layouts_list = WcoEmail::EmailTemplate::LAYOUTS
|
20
|
+
# @email_templates_list = [ [nil, nil] ] + WcoEmail::EmailTemplate.all.map { |tmpl| [ tmpl.slug, tmpl.id ] }
|
21
|
+
# @leads_list = Wco::Lead.list
|
22
|
+
# end
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
end
|
27
|
+
|
@@ -1,8 +1,10 @@
|
|
1
1
|
|
2
2
|
class WcoEmail::ApiController < ActionController::Base
|
3
3
|
|
4
|
-
before_action :check_credentials
|
4
|
+
before_action :check_credentials, only: [ :create_email_message ]
|
5
|
+
before_action :decode_jwt, except: [ :create_email_message ]
|
5
6
|
skip_before_action :verify_authenticity_token
|
7
|
+
layout false
|
6
8
|
|
7
9
|
def create_email_message
|
8
10
|
# puts! params, 'params'
|
@@ -28,4 +30,18 @@ class WcoEmail::ApiController < ActionController::Base
|
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
33
|
+
def decode_jwt
|
34
|
+
if Rails.env.test?
|
35
|
+
sign_in User.find_by({ email: 'victor@wasya.co' })
|
36
|
+
return
|
37
|
+
end
|
38
|
+
|
39
|
+
out = JWT.decode params[:jwt_token], nil, false
|
40
|
+
email = out[0]['email']
|
41
|
+
user = User.find_by({ email: email })
|
42
|
+
puts! user, 'user'
|
43
|
+
|
44
|
+
sign_in user
|
45
|
+
end
|
46
|
+
|
31
47
|
end
|
@@ -5,13 +5,13 @@
|
|
5
5
|
.conversations-list
|
6
6
|
= check_box_tag 'conversation_ids[]', @conversation.id.to_s, true, { class: 'i-sel', disabled: true }
|
7
7
|
.conversations-show.maxwidth
|
8
|
+
= render '/wco_email/conversations/form_mini', conversation: @conversation
|
9
|
+
|
8
10
|
%h5
|
9
|
-
= @conversation.subject
|
10
11
|
<b>(#{@messages.length})</b>
|
11
|
-
= link_to '[~]', edit_conversation_path(@conversation)
|
12
12
|
%span.gray.mini= @conversation.id
|
13
|
+
= render '/wco/tags/index_chips', tags: @conversation.tags, config: { skip_checkbox: true }
|
13
14
|
|
14
|
-
= render '/wco/tags/index_chips', tags: @conversation.tags
|
15
15
|
= render '/wco_email/conversations/tags_actions'
|
16
16
|
= render '/wco/leads/index_chips', leads: @conversation.leads
|
17
17
|
= render '/wco/leadsets/index_chips', leadsets: @conversation.leadsets
|
data/config/routes.rb
CHANGED
@@ -6,6 +6,8 @@ WcoEmail::Engine.routes.draw do
|
|
6
6
|
get 'analytics', to: 'application#analytics'
|
7
7
|
get 'tinymce', to: 'application#tinymce', as: :application_tinymce
|
8
8
|
|
9
|
+
get 'api/contexts/summary', to: '/wco_email/api/contexts#summary'
|
10
|
+
|
9
11
|
get 'conversations/in/:tagname', to: '/wco_email/conversations#index', as: :conversations_in
|
10
12
|
get 'conversations/not-in/:tagname_not', to: '/wco_email/conversations#index', as: :conversations_not_in
|
11
13
|
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.
|
4
|
+
version: 0.1.1.79
|
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-08-
|
11
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -309,6 +309,7 @@ files:
|
|
309
309
|
- app/assets/stylesheets/wco_email/logs.scss
|
310
310
|
- app/assets/stylesheets/wco_email/messages.scss
|
311
311
|
- app/assets/stylesheets/wco_email/tags.scss
|
312
|
+
- app/controllers/wco_email/api/contexts_controller.rb
|
312
313
|
- app/controllers/wco_email/api_controller.rb
|
313
314
|
- app/controllers/wco_email/application_controller.rb
|
314
315
|
- app/controllers/wco_email/contexts_controller.rb
|
@@ -366,6 +367,7 @@ files:
|
|
366
367
|
- app/views/wco_email/_analytics.erb
|
367
368
|
- app/views/wco_email/_main_header.haml
|
368
369
|
- app/views/wco_email/_sidebar.haml
|
370
|
+
- app/views/wco_email/api/contexts/summary.json.jbuilder
|
369
371
|
- app/views/wco_email/contexts/_form.haml
|
370
372
|
- app/views/wco_email/contexts/_form_reply.haml
|
371
373
|
- app/views/wco_email/contexts/_header.haml
|
@@ -378,6 +380,7 @@ files:
|
|
378
380
|
- app/views/wco_email/contexts/summary.csv.erb
|
379
381
|
- app/views/wco_email/contexts/summary.haml
|
380
382
|
- app/views/wco_email/conversations/_form.haml
|
383
|
+
- app/views/wco_email/conversations/_form_mini.haml
|
381
384
|
- app/views/wco_email/conversations/_search.haml
|
382
385
|
- app/views/wco_email/conversations/_tags_actions.haml
|
383
386
|
- app/views/wco_email/conversations/edit.haml
|