ish_manager 0.1.8.432 → 0.1.8.434

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: dd0cc9c3f7227cdc6dca94c10dd16da556553975d117cc827718e9b15c659d1b
4
- data.tar.gz: e4903fe1cd5bc4526febd2707a18608f5bd4c64e3c8d4c5ec1763ed5e8c55930
3
+ metadata.gz: f59ba038998f76d3d5ecdcb6eb2f77479f920c263afe1d43ee460cf50ce3d544
4
+ data.tar.gz: f0644f8f8d78f5d4a28d890a0448b29c967ed409d06a809a006a4eede8aff31a
5
5
  SHA512:
6
- metadata.gz: a42652c42a41b2608f759a2789b737ab12c697a5cd3eeae1a78d82ba7afef7167b0c5f9cdeded3fc22702425cf9c85674b42e18125b4852f8471962834aee2fc
7
- data.tar.gz: 813787a6cad45c7cdbe1a9485058ba900a4f3027aad8a9d83ff8a53b32a6955ac1da1a89b5afbc97aa1ca9afcf981716400d7c8041ddbf1ff55938d14e30cf74
6
+ metadata.gz: a86169cf6c2e4b5c32474bca91829d70e78de53dad447e2f88d9cf1e3a9c52ecad7f9776a3ee480997a2109fab55e1cfbe967ad595ee52d6a25840a9dbc890a8
7
+ data.tar.gz: 28999bf3f30065d70c73698e26c1a46f194c4fbdc46c1cd75b4bcc346dcf732c3b11f315144b91ce74db1f69703eb8817acf1978f53e07e01832694cbecf3812
@@ -23,6 +23,11 @@ class ::IshManager::IroPursesController < IshManager::ApplicationController
23
23
  authorize! :edit, @iro_purse
24
24
  end
25
25
 
26
+ def index
27
+ @iro_purses = Iro::Purse.all
28
+ authorize! :index, Iro::Purse
29
+ end
30
+
26
31
  def new
27
32
  @iro_purse = Iro::Purse.new
28
33
  authorize! :new, @iro_purse
@@ -32,13 +37,11 @@ class ::IshManager::IroPursesController < IshManager::ApplicationController
32
37
  @purse = Iro::Purse.find params[:id]
33
38
  authorize! :my, @purse
34
39
 
35
- @strategies = @purse.strategies
36
-
37
-
40
+ @strategies = Iro::CoveredCallStrategy.all
38
41
  underlyings = Tda::Stock.get_quotes( @strategies.map(&:ticker).compact.uniq.join(",") )
39
- json_puts! underlyings, 'out'
42
+ # json_puts! underlyings, 'out'
40
43
  underlyings.each do |ticker, v|
41
- puts! v[:mark], 'ze mark'
44
+ # puts! v[:mark], 'ze mark'
42
45
  Iro::CoveredCallStrategy.where( ticker: ticker ).update( current_underlying_strike: v[:mark] )
43
46
  end
44
47
 
@@ -116,7 +116,8 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
116
116
  else
117
117
  flash[:alert] = "Cannot update lead: #{@lead.errors.messages}"
118
118
  end
119
- redirect_to :action => 'index'
119
+ ## 2023-05-14 NOT redirecting to index anymore.
120
+ redirect_to :action => 'show', id: @lead.id
120
121
  end
121
122
 
122
123
  end
@@ -104,7 +104,7 @@
104
104
  .a
105
105
  %ul
106
106
  %li
107
- %span.label Purses:
107
+ = link_to 'Purses', iro_purses_path
108
108
  - Iro::Purse.all.map do |p|
109
109
  = link_to "[#{p.id}]", iro_purse_path(p)
110
110
  = link_to "[gui]", iro_purse_gameui_path(p)
@@ -34,7 +34,7 @@
34
34
  .label-save-preview= f.submit 'Save & Preview'
35
35
  .tabs
36
36
  .tab-raw
37
- = f.text_area :body, class: 'tinymce'
37
+ = f.text_area :body
38
38
  .tab-preview
39
39
  - if ctx.new_record?
40
40
  New record...
@@ -36,6 +36,9 @@
36
36
  .field
37
37
  = f.label :opened_on
38
38
  = f.text_field :opened_on
39
+ .field
40
+ = f.label :opened_delta
41
+ = f.number_field :opened_delta, step: 0.01
39
42
 
40
43
  .actions
41
44
  = f.submit 'Submit'
@@ -0,0 +1,8 @@
1
+
2
+ .iro-purses.max-width
3
+ .header
4
+ %h2.title Iro Purses
5
+
6
+ %ul
7
+ - @iro_purses.each do |purse|
8
+ %li= link_to purse.id, iro_purse_path( purse )
@@ -91,11 +91,16 @@
91
91
  %td.begin-on= pp_date p.opened_on
92
92
  %td.price= p.opened_price
93
93
  %td.to-open
94
- -# pp_amount( p.opened_price * 100 * p.quantity )
94
+ - this_to_open = p.opened_price * 100 * p.quantity - 0.66 * p.quantity
95
+ = pp_amount( this_to_open )
95
96
  %td.begin-delta= sprintf('%.2f', p.opened_delta ) rescue nil
96
- %td= pp_money p.current_price
97
- %td.net= pp_money ( p.opened_price - p.current_price ) * 100 - 1.3
98
- %td.netp= pp_percent ( p.opened_price - p.current_price ) / p.opened_price
97
+ %td.to-close
98
+ = p.current_price
99
+ %td.net
100
+ - this_net = ( p.opened_price - p.current_price ) * 100 * p.quantity - 0.65 * 2 * p.quantity
101
+ = pp_money( this_net )
102
+ %td.netp
103
+ = pp_percent( this_net / this_to_open )
99
104
  %td= sprintf('%.2f', p.current_delta ) rescue nil
100
105
  %td= (p.expires_on.to_date - p.opened_on).to_i
101
106
  %td.must-roll= pp_bool p.must_roll?
@@ -23,6 +23,10 @@
23
23
  = f.label "Leadset (company)"
24
24
  = f.select :m3_leadset_id, options_for_select(@leadsets_list, selected: lead.m3_leadset_id), { include_blank: true }, { class: 'select2' }
25
25
 
26
+ .field
27
+ = f.label :comment
28
+ = f.text_area :comment
29
+
26
30
  -# .field
27
31
  -# = f.label "Tags"
28
32
  -# = f.text_field :wp_tags
@@ -40,7 +40,9 @@
40
40
  - leads.each do |lead|
41
41
  %tr
42
42
  %td= check_box_tag 'lead_ids[]', lead.id
43
- %td= link_to "#{lead.name} <#{lead.email}>", lead_path( lead )
43
+ %td
44
+ = link_to '[~]', edit_lead_path( lead )
45
+ = link_to "#{lead.name} <#{lead.email}>", lead_path( lead )
44
46
  %td.company
45
47
  = lead.company.company_url
46
48
  - if lead.company.name.present?
@@ -12,6 +12,7 @@
12
12
  %li Company: #{ link_to @lead.company.company_url, leadset_path(@lead.company) }
13
13
  %li Phone: #{@lead.phone}
14
14
  %li Address: #{@lead.address}
15
+ %li Comment: #{raw @lead.comment}
15
16
 
16
17
  .row
17
18
  .col-md-6.ctxs
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.432
4
+ version: 0.1.8.434
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-14 00:00:00.000000000 Z
11
+ date: 2023-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -638,6 +638,7 @@ files:
638
638
  - app/views/ish_manager/iro_positions/roll.haml
639
639
  - app/views/ish_manager/iro_purses/_form.haml
640
640
  - app/views/ish_manager/iro_purses/edit.haml
641
+ - app/views/ish_manager/iro_purses/index.haml
641
642
  - app/views/ish_manager/iro_purses/new.haml
642
643
  - app/views/ish_manager/iro_purses/show.haml
643
644
  - app/views/ish_manager/iro_purses/show_gameui.haml