wco_models 3.1.0.131 → 3.1.0.133
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 +4 -4
- data/app/controllers/wco/api/leads_controller.rb +9 -0
- data/app/controllers/wco/api_controller.rb +19 -0
- data/app/controllers/wco/leads_controller.rb +2 -5
- data/app/views/wco/api/leads/index_hash.jbuilder +8 -0
- data/app/views/wco/leads/show.haml +2 -0
- data/config/routes.rb +6 -2
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08e95dc229ad1424fb5712f08008e7c36011c34d1185ea68ab62d427d2165459'
|
4
|
+
data.tar.gz: a315d6d0595e141555526012f89a0e9548c0a61f5107441b29ba0f8161414b28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fc514ec8dffd6b0be83fd5362f512828bfe0b0bd7f199f51c1f6221a5114049c45b12334e59d4277c4f0e21ea73d0d48d7e58b33259aa2caca4218daf04ba62
|
7
|
+
data.tar.gz: f8f51784b26e0230d815dd68de3230ed5329eb94754c9c6a23b084e6b1c3dcdd973d4909781b5cf9ed65b7f2180a452e9a9828a365a9bce378d4ef1fa055266a
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
class Wco::ApiController < ActionController::Base
|
3
|
+
layout false
|
4
|
+
|
5
|
+
before_action :decode_jwt
|
6
|
+
|
7
|
+
##
|
8
|
+
## private
|
9
|
+
##
|
10
|
+
private
|
11
|
+
|
12
|
+
def decode_jwt
|
13
|
+
out = JWT.decode params[:jwt_token], nil, false
|
14
|
+
email = out[0]['email']
|
15
|
+
user = User.find_by({ email: email })
|
16
|
+
sign_in user
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -67,11 +67,8 @@ class Wco::LeadsController < Wco::ApplicationController
|
|
67
67
|
redirect_to request.referrer
|
68
68
|
return
|
69
69
|
end
|
70
|
-
@ctxs = @lead.ctxs.page(
|
71
|
-
|
72
|
-
## not paginated b/c of dataTable:
|
73
|
-
@convs = @lead.conversations # .includes(:messages)
|
74
|
-
# ).page( params[:convs_page] ).per( current_profile.per_page )
|
70
|
+
@ctxs = @lead.ctxs.page( params[:ctxs_page] ).per( current_profile.per_page )
|
71
|
+
@convs = @lead.conversations.page( params[:convs_page] ).per( current_profile.per_page )
|
75
72
|
|
76
73
|
end
|
77
74
|
|
data/config/routes.rb
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
Wco::Engine.routes.draw do
|
3
3
|
root to: 'application#home'
|
4
4
|
|
5
|
+
namespace :api do
|
6
|
+
get 'leads/index_hash', to: 'leads#index_hash'
|
7
|
+
end
|
8
|
+
|
5
9
|
get 'application/tinymce', to: 'application#tinymce'
|
6
10
|
|
7
11
|
resources :assets
|
@@ -22,10 +26,10 @@ Wco::Engine.routes.draw do
|
|
22
26
|
post 'invoices/:id/send-stripe', to: 'invoices#send_stripe', as: :send_invoice_stripe
|
23
27
|
resources :invoices
|
24
28
|
|
25
|
-
get
|
29
|
+
get 'leads/new', to: 'leads#new'
|
26
30
|
post 'leads/bulkop', to: 'leads#bulkop'
|
27
31
|
post 'leads/import', to: 'leads#import', as: :leads_import
|
28
|
-
get
|
32
|
+
get 'leads/:id', to: 'leads#show', id: /[^\/]+/
|
29
33
|
resources :leads
|
30
34
|
resources :leadsets
|
31
35
|
delete 'logs/bulkop', to: 'logs#bulkop', as: :logs_bulkop
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.
|
4
|
+
version: 3.1.0.133
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
@@ -409,6 +409,8 @@ files:
|
|
409
409
|
- app/assets/stylesheets/wco/photos.scss
|
410
410
|
- app/assets/stylesheets/wco/utils.scss
|
411
411
|
- app/assets/stylesheets/wco/videos.scss
|
412
|
+
- app/controllers/wco/api/leads_controller.rb
|
413
|
+
- app/controllers/wco/api_controller.rb
|
412
414
|
- app/controllers/wco/application_controller.rb
|
413
415
|
- app/controllers/wco/galleries_controller.rb
|
414
416
|
- app/controllers/wco/headlines_controller.rb
|
@@ -480,6 +482,7 @@ files:
|
|
480
482
|
- app/views/wco/_main_header.haml
|
481
483
|
- app/views/wco/_paginate.haml
|
482
484
|
- app/views/wco/_search.haml
|
485
|
+
- app/views/wco/api/leads/index_hash.jbuilder
|
483
486
|
- app/views/wco/application/_auth_widget.haml
|
484
487
|
- app/views/wco/application/_debug.haml
|
485
488
|
- app/views/wco/application/_meta.haml
|