ish_manager 0.1.8.399 → 0.1.8.401
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ish_manager/iro_watches_controller.rb +37 -40
- data/app/mailers/ish_manager/application_mailer.rb +10 -4
- data/app/mailers/ish_manager/meeting_mailer.rb +0 -1
- data/app/mailers/ish_manager/office_mailer.rb +0 -2
- data/app/views/ish_manager/application_mailer/stock_alert.haml +4 -0
- data/app/views/ish_manager/iro_watches/_form.haml +26 -0
- data/app/views/ish_manager/iro_watches/index.haml +13 -0
- data/config/routes.rb +2 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be589998f18fd38b580126da0bfa392b6ad70bc1f599d3c2fa706c45a34590b7
|
4
|
+
data.tar.gz: 1b17229b7e15682dffd49bb9267dc421f7d5e7411537ba9ddbdc9b86430ee0b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be2e3ba6f631f0e157d70b3c6d6a4891a4f3e5cde14ca40a72f4636b14449a55859287535792fb600db763e205dd2b3efc222ddb230b9c3febd9af456afa18f0
|
7
|
+
data.tar.gz: 281506080e7953135bd07161896c6e01467cc62c03ff8500907e0dfe3d8d5a21cbb7b8679b99564d46b37704d6c972ec7bf1d9c3ba93062b3ef36c2d55da4dd4
|
@@ -1,50 +1,47 @@
|
|
1
1
|
|
2
2
|
class ::IshManager::IroWatchesController < IshManager::ApplicationController
|
3
3
|
|
4
|
-
before_action :set_lists
|
5
|
-
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
# before_action :set_lists
|
5
|
+
|
6
|
+
def create
|
7
|
+
@option_watch = Iro::OptionWatch.new params[:iro_watch].permit!
|
8
|
+
authorize! :create, @option_watch
|
9
|
+
flag = @option_watch.save
|
10
|
+
if flag
|
11
|
+
flash[:notice] = 'Created option watch.'
|
12
|
+
else
|
13
|
+
flash[:alert] = "Cannot create option watch: #{@option_watch.errors.full_messages.join(', ')}."
|
14
|
+
end
|
15
|
+
redirect_to action: 'index'
|
10
16
|
end
|
11
17
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
18
|
+
def destroy
|
19
|
+
@w = Iro::OptionWatch.find params[:id]
|
20
|
+
authorize! :destroy, @w
|
21
|
+
flag = @w.destroy
|
22
|
+
if flag
|
23
|
+
flash[:notice] = 'Success.'
|
24
|
+
else
|
25
|
+
flash[:alert] = @w.errors.full_messages.join(", ")
|
26
|
+
end
|
27
|
+
redirect_to action: 'index'
|
28
|
+
end
|
38
29
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
30
|
+
def index
|
31
|
+
authorize! :index, Iro::OptionWatch
|
32
|
+
@watches = Iro::OptionWatch.order_by( ticker: :asc, direction: :asc, price: :desc)
|
33
|
+
end
|
43
34
|
|
44
|
-
def
|
45
|
-
|
46
|
-
|
47
|
-
|
35
|
+
def update
|
36
|
+
@option_watch = Iro::OptionWatch.find params[:id]
|
37
|
+
authorize! :update, @option_watch
|
38
|
+
flag = @option_watch.update_attributes params[:iro_watch].permit!
|
39
|
+
if flag
|
40
|
+
flash[:notice] = 'Updated option watch.'
|
41
|
+
else
|
42
|
+
flash[:alert] = "Cannot update option watch: #{@option_watch.errors.full_messages.join(', ')}."
|
43
|
+
end
|
44
|
+
redirect_to action: 'index'
|
48
45
|
end
|
49
46
|
|
50
47
|
end
|
@@ -17,12 +17,18 @@ module IshManager
|
|
17
17
|
|
18
18
|
def option_alert option
|
19
19
|
@option = option
|
20
|
-
mail(
|
20
|
+
mail({
|
21
|
+
:to => option.profile.email,
|
22
|
+
:subject => "IshManager Option Alert :: #{option.ticker}",
|
23
|
+
})
|
21
24
|
end
|
22
25
|
|
23
|
-
def stock_alert
|
24
|
-
@
|
25
|
-
mail(
|
26
|
+
def stock_alert watch_id
|
27
|
+
@watch = Iro::OptionWatch.find watch_id
|
28
|
+
mail({
|
29
|
+
to: @watch.profile.email,
|
30
|
+
subject: "Iro Watch Alert :: #{@watch.ticker} is #{@watch.direction} #{@watch.mark}."
|
31
|
+
})
|
26
32
|
end
|
27
33
|
|
28
34
|
def test_email
|
@@ -7,7 +7,6 @@ class IshManager::MeetingMailer < IshManager::ApplicationMailer
|
|
7
7
|
def morning_reminder meeting_id:
|
8
8
|
@meeting = Ish::Meeting.find meeting_id
|
9
9
|
mail( to: @meeting.invitee_email,
|
10
|
-
bcc: 'piousbox@gmail.com',
|
11
10
|
subject: 'A reminder for your upcoming meeting' )
|
12
11
|
end
|
13
12
|
|
@@ -50,7 +50,6 @@ class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
|
50
50
|
|
51
51
|
mail( from: @ctx.from_email,
|
52
52
|
to: @lead.email,
|
53
|
-
bcc: 'piousbox@gmail.com', # @TODO: change _vp_ 2022-11-21
|
54
53
|
subject: @ctx.subject,
|
55
54
|
template_name: template )
|
56
55
|
end
|
@@ -65,7 +64,6 @@ class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
|
65
64
|
|
66
65
|
mail( from: @ctx.from_email,
|
67
66
|
to: @ctx.to_email,
|
68
|
-
bcc: 'piousbox@gmail.com',
|
69
67
|
subject: @ctx.subject,
|
70
68
|
template_name: "render/_#{@ctx.tmpl.layout}" )
|
71
69
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
- url = watch.new_record? ? iro_watches_path : iro_watch_path(watch)
|
3
|
+
.iro-watches--form
|
4
|
+
= form_for watch, url: url, as: :iro_watch do |f|
|
5
|
+
.flex-row
|
6
|
+
.form-group
|
7
|
+
= f.select :state, options_for_select( Iro::OptionWatch.states_list, selected: watch.state )
|
8
|
+
.form-group
|
9
|
+
= f.select :kind, options_for_select( Iro::OptionWatch.kinds_list, selected: watch.kind )
|
10
|
+
.form-group
|
11
|
+
-# = f.label :action
|
12
|
+
= f.select :action, options_for_select( Iro::OptionWatch.actions_list, :selected => watch.action )
|
13
|
+
.form-group
|
14
|
+
-# = f.label :profile
|
15
|
+
= f.select :profile, options_for_select( Ish::UserProfile.list, selected: watch.profile_id ), {}, class: 'select2'
|
16
|
+
.form-group
|
17
|
+
%label.control-label When
|
18
|
+
= f.text_field :ticker, :placeholder => 'ticker'
|
19
|
+
.form-group
|
20
|
+
%label.control-label is
|
21
|
+
= f.select :direction, options_for_select( Iro::OptionWatch.directions_list, selected: watch.direction )
|
22
|
+
.form-group
|
23
|
+
%label.control-label $
|
24
|
+
= f.number_field :mark, :step => 0.01, :placeholder => "0.01"
|
25
|
+
.form-group
|
26
|
+
= f.submit ">", :class => %w(btn blue)
|
data/config/routes.rb
CHANGED
@@ -26,7 +26,8 @@ IshManager::Engine.routes.draw do
|
|
26
26
|
# resources :orders
|
27
27
|
|
28
28
|
|
29
|
-
get 'iro_watches', to: 'iro_watches#index'
|
29
|
+
# get 'iro_watches', to: 'iro_watches#index'
|
30
|
+
resources :iro_watches
|
30
31
|
get 'iro_purse', to: 'iro_purses#my', as: :my_purse
|
31
32
|
|
32
33
|
resources :iro_strategies
|
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.401
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -394,6 +394,7 @@ files:
|
|
394
394
|
- app/views/ish_manager/application/_search.haml
|
395
395
|
- app/views/ish_manager/application/home.haml
|
396
396
|
- app/views/ish_manager/application_mailer/shared_galleries.html.erb
|
397
|
+
- app/views/ish_manager/application_mailer/stock_alert.haml
|
397
398
|
- app/views/ish_manager/application_mailer/test_email.html.erb
|
398
399
|
- app/views/ish_manager/application_mailer/welcome.html.erb
|
399
400
|
- app/views/ish_manager/categories/_subtree.haml
|
@@ -481,6 +482,8 @@ files:
|
|
481
482
|
- app/views/ish_manager/iro_strategies/_form.haml
|
482
483
|
- app/views/ish_manager/iro_strategies/edit.haml
|
483
484
|
- app/views/ish_manager/iro_strategies/new.haml
|
485
|
+
- app/views/ish_manager/iro_watches/_form.haml
|
486
|
+
- app/views/ish_manager/iro_watches/index.haml
|
484
487
|
- app/views/ish_manager/kaminari/_first_page.html.erb
|
485
488
|
- app/views/ish_manager/kaminari/_gap.html.erb
|
486
489
|
- app/views/ish_manager/kaminari/_last_page.html.erb
|