ish_manager 0.1.8.451 → 0.1.8.453
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/assets/stylesheets/ish_manager/application.scss +2 -1
- data/app/controllers/ish_manager/iro_purses_controller.rb +6 -7
- data/app/controllers/ish_manager/products_controller.rb +15 -0
- data/app/controllers/ish_manager/subscriptions_controller.rb +19 -0
- data/app/helpers/ish_manager/application_helper.rb +9 -0
- data/app/views/ish_manager/application/_main_header_admin.haml +17 -5
- data/app/views/ish_manager/application/home.haml +17 -1
- data/app/views/ish_manager/iro_purses/_header.haml +1 -9
- data/app/views/ish_manager/iro_purses/_show.haml +29 -10
- data/app/views/ish_manager/products/index.haml +7 -0
- data/app/views/ish_manager/subscriptions/index.haml +47 -0
- data/app/views/layouts/ish_manager/application.haml +5 -0
- data/config/routes.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ef2d955ba3b789d1a37d395a520813a373c5e53cd9f5d79a65806e6c1f1628e
|
4
|
+
data.tar.gz: f184a66a8c4a101d7c314b2f61504bb5eec0e07347a9f6bcc043fca222db074c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c5c0d4143be4fee50e9de321cf3755caa034c1b530052f480c006f8a7f051143d0f8c30ddf4c305e10861f391d82c2b17a469b141f57a9694e0ade07ac0e6d
|
7
|
+
data.tar.gz: 5d295496c6624be8d7827e3a02591e279d1b065bd6e9b2f25ef7c76554dadd7ba80b5aa023d484b66dce689d5c6ec6e446c70da747d3d28a6792fbdc32e0cbee
|
@@ -39,11 +39,6 @@ class ::IshManager::IroPursesController < IshManager::ApplicationController
|
|
39
39
|
authorize! :my, @purse
|
40
40
|
|
41
41
|
@strategies = Iro::CoveredCallStrategy.all
|
42
|
-
@current_underlying_strike = @strategies[0].current_underlying_strike
|
43
|
-
underlyings = Tda::Stock.get_quotes( @strategies.map(&:ticker).compact.uniq.join(",") )
|
44
|
-
underlyings.each do |ticker, v|
|
45
|
-
Iro::CoveredCallStrategy.where( ticker: ticker ).update( current_underlying_strike: v[:mark] )
|
46
|
-
end
|
47
42
|
|
48
43
|
if params[:statuses]
|
49
44
|
@positions = @purse.positions.where( :status.in => params[:statuses].split(',') )
|
@@ -51,7 +46,11 @@ class ::IshManager::IroPursesController < IshManager::ApplicationController
|
|
51
46
|
@positions = @purse.positions
|
52
47
|
end
|
53
48
|
@positions = @positions.order({ expires_on: :asc, strike: :asc })
|
54
|
-
@positions.map
|
49
|
+
# @positions.map do |p|
|
50
|
+
# if p[:status] == 'active'
|
51
|
+
# # p.refresh
|
52
|
+
# end
|
53
|
+
# end
|
55
54
|
|
56
55
|
render params[:kind] || @purse.parsed_config[:kind] || 'show'
|
57
56
|
end
|
@@ -59,7 +58,7 @@ class ::IshManager::IroPursesController < IshManager::ApplicationController
|
|
59
58
|
def roll_prep
|
60
59
|
@strategies = Iro::CoveredCallStrategy.all
|
61
60
|
@position = Iro::Position.find params[:id]
|
62
|
-
puts! @position, '@position'
|
61
|
+
# puts! @position, '@position'
|
63
62
|
@positions = [ @position ]
|
64
63
|
@purse = @position.purse
|
65
64
|
@strategy = @position.strategy
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
class IshManager::ProductsController < IshManager::ApplicationController
|
3
|
+
|
4
|
+
before_action :set_lists
|
5
|
+
|
6
|
+
# alphabetized : )
|
7
|
+
|
8
|
+
def index
|
9
|
+
authorize! :index, Wco::Product
|
10
|
+
Stripe.api_key = ::STRIPE_SK
|
11
|
+
Stripe.api_version = '2020-08-27'
|
12
|
+
@products = Stripe::Product.list().data
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
class IshManager::SubscriptionsController < IshManager::ApplicationController
|
3
|
+
|
4
|
+
before_action :set_lists
|
5
|
+
|
6
|
+
# alphabetized : )
|
7
|
+
|
8
|
+
def index
|
9
|
+
authorize! :index, Wco::Subscription
|
10
|
+
|
11
|
+
Stripe.api_key = ::STRIPE_SK
|
12
|
+
Stripe.api_version = '2020-08-27'
|
13
|
+
@customers = Stripe::Customer.list().data
|
14
|
+
@users = User.all
|
15
|
+
@organizations = Wco::Organization.all()
|
16
|
+
@subscriptions = Stripe::Subscription.list().data
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -103,15 +103,27 @@
|
|
103
103
|
Iro Wor
|
104
104
|
.a
|
105
105
|
%ul
|
106
|
+
|
107
|
+
%li
|
108
|
+
= link_to 'Watches', iro_watches_path
|
109
|
+
%li
|
110
|
+
= link_to 'Plots', 'http://localhost:3000/iron_warbler/NOPE-1', target: '_blank'
|
106
111
|
%li
|
107
112
|
= link_to 'Purses', iro_purses_path
|
108
113
|
- Iro::Purse.all.map do |p|
|
109
|
-
=
|
110
|
-
= link_to "
|
114
|
+
= "[#{p.id}"
|
115
|
+
= link_to "show", iro_purse_path(p)
|
116
|
+
= link_to "gui", iro_purse_path({ id: p.id, kind: 'show_gameui' })
|
117
|
+
= "]"
|
111
118
|
= link_to '[+]', new_iro_purse_path
|
119
|
+
.c
|
120
|
+
|
121
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderWco
|
122
|
+
Wco
|
123
|
+
.a
|
124
|
+
%ul
|
112
125
|
%li
|
113
|
-
= link_to '
|
126
|
+
= link_to 'Products & Prices', products_path
|
114
127
|
%li
|
115
|
-
= link_to '
|
128
|
+
= link_to 'Customers & Subscriptions', subscriptions_path
|
116
129
|
.c
|
117
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
.application-home.max-width
|
3
|
-
Welcome home
|
3
|
+
%h5 Welcome home
|
4
4
|
|
5
5
|
.bordered-card
|
6
6
|
= form_tag "https://www.cgtrader.com/free-3d-models", method: :get, target: :_blank do
|
@@ -14,3 +14,19 @@
|
|
14
14
|
%p Search Youtube:
|
15
15
|
= text_field_tag "search_query"
|
16
16
|
= submit_tag 'search'
|
17
|
+
|
18
|
+
.bordered-card
|
19
|
+
%h5.center.text-center USD to COP
|
20
|
+
#root{ width: 500, height: 300 }
|
21
|
+
%script{src: "/recharts-example-out.js", type: "module"}
|
22
|
+
%script{type: "module"}
|
23
|
+
|
24
|
+
|
25
|
+
import App from '/recharts-example-out.js';
|
26
|
+
|
27
|
+
const el = document.querySelector('#root')
|
28
|
+
const e = React.createElement;
|
29
|
+
|
30
|
+
const domContainer = document.querySelector('#root');
|
31
|
+
const root = ReactDOM.createRoot(domContainer);
|
32
|
+
root.render(e(App));
|
@@ -25,13 +25,5 @@
|
|
25
25
|
.iro-strategy.item= render 'ish_manager/iro_strategies/form', strategy: strat
|
26
26
|
.c
|
27
27
|
|
28
|
-
|
29
|
-
= form_tag( {}, { method: :get } ) do
|
30
|
-
- if !params[:statuses]
|
31
|
-
- params[:statuses] = ::Iro::Position::STATUSES
|
32
|
-
- ::Iro::Position::STATUSES.each do |status|
|
33
|
-
.field
|
34
|
-
%label= status
|
35
|
-
= check_box_tag "statuses[]", status, params[:statuses].include?( status )
|
36
|
-
= submit_tag 'Submit'
|
28
|
+
|
37
29
|
|
@@ -1,10 +1,20 @@
|
|
1
1
|
|
2
|
-
.iro-purses--show
|
2
|
+
.iro-purses--show.padded
|
3
3
|
|
4
4
|
%h5.collapse-expand#positions
|
5
5
|
Positions (#{@positions.length})
|
6
6
|
= link_to '[+]', new_iro_position_path({ iro_purse_id: @purse.id })
|
7
7
|
.positions
|
8
|
+
.iro-position-statuses-selector
|
9
|
+
= form_tag( {}, { method: :get } ) do
|
10
|
+
- if !params[:statuses]
|
11
|
+
- params[:statuses] = ::Iro::Position::STATUSES
|
12
|
+
- ::Iro::Position::STATUSES.each do |status|
|
13
|
+
.field
|
14
|
+
%label= status
|
15
|
+
= check_box_tag "statuses[]", status, params[:statuses].include?( status )
|
16
|
+
= submit_tag 'Submit'
|
17
|
+
|
8
18
|
%table.bordered
|
9
19
|
%thead
|
10
20
|
%tr
|
@@ -58,8 +68,10 @@
|
|
58
68
|
- @positions.each_with_index do |p, idx|
|
59
69
|
- if idx > 0 && @positions[idx-1][:expires_on] != p[:expires_on]
|
60
70
|
%tr
|
61
|
-
%td
|
62
|
-
%hr
|
71
|
+
%td{ colspan: 30, style: "background: #eee;" }
|
72
|
+
-# %hr
|
73
|
+
|
74
|
+
|
63
75
|
%tr
|
64
76
|
%td.id
|
65
77
|
= p.id
|
@@ -88,12 +100,19 @@
|
|
88
100
|
%td= (p.expires_on.to_date - p.opened_on).to_i
|
89
101
|
%td.must-roll= pp_bool p.must_roll?
|
90
102
|
%td.should-roll
|
91
|
-
.
|
92
|
-
|
93
|
-
|
94
|
-
%td.next-
|
95
|
-
|
96
|
-
%td.next-outcome
|
97
|
-
|
103
|
+
.a= p.should_rollp
|
104
|
+
%td.next-symbol
|
105
|
+
= p.next_symbol
|
106
|
+
%td.next-delta
|
107
|
+
= p.next_position[:delta]
|
108
|
+
%td.next-outcome
|
109
|
+
= pp_money p.next_outcome
|
110
|
+
%td.status
|
111
|
+
= p.status
|
112
|
+
- if p.next_reasons.length > 1 ## @TODO: this is messy, remove _vp_ 2023-08-05
|
113
|
+
%tr
|
114
|
+
%td{ colspan: 30 }
|
115
|
+
Next Reasons: #{pp_list p.next_reasons}
|
116
|
+
|
98
117
|
|
99
118
|
|
@@ -0,0 +1,47 @@
|
|
1
|
+
|
2
|
+
.container.subscriptions-index.padded
|
3
|
+
.row
|
4
|
+
.col-md-6
|
5
|
+
|
6
|
+
%h5 Stripe Customers
|
7
|
+
%ul
|
8
|
+
- @customers.each do |customer|
|
9
|
+
%li
|
10
|
+
%ul
|
11
|
+
%li <b>Email:</b> #{customer.email}
|
12
|
+
%li <b>customer_id:</b> #{customer.id}
|
13
|
+
%li
|
14
|
+
<b>Subscriptions:</b>
|
15
|
+
%ul
|
16
|
+
- @subscriptions.each do |sub|
|
17
|
+
- if sub.customer == customer.id
|
18
|
+
%li= sub.items.data[0].plan.product
|
19
|
+
|
20
|
+
.col-md-6
|
21
|
+
%h5 Wco Users
|
22
|
+
%ul
|
23
|
+
- @users.each do |user|
|
24
|
+
%li
|
25
|
+
= user.email
|
26
|
+
%ul
|
27
|
+
%li <b>profile:</b> #{user.profile.email}
|
28
|
+
- if user.profile.organization
|
29
|
+
%li <b>organization:</b> #{user.profile.organization.name}, customer_id: #{user.profile.organization.customer_id}
|
30
|
+
%li <b>subscriptions:</b> #{user.profile.organization.subscriptions.inspect}
|
31
|
+
%hr
|
32
|
+
%h5 Wco Organizations
|
33
|
+
%ul
|
34
|
+
- @organizations.each do |org|
|
35
|
+
%li
|
36
|
+
= org.name
|
37
|
+
%ul
|
38
|
+
%li <b>customer_id:</b> #{org.customer_id}
|
39
|
+
-# %li <b>organization:</b> #{user.profile.organization.name}, customer_id: #{user.profile.organization.customer_id}
|
40
|
+
-# %li <b>subscriptions:</b> #{user.profile.organization.subscriptions.inspect}
|
41
|
+
|
42
|
+
%hr
|
43
|
+
%h5 Subscriptions
|
44
|
+
%ul
|
45
|
+
- @subscriptions.each do |sub|
|
46
|
+
%li= sub.inspect
|
47
|
+
|
@@ -36,6 +36,11 @@
|
|
36
36
|
= stylesheet_link_tag "ish_manager/application", media: "all"
|
37
37
|
= javascript_include_tag "ish_manager/application"
|
38
38
|
|
39
|
+
%script{crossorigin: "", src: "https://unpkg.com/react@18/umd/react.development.js"}
|
40
|
+
%script{crossorigin: "", src: "https://unpkg.com/react-dom@18/umd/react-dom.development.js"}
|
41
|
+
%script{src: "https://unpkg.com/prop-types@15.6/prop-types.min.js"}
|
42
|
+
%script{src: "https://unpkg.com/recharts/umd/Recharts.js"}
|
43
|
+
|
39
44
|
= csrf_meta_tags
|
40
45
|
%body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action], "application-fullwidth" ] }
|
41
46
|
|
data/config/routes.rb
CHANGED
@@ -119,10 +119,12 @@ IshManager::Engine.routes.draw do
|
|
119
119
|
|
120
120
|
resources :photos
|
121
121
|
resources :payments
|
122
|
+
resources :products
|
122
123
|
|
123
124
|
resources :reports
|
124
125
|
|
125
126
|
resources :scheduled_email_actions
|
127
|
+
resources :subscriptions
|
126
128
|
|
127
129
|
resources :user_profiles do
|
128
130
|
resources :newsitems
|
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.
|
4
|
+
version: 0.1.8.453
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -477,8 +477,10 @@ files:
|
|
477
477
|
- app/controllers/ish_manager/office_actions_controller.rb
|
478
478
|
- app/controllers/ish_manager/payments_controller.rb
|
479
479
|
- app/controllers/ish_manager/photos_controller.rb
|
480
|
+
- app/controllers/ish_manager/products_controller.rb
|
480
481
|
- app/controllers/ish_manager/reports_controller.rb
|
481
482
|
- app/controllers/ish_manager/scheduled_email_actions_controller.rb
|
483
|
+
- app/controllers/ish_manager/subscriptions_controller.rb
|
482
484
|
- app/controllers/ish_manager/user_profiles_controller.rb
|
483
485
|
- app/controllers/ish_manager/videos_controller.rb
|
484
486
|
- app/helpers/ish_manager/application_helper.rb
|
@@ -727,6 +729,7 @@ files:
|
|
727
729
|
- app/views/ish_manager/photos/new.haml
|
728
730
|
- app/views/ish_manager/photos/show.haml
|
729
731
|
- app/views/ish_manager/photos/without_gallery.haml
|
732
|
+
- app/views/ish_manager/products/index.haml
|
730
733
|
- app/views/ish_manager/reports/_form.haml
|
731
734
|
- app/views/ish_manager/reports/_index.haml
|
732
735
|
- app/views/ish_manager/reports/_show_mini.haml
|
@@ -741,6 +744,7 @@ files:
|
|
741
744
|
- app/views/ish_manager/scheduled_email_actions/index.haml
|
742
745
|
- app/views/ish_manager/scheduled_email_actions/new.haml
|
743
746
|
- app/views/ish_manager/scheduled_email_actions/show.haml
|
747
|
+
- app/views/ish_manager/subscriptions/index.haml
|
744
748
|
- app/views/ish_manager/trash/email_campaigns-trash/_form.haml
|
745
749
|
- app/views/ish_manager/trash/email_campaigns-trash/edit.haml
|
746
750
|
- app/views/ish_manager/trash/email_campaigns-trash/index.haml
|