wco_models 3.1.0.132 → 3.1.0.134

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: e558921e3be7d6d456241324fb05fb95fabac40c41c2075e34368b061f67cb8a
4
- data.tar.gz: fdce90a34e3867f242a722129d53a32179b4a75578be59441f52f8d30bd0de20
3
+ metadata.gz: cff4e9543401c7d5f8727374e53f03b74558a872510fc1fad25571109d1b9d3f
4
+ data.tar.gz: ceae4b3cfdcafbacd7eef23acb410d544ba02c1c1d5083beea72a630d10c0773
5
5
  SHA512:
6
- metadata.gz: 4a0efc5ee5388f408dfb70a7d4cb078550aab0eb4e883ac4e36bac1c822f69a45bd52da6c380cd470d335a1ca0b5e7db62f4eb866e09dfb05195ea00cbafd685
7
- data.tar.gz: 0cb7f469390eb1c1e44530cbf0810a6f7fb54fab12eeb47484ccd36cc241a724c961c6776f0c51d3900c9161da4e420bdee083747df100c33f9b765dae3cf664
6
+ metadata.gz: 03d11aa19ec11beea9883d7b58547a165c1b08cd6f5b74f199413bf3a5961aa706db118a5c806a01c2845fa3e258a74fc4342f17604fa1cac531374d11b94255
7
+ data.tar.gz: a75b5a7452753b0791dc2452d9bd9f09683d3fb1cddd9ee248b0d04a0d5fdff42efecb2cae1ea1bbacc7476a6ab88bdff5160e91665815a8296c7054feb3ac8d
@@ -123,6 +123,30 @@ textarea.monospace {
123
123
  }
124
124
 
125
125
  /* H */
126
+
127
+
128
+ .h-20px {
129
+ min-height: 20px;
130
+ }
131
+ .h-30px {
132
+ min-height: 30px;
133
+ }
134
+ .h-50px {
135
+ min-height: 50px;
136
+ }
137
+
138
+ .h-300px {
139
+ min-height: 300px;
140
+ }
141
+
142
+ .h-400px {
143
+ min-height: 400px;
144
+ }
145
+
146
+ .h-500px {
147
+ min-height: 500px;
148
+ }
149
+
126
150
  .header {
127
151
  display: flex;
128
152
 
@@ -135,10 +159,11 @@ textarea.monospace {
135
159
  }
136
160
  }
137
161
 
138
- .h-500px {
139
- min-height: 500px;
162
+ .hide, .hidden {
163
+ display: none;
140
164
  }
141
165
 
166
+
142
167
  /* M */
143
168
 
144
169
  .maxwidth {
@@ -159,6 +184,11 @@ textarea.monospace {
159
184
  width: calc( 100% - 1em );
160
185
  }
161
186
 
187
+ /* S */
188
+ .spacer-small {
189
+ height: 20px;
190
+ }
191
+
162
192
  /* T */
163
193
 
164
194
  .title {
@@ -167,6 +197,21 @@ textarea.monospace {
167
197
 
168
198
  /* W */
169
199
 
200
+ .w-20px {
201
+ width: 20px;
202
+ }
203
+ .w-30px {
204
+ width: 30px;
205
+ }
206
+ .w-50px {
207
+ width: 50px;
208
+ }
209
+ .w-150px {
210
+ width: 150px;
211
+ }
212
+ .w-200px {
213
+ width: 200px;
214
+ }
170
215
  .w-300px {
171
216
  width: 300px;
172
217
  }
@@ -0,0 +1,9 @@
1
+
2
+ class Wco::Api::LeadsController < Wco::ApiController
3
+
4
+ def index_hash
5
+ authorize! :index, Wco::Lead
6
+ @leads = Wco::Lead.find( params[:lead_ids].split(',') )
7
+ end
8
+
9
+ end
@@ -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
@@ -29,9 +29,10 @@ module Wco::ApplicationHelper
29
29
  return date.in_time_zone( Rails.application.config.time_zone ).strftime('%l:%M%P %Z')
30
30
  end
31
31
 
32
- def pp_amount a
32
+ def pp_amount a, config = { precision: 2 }
33
33
  return '-' if !a
34
- "$ #{'%.2f' % a}"
34
+ return number_to_currency a, precision: config[:precision]
35
+ # "$#{'%.2f' % a}"
35
36
  end
36
37
  def pp_money a; pp_amount a; end
37
38
  def pp_currency a; pp_amount a; end
@@ -10,9 +10,12 @@
10
10
  .flex-row
11
11
  %ul
12
12
  %li= link_to 'ROOT', '/'
13
- %li= link_to '/email', '/email'
14
- %li= link_to '/hosting', '/hosting'
15
- %li= link_to '/trading', '/trading'
13
+ - if defined? wco_email
14
+ %li= link_to '/email', '/email'
15
+ - if defined? wco_hosting
16
+ %li= link_to '/hosting', '/hosting'
17
+ - if defined? iro
18
+ %li= link_to '/trading', '/trading'
16
19
 
17
20
  %ul
18
21
  %li= render '/wco/invoices/header'
@@ -0,0 +1,8 @@
1
+
2
+
3
+ @leads.each do |lead|
4
+ json.set! lead.id.to_s do
5
+ json.email lead.email
6
+ end
7
+ end
8
+
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 'leads/new', to: 'leads#new'
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 'leads/:id', to: 'leads#show', id: /[^\/]+/
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.132
4
+ version: 3.1.0.134
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-03-08 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -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