ish_manager 0.1.8.350 → 0.1.8.352

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: 0ec6d7674978ee4b46b231e9e9b49cc0a23072dc7471e8cf094bb2b6ed12221b
4
- data.tar.gz: 5ecd2142e4e4f9974ffca5dfb43ff5adc942adec7775e9eb2db98a37aa010ed9
3
+ metadata.gz: 9d9e52ea6ace8b144c0c2065384efe385987a6786e19ba474478aa23ccce0938
4
+ data.tar.gz: '085aba80ac62b36db6552d0f40e2e87067cf68cbf810c78eb042996142aa0b45'
5
5
  SHA512:
6
- metadata.gz: 8b5efe14ba089e09222cc0e86ca081f5af419470df5b8be4fdced96c1b802992cac0524f87e89105ea37d61faae88150f27c052cd5b1c19b58e70f148955d028
7
- data.tar.gz: 95b4b771dbb1305d22d56a96df75d6484034f007ff6122568ab52f08039dfa621deb531ea31c2704b533d804508d6900977401f4f6849f99ac86732eb3d6cf36
6
+ metadata.gz: 26d36d40b4c76ddebcfb79fdb8226fa470aaf5f4e5320eb3e2fcf6b3f53c7ed01cd40cd24bdf766da7535162051776a698fa93bf68e683d5492681bcfc88e834
7
+ data.tar.gz: 605363d860050a83def8d03f20a1d2f5e247fec8df09532b0d3651154db836698b00604df6b12da14a4af1fb500cdf40159ef2ff3667f083e56e844f26371adc
@@ -98,5 +98,8 @@ $(function () {
98
98
  $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' })
99
99
  }
100
100
 
101
+ // From: https://materializecss.com/select.html
102
+ $('select').formSelect();
103
+
101
104
  });
102
105
 
@@ -15,6 +15,7 @@
15
15
  *= require ish_manager/user_profiles
16
16
  *= require ish_manager/videos
17
17
  *= require ish_manager/pagination
18
+ *= require ish_manager/office
18
19
  **/
19
20
 
20
21
  a[target='_blank'] {
@@ -225,7 +226,7 @@ textarea.large {
225
226
  li {
226
227
  margin: 0 0 10px 0;
227
228
  display: inline-block;
228
- min-width: 200px;
229
+ min-width: 220px;
229
230
 
230
231
  > div { /* for example .galleries--menu */
231
232
  display: inline-block;
@@ -0,0 +1,60 @@
1
+
2
+ .bordered-field {
3
+ display: inline-block;
4
+
5
+ border: 1px solid gray;
6
+ border-radius: 6px;
7
+
8
+ padding: 6px 12px;
9
+
10
+ label {
11
+ margin-bottom: 0;
12
+ }
13
+
14
+ select {
15
+ padding: 6px;
16
+ }
17
+
18
+ }
19
+
20
+ .input-field.input-outlined {
21
+ > input,
22
+ > .select-wrapper > input {
23
+ border: 2px solid #999;
24
+ padding: 12px 16px 14px;
25
+ width: calc(100% - 2.5rem);
26
+ float: none;
27
+ display: block;
28
+ border-radius: 4px;
29
+ transition: box-shadow, border-color 0.15s;
30
+ &:focus:not([readonly]) {
31
+ border-color: #26A69B;
32
+ box-shadow: 0 1px 0 0px #26A69B;
33
+ }
34
+ }
35
+ > label {
36
+ left: 27px;
37
+ display: inline-flex;
38
+ width: auto !important;
39
+ &.active {
40
+ background: white;
41
+ border-left: 4px solid white;
42
+ border-right: 4px solid white;
43
+ transform: translateY(-1.75rem);
44
+ top: 1rem;
45
+ }
46
+ }
47
+ }
48
+
49
+ .inline {
50
+ display: inline-block;
51
+ }
52
+
53
+ .office-actions--form {
54
+
55
+ textarea {
56
+ width: 400px;
57
+ height: 200px;
58
+ }
59
+
60
+ }
@@ -0,0 +1,50 @@
1
+
2
+ class ::IshManager::IroWatchesController < IshManager::ApplicationController
3
+
4
+ before_action :set_lists
5
+
6
+ def index
7
+ # authorize! :index, Ish::Invoice
8
+ # @invoices = Ish::Invoice.all.includes( :payments )
9
+ raise 'not implemented'
10
+ end
11
+
12
+ # def new
13
+ # authorize! :new, @invoice
14
+ # end
15
+
16
+ # def create
17
+ # @invoice = Ish::Invoice.new params[:invoice].permit!
18
+ # authorize! :create, @invoice
19
+ # if @invoice.save
20
+ # flash[:notice] = "created invoice"
21
+ # else
22
+ # flash[:alert] = "Cannot create invoice: #{@invoice.errors.messages}"
23
+ # end
24
+ # redirect_to :action => 'index'
25
+ # end
26
+
27
+ # def update
28
+ # @invoice = Ish::Invoice.find params[:id]
29
+ # authorize! :update, @invoice
30
+ # if @invoice.update_attributes params[:invoice].permit!
31
+ # flash[:notice] = 'Success'
32
+ # redirect_to :action => 'index'
33
+ # else
34
+ # flash[:alert] = "Cannot update invoice: #{@invoice.errors.messages}"
35
+ # end
36
+ # redirect_to :action => 'index'
37
+ # end
38
+
39
+ #
40
+ # private
41
+ #
42
+ private
43
+
44
+ def set_lists
45
+ # @invoice_number = Ish::Invoice.order_by( :number => :desc ).first
46
+ # @invoice_number = @invoice_number ? @invoice_number.number + 1 : 1
47
+ # @new_invoice = Ish::Invoice.new :number => @invoice_number
48
+ end
49
+
50
+ end
@@ -0,0 +1,59 @@
1
+
2
+ class ::IshManager::OfficeActionsController < IshManager::ApplicationController
3
+
4
+ before_action :set_lists
5
+
6
+ ## alphabetized : )
7
+
8
+ def create
9
+ # @lead = ::Lead.new params[:lead].permit!
10
+ # authorize! :create, @lead
11
+ # if @lead.save
12
+ # flash[:notice] = "created lead"
13
+ # else
14
+ # flash[:alert] = "Cannot create lead: #{@lead.errors.messages}"
15
+ # end
16
+ # redirect_to :action => 'index'
17
+ end
18
+
19
+ def edit
20
+ # @lead = ::Lead.find params[:id]
21
+ # authorize! :edit, @lead
22
+ end
23
+
24
+ def index
25
+ @actions = Office::Action.active
26
+ @new_office_action = Office::Action.new
27
+ authorize! :index, @new_office_action
28
+ end
29
+
30
+ def new
31
+ # @new_lead = ::Lead.new
32
+ # authorize! :new, @new_lead
33
+ end
34
+
35
+ def show
36
+ # authorize! :redirect, IshManager::Ability
37
+ # redirect_to :action => :edit, :id => params[:id]
38
+ end
39
+
40
+ def update
41
+ # @lead = ::Lead.find params[:id]
42
+ # authorize! :update, @lead
43
+ # if @lead.update_attributes params[:lead].permit!
44
+ # flash[:notice] = 'Successfully updated lead.'
45
+ # else
46
+ # flash[:alert] = "Cannot update lead: #{@lead.errors.messages}"
47
+ # end
48
+ # redirect_to :action => 'index'
49
+ end
50
+
51
+ private
52
+
53
+ def set_lists
54
+ super
55
+ @leadsets_list = [ [nil,nil] ] + ::Leadset.all.map { |k| [ k.name, k.id ] }
56
+ @email_campaigns_list = [ [nil,nil] ] + Ish::EmailContext.unsent_campaigns.map { |k| [ k.slug, k.id ] }
57
+ end
58
+
59
+ end
@@ -64,12 +64,30 @@
64
64
  %li
65
65
  = link_to 'Leads', leads_path
66
66
  = link_to '[+]', new_lead_path
67
- %li= link_to 'Leadsets', leadsets_path
67
+ %li
68
+ = link_to 'Leadsets', leadsets_path
69
+ = link_to '[+]', new_leadset_path
68
70
  %li= link_to 'Email Templates', email_templates_path
69
71
  %li
70
72
  = link_to 'Contexts', email_contexts_path
71
- = link_to 'Campaigns', email_campaigns_path
72
73
  = link_to '[+]', new_email_context_path
73
- = link_to '[to-send]', notsent_email_contexts_path
74
+ = link_to 'unsent', notsent_email_contexts_path
75
+ %li
76
+ = link_to 'Campaigns', email_campaigns_path
77
+ = link_to '[+]', new_email_campaign_path
78
+ %li
79
+ = link_to 'Actions', office_actions_path
80
+ = link_to '[+]', new_office_action_path
81
+
82
+ .c
83
+ %i.fa.fa-compress.collapse-expand#collapseHeaderIro
84
+ Iro
85
+ .content
86
+ %ul
87
+ %li
88
+ = link_to 'Watches', iro_watches_path
89
+ %li
90
+ = link_to 'Plots', 'http://localhost:3000/iron_warbler/NOPE-1', target: '_blank'
91
+
74
92
  %hr
75
93
 
@@ -22,9 +22,7 @@
22
22
  = f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_ctx.from_email)
23
23
 
24
24
  .col.s6
25
- .field
26
- = f.label :type
27
- = f.select :type, options_for_select(Ish::EmailContext.types_list, selected: email_ctx.type)
25
+ -# @TODO: clean this up. _vp_ 2023-02-13
28
26
  .TYPE_SINGLE
29
27
  .field
30
28
  = f.label :to_email
@@ -12,9 +12,9 @@
12
12
  .input-field
13
13
  = f.label :tag
14
14
  = f.text_field :tag
15
- .input-field
16
- = f.label :location
17
- = f.text_field :location
15
+ -# .input-field
16
+ -# = f.label :location
17
+ -# = f.text_field :location
18
18
  .actions{ :style => "margin-top: 1em;" }
19
19
  = f.submit
20
20
 
@@ -0,0 +1,83 @@
1
+ -#
2
+ -# ish_manager / office_actions / _form
3
+ -#
4
+
5
+ = form_for office_action, :html => { :multipart => true, class: 'office-actions--form' } do |f|
6
+ .row
7
+ .col-sm-6
8
+ .field
9
+ -# = f.label :map
10
+ -# = f.select :map_id, options_for_select( @maps_list, selected:( newsitem[:map_id] || params[:map_id] ) ), {}, class: 'select2'
11
+ .col-sm-6
12
+ = f.submit :submit
13
+
14
+ .row
15
+ .col-sm-12
16
+ An
17
+ .bordered-field
18
+ = f.label :status do
19
+ = f.check_box :status
20
+ %span Active
21
+
22
+ .input-field.input-outlined.inline
23
+ = f.select :channel, options_for_select(['email', 'email'])
24
+ -# = f.label :channel
25
+
26
+ action
27
+ .input-field.input-outlined.inline
28
+ = f.text_field :match_from, value: 'sync.com'
29
+ = f.label "From", for: :match_from
30
+
31
+
32
+ Triggers
33
+ <br />
34
+
35
+ .input-field.input-outlined.inline
36
+ = f.select :channel, options_for_select(['email', 'email'])
37
+
38
+ w/ config
39
+ .input-field.input-outlined.inline
40
+ = f.text_area :channel, value: '{ "template": "20230207-autoresponse" }'
41
+
42
+ <br />
43
+
44
+ .input-field.input-outlined.inline
45
+ = f.select :channel, options_for_select(['create_lead', 'email'])
46
+
47
+ w/ config
48
+ .input-field.input-outlined.inline
49
+ = f.text_area :channel, value: ''
50
+
51
+ .row
52
+ .col-sm-6
53
+ .field
54
+
55
+ -# .field
56
+ -# = label_tag :photo
57
+ -# = file_field_tag :photo
58
+ -# .field
59
+ -# = f.label :subhead
60
+ -# = f.text_area :subhead
61
+ -# .field
62
+ -# = f.label :descr
63
+ -# = f.text_area :descr, :class => :tinymce
64
+
65
+ -# .col-sm-6
66
+ -# .field
67
+ -# = f.label :video
68
+ -# = f.select :video_id, options_for_select( @videos_list, :selected => @newsitem.video_id ), {}, class: 'select2'
69
+ -# .field
70
+ -# = f.label :gallery
71
+ -# = f.select :gallery_id, options_for_select( @galleries_list, :selected => @newsitem.gallery_id ), {}, class: 'select2'
72
+ -# .field
73
+ -# = f.label :report
74
+ -# = f.select :report_id, options_for_select( @reports_list, :selected => @newsitem.report_id ), {}, class: 'select2'
75
+
76
+
77
+ .row
78
+ .col-sm-6
79
+ .field
80
+ -# = f.label :map
81
+ -# = f.select :map_id, options_for_select( @maps_list, selected:( newsitem[:map_id] || params[:map_id] ) ), {}, class: 'select2'
82
+ .col-sm-6
83
+ = f.submit :submit
@@ -0,0 +1,9 @@
1
+
2
+ = render 'ish_manager/office_actions/form', office_action: @new_office_action
3
+
4
+ .title
5
+ %h1
6
+ Office Actions
7
+ = link_to '[+]', new_office_action_path
8
+
9
+ = @actions.to_a
@@ -25,6 +25,11 @@
25
25
  = stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css"
26
26
  = javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"
27
27
 
28
+ - # @TODO: document? test-drive?
29
+ - if @include_materialize
30
+ = stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
31
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"
32
+
28
33
  = stylesheet_link_tag "ish_manager/application", media: "all"
29
34
  = javascript_include_tag "ish_manager/application"
30
35
 
data/config/routes.rb CHANGED
@@ -27,6 +27,10 @@ IshManager::Engine.routes.draw do
27
27
  # resources :covered_calls
28
28
  # end
29
29
 
30
+ namespace :iro do
31
+ get 'watches', to: 'iro_watches#index'
32
+ end
33
+
30
34
  scope 'gameui' do
31
35
  get 'maps/:id/map-editor', to: 'maps#map_editor', as: :location_map_editor
32
36
  resources 'maps' do
@@ -45,13 +49,15 @@ IshManager::Engine.routes.draw do
45
49
  # office, below
46
50
  #
47
51
 
48
- # resources :email_campaigns, as: :email_campaigns
52
+ resources :office_actions
53
+
54
+ resources :email_campaigns
55
+ resources :email_campaign_leads, as: :campaign_leads
49
56
 
50
57
  get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
51
58
  get 'email_contexts/new_with/:template_slug', to: 'email_contexts#new'
52
59
  post 'email_contexts/send/:id', to: 'email_contexts#do_send', as: :email_context_send
53
- get 'email_contexts', to: 'email_contexts#index', as: :email_contexts, defaults: { notsent: false, type: Ish::EmailContext::TYPE_SINGLE }
54
- get 'email_contexts/campaigns', to: 'email_contexts#index', as: :email_campaigns, defaults: { notsent: false, type: Ish::EmailContext::TYPE_CAMPAIGN }
60
+ get 'email_contexts', to: 'email_contexts#index', as: :email_contexts, defaults: { notsent: false }
55
61
  get 'email_contexts/notsent', to: 'email_contexts#index', as: :notsent_email_contexts, defaults: { notsent: true }
56
62
  resources :email_contexts
57
63
 
@@ -70,7 +76,6 @@ IshManager::Engine.routes.draw do
70
76
 
71
77
  resources :leadsets
72
78
 
73
- resources :email_campaign_leads, as: :campaign_leads
74
79
 
75
80
  resources :meetings
76
81
 
@@ -25,36 +25,5 @@ namespace :ish_manager do
25
25
  ms.update_all( creator_profile_id: profile.id )
26
26
  end
27
27
 
28
- desc 'watch the stocks, and trigger actions - not alphavantage, tda now. 2021-08-08'
29
- task watch_stocks: :environment do
30
- while true
31
- stocks = Warbler::StockWatch.where( notification_type: :EMAIL )
32
- stocks.each do |stock|
33
- begin
34
- Timeout::timeout( 10 ) do
35
- out = Warbler::Ameritrade::Api.get_quote({ symbol: stock.ticker })
36
- r = out[:lastPrice]
37
- if stock.direction == :ABOVE && r >= stock.price ||
38
- stock.direction == :BELOW && r <= stock.price
39
- IshManager::ApplicationMailer.stock_alert( stock ).deliver
40
- end
41
- end
42
- rescue Exception => e
43
- puts! e, 'Error in ish_manager:watch_stocks :'
44
- end
45
- end
46
- sleep Warbler::StockWatch::SLEEP_TIME_SECONDS
47
- end
48
- end
49
-
50
- desc 'watch condors'
51
- task watch_condors: :environment do
52
- watcher = ::Ish::IronCondorWatcher.new
53
- while true
54
- watcher.watch_once
55
- print '.'
56
- sleep 60 # seconds
57
- end
58
- end
59
28
 
60
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.350
4
+ version: 0.1.8.352
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-01 00:00:00.000000000 Z
11
+ date: 2023-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -272,6 +272,7 @@ files:
272
272
  - app/assets/stylesheets/ish_manager/leads.scss
273
273
  - app/assets/stylesheets/ish_manager/maps.scss
274
274
  - app/assets/stylesheets/ish_manager/markers.scss
275
+ - app/assets/stylesheets/ish_manager/office.scss
275
276
  - app/assets/stylesheets/ish_manager/pagination.scss
276
277
  - app/assets/stylesheets/ish_manager/photos.scss
277
278
  - app/assets/stylesheets/ish_manager/trash/bootstrap.css
@@ -288,12 +289,14 @@ files:
288
289
  - app/controllers/ish_manager/galleries_controller.rb
289
290
  - app/controllers/ish_manager/image_assets_controller.rb
290
291
  - app/controllers/ish_manager/invoices_controller.rb
292
+ - app/controllers/ish_manager/iro_watches_controller.rb
291
293
  - app/controllers/ish_manager/leads_controller.rb
292
294
  - app/controllers/ish_manager/leadsets_controller.rb
293
295
  - app/controllers/ish_manager/maps_controller.rb
294
296
  - app/controllers/ish_manager/markers_controller.rb
295
297
  - app/controllers/ish_manager/meetings_controller.rb
296
298
  - app/controllers/ish_manager/newsitems_controller.rb
299
+ - app/controllers/ish_manager/office_actions_controller.rb
297
300
  - app/controllers/ish_manager/payments_controller.rb
298
301
  - app/controllers/ish_manager/photos_controller.rb
299
302
  - app/controllers/ish_manager/reports_controller.rb
@@ -374,6 +377,9 @@ files:
374
377
  - app/views/ish_manager/email_templates/_marketing_wordpress_2.html
375
378
  - app/views/ish_manager/email_templates/_piousbox_roundborders.html.erb
376
379
  - app/views/ish_manager/email_templates/_piousbox_social.html.erb
380
+ - app/views/ish_manager/email_templates/_slug-1.html.erb
381
+ - app/views/ish_manager/email_templates/_slug-2.html.erb
382
+ - app/views/ish_manager/email_templates/_slug-3.html.erb
377
383
  - app/views/ish_manager/email_templates/_wasyaco_roundborders.html.erb
378
384
  - app/views/ish_manager/email_templates/_wasyaco_social.html.erb
379
385
  - app/views/ish_manager/email_templates/edit.haml
@@ -442,6 +448,8 @@ files:
442
448
  - app/views/ish_manager/newsitems/edit.haml
443
449
  - app/views/ish_manager/newsitems/index.haml
444
450
  - app/views/ish_manager/newsitems/new.haml
451
+ - app/views/ish_manager/office_actions/_form.haml
452
+ - app/views/ish_manager/office_actions/index.haml
445
453
  - app/views/ish_manager/office_mailer/morning_reminder.haml
446
454
  - app/views/ish_manager/office_mailer/render
447
455
  - app/views/ish_manager/office_mailer/test_email.html.haml