ish_manager 0.1.8.411 → 0.1.8.413

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: 8b9d3de89ed743dad854899b10bcc63d1ba88105cf3fcb2f456c56890f6cc508
4
- data.tar.gz: c730a3640e159a49741dfcf67e730afa1c96239c629ddda5b25054658876a108
3
+ metadata.gz: ac60f7cd88786021285d1497b25f91540c45f639d1912ef070eb3329f2e1f15e
4
+ data.tar.gz: 21a8968131ae5f0075c774f3ad27cfdc0fe9d2927c0150f8c3d28f3366e03ef1
5
5
  SHA512:
6
- metadata.gz: fee4975f888a5d2ee1199f2ab7b912b1ceee306748ef7bc0c97489034b4740063ac00441b13f4f6319fb3ca870e24d5d28079af7abb5536d3ff2998f9a9f8729
7
- data.tar.gz: 53c327afd46d0494efffb26b658edeb2269a9b80718f8f6ef5f0fa341ff8b6b3a4e2ac2d2e3b9034fce2cc80089ef2731ab6f27875619fa0edca63cfd4e755de
6
+ metadata.gz: 7b4ea92b7f2208a3c80a2a4d478e29582ea2fd5aa37b99afdae807b6b8003f6fc21e0afef66d4ffb72195e25e4993e5ad2a7311b5be1ac2f6e5fa540235aadb6
7
+ data.tar.gz: 5195f3b41ac7dd1568878ef9ec5de62dbfde500ca3844ffe75e0f211b3f5433c724d1a9ead3578fd7508e4e3f71037513d9bea3945085539dd6d246b7a4ed0ad
@@ -6,7 +6,9 @@
6
6
  }
7
7
  }
8
8
 
9
- .iro-purses-show {
9
+ .iro-purses-show,
10
+ .iro-purses-show-gameui,
11
+ ._ {
10
12
  font-size: 14px;
11
13
 
12
14
  table {
@@ -89,7 +91,6 @@
89
91
  }
90
92
 
91
93
  .strategies {
92
-
93
94
  display: flex;
94
95
  flex-wrap: wrap;
95
96
  }
@@ -1,3 +1,4 @@
1
+ require 'csv'
1
2
 
2
3
  class ::IshManager::EmailContextsController < ::IshManager::ApplicationController
3
4
 
@@ -97,6 +98,22 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
97
98
  authorize! :show, @ctx
98
99
  end
99
100
 
101
+ def summary
102
+ authorize! :summary, Ish::EmailContext
103
+ @results = Ish::EmailContext.summary
104
+ puts! @results, 'r'
105
+
106
+ # headers["Content-Type"] ||= 'text/csv'
107
+
108
+ respond_to do |format|
109
+ format.html # show.html.erb
110
+ format.csv do
111
+ render layout: false
112
+ end
113
+ end
114
+
115
+ end
116
+
100
117
  def update
101
118
  @ctx = ::Ish::EmailContext.find params[:id]
102
119
  authorize! :update, @ctx
@@ -3,14 +3,14 @@ class ::IshManager::IroStrategiesController < IshManager::ApplicationController
3
3
 
4
4
  def create
5
5
  @strategy = Iro::CoveredCallStrategy.new params[:iro_strategy].permit!
6
- @strategy.iro_purse_id = Iro::Purse.where( user_id: current_user.id ).first.id
6
+ # @strategy.iro_purse_id = Iro::Purse.where( user_id: current_user.id ).first.id
7
7
  authorize! :create, @strategy
8
8
  flag = @strategy.save
9
9
  if flag
10
10
  flash[:notice] = 'Success.'
11
- redirect_to my_purse_path
11
+ redirect_to controller: 'ish_manager/iro_purses', action: :show, id: @strategy.iro_purse_id
12
12
  else
13
- flash[:alert] = "No luck: #{@strategy.full_errors.messages.join(', ')}."
13
+ flash[:alert] = "No luck: #{@strategy.errors.full_messages.join(', ')}."
14
14
  render action: 'new'
15
15
  end
16
16
  end
@@ -33,7 +33,7 @@ class ::IshManager::IroStrategiesController < IshManager::ApplicationController
33
33
  flash[:notice] = 'Success.'
34
34
  redirect_to my_purse_path
35
35
  else
36
- flash[:alert] = "No luck: #{@strategy.full_errors.messages.join(', ')}."
36
+ flash[:alert] = "No luck: #{@strategy.errors.full_messages.join(', ')}."
37
37
  render action: 'new'
38
38
  end
39
39
  end
@@ -73,6 +73,7 @@
73
73
  %li
74
74
  = link_to "Contexts (#{Ctx.notsent.length})", notsent_email_contexts_path
75
75
  = link_to '[+]', new_email_context_path
76
+ = link_to 'summary', email_contexts_summary_path( format: :csv )
76
77
 
77
78
  %li
78
79
  = link_to "Leads (#{Lead.kept.length})", leads_path
@@ -0,0 +1,4 @@
1
+ <%= CSV.generate_line ['date', 'count'] -%>
2
+ <%- @results.each do |result| -%>
3
+ <%= CSV.generate_line [ result['_id'], result['total'] ] -%>
4
+ <%- end -%>
File without changes
@@ -14,12 +14,11 @@
14
14
  -# %pre= @purse.config
15
15
  = render 'form', iro_purse: @purse
16
16
 
17
- %h5.collapse-expand#strategies Strategies (#{@strategies.length}) #{link_to '[+]', new_iro_strategy_path}
17
+ %h5.collapse-expand#strategies
18
+ Strategies (#{@strategies.length})
19
+ = link_to '[+]', new_iro_strategy_path({ iro_purse_id: @purse.id })
18
20
  .strategies.items
19
21
  - @strategies.each do |strat|
20
- -# .strategy.item
21
- -# = link_to '[~]', edit_iro_strategy_path( strat )
22
- -# <pre>#{JSON.pretty_generate( strat.display_attrs )}</pre>
23
22
  .strategy.item= render 'ish_manager/iro_strategies/form', strategy: strat
24
23
 
25
24
 
@@ -1,5 +1,5 @@
1
1
 
2
- .iro-purses-show-shameui.padded
2
+ .iro-purses-show-gameui.padded
3
3
  .max-width
4
4
  .header
5
5
  %h4.title
@@ -14,14 +14,14 @@
14
14
  -# %pre= @purse.config
15
15
  = render 'form', iro_purse: @purse
16
16
 
17
- %h5.collapse-expand#strategies Strategies (#{@strategies.length}) #{link_to '[+]', new_iro_strategy_path}
17
+ %h5.collapse-expand#strategies
18
+ Strategies (#{@strategies.length})
19
+ = link_to '[+]', new_iro_strategy_path({ iro_purse_id: @purse.id })
18
20
  .strategies.items
19
21
  - @strategies.each do |strat|
20
- -# .strategy.item
21
- -# = link_to '[~]', edit_iro_strategy_path( strat )
22
- -# <pre>#{JSON.pretty_generate( strat.display_attrs )}</pre>
23
22
  .strategy.item= render 'ish_manager/iro_strategies/form', strategy: strat
24
23
 
24
+
25
25
  %h5.collapse-expand#gameuiPositions
26
26
  Gameui Positions (#{@positions.length})
27
27
  = link_to '[+]', new_iro_position_path({ iro_purse_id: @purse.id })
@@ -2,6 +2,7 @@
2
2
  - url = strategy.new_record? ? iro_strategies_path : iro_strategy_path(strategy)
3
3
  .iro-strategies--form
4
4
  = form_for strategy, url: url, as: :iro_strategy do |f|
5
+ = hidden_field_tag 'iro_strategy[iro_purse_id]', params[:iro_purse_id]
5
6
  .field
6
7
  = "#{strategy.id}." if strategy.id
7
8
  = f.label :slug
data/config/routes.rb CHANGED
@@ -74,6 +74,7 @@ IshManager::Engine.routes.draw do
74
74
  get 'email_conversations/notin/:not_slug', to: 'email_conversations#index', as: :email_conversations_notin
75
75
  get 'email_conversations/show/:id', to: 'email_conversations#show', as: :email_conversation
76
76
 
77
+ get 'email_contexts/summary', to: 'email_contexts#summary', as: :email_contexts_summary
77
78
  get 'email_contexts/for_lead/:lead_id', to: 'email_contexts#index', as: :email_contexts_for_lead
78
79
  get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
79
80
  get 'email_contexts/new_with_template/:template_slug', to: 'email_contexts#new'
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.411
4
+ version: 0.1.8.413
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-05 00:00:00.000000000 Z
11
+ date: 2023-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -395,6 +395,8 @@ files:
395
395
  - app/views/ish_manager/email_contexts/index.haml
396
396
  - app/views/ish_manager/email_contexts/new.haml
397
397
  - app/views/ish_manager/email_contexts/show.haml
398
+ - app/views/ish_manager/email_contexts/summary.csv.erb
399
+ - app/views/ish_manager/email_contexts/summary.haml
398
400
  - app/views/ish_manager/email_conversations/index.haml
399
401
  - app/views/ish_manager/email_conversations/show.haml
400
402
  - app/views/ish_manager/email_filters/_form.haml