ish_manager 0.1.8.410 → 0.1.8.412

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: 8324ef683622d8aca6298965f060b9f7bb28c8d2ec6bbd99011b34914ccd6b70
4
- data.tar.gz: af207371888cee567d554cb1f0313fd717399dd42c93fc9b06f3b16fca0212fa
3
+ metadata.gz: 00f50c9d4c8e8eb28c03a8cf7b5a3bf9dad3a1942b7171cf0bd24ef9e4023b42
4
+ data.tar.gz: b8093f2152ec12c05daa5af3a57da34772492193c3413b129933520c24ad9c86
5
5
  SHA512:
6
- metadata.gz: 01d1fa18a16bcf11c0f991972eae21b57ed17024b33da5249d5396f85c812e8644448547f2fed3164ba565ee2daa89205b8b047e56d6727ee3f759b51f641d29
7
- data.tar.gz: bae46a73d36c3bcdfd0f098fd9d75f2e86cab52f6e50a0b8c8eb07810b64ba0f2195f80e51fe87f5af0c4d02974d923612fd74ec7b63d1b2c7f3b83dffde2548
6
+ metadata.gz: 9542bb26d8e7eab5e96416006bf0003fa8a2e4947c48004b0a50df093e177884af300f51186a8d9c632b9629e2aafcdbfa480e76db88e4da59ab144a06a4eaa5
7
+ data.tar.gz: e8547c17dc63d91f7858999446db3ea754109b37b9d0355c0394ccce58523f2a1dc392b2dcc32bdaf7374a53700311aab6f40005ddab3a33a43d441a174fdb04
@@ -25,6 +25,7 @@
25
25
  //= require ish_manager/email_conversations
26
26
  //= require ish_manager/email_templates
27
27
  //= require ish_manager/galleries
28
+ //= require ish_manager/iro
28
29
 
29
30
  const AppRouter = {
30
31
  gallery_update_ordering_path: ({ id, slug }) => `/manager/galleries/${slug || id}/update_ordering`,
@@ -0,0 +1,51 @@
1
+
2
+ $(document).ready(function () {
3
+
4
+ const origin = 23
5
+ scale = 200 // pixels per dollar
6
+
7
+
8
+
9
+ $(".gameuiW").each( function (idx, w) {
10
+
11
+ let ccStrike = $(w).data('ccStrike')
12
+ let ccStartPrice = $(w).data('ccStartprice') // e.g. 0.88
13
+ let ccCurrentPrice = $(w).data('ccCurrentprice')
14
+ let cUS = $(w).data('cus')
15
+
16
+ $(".c-u-s").each(function (idx, elem) {
17
+ $(elem).html(cUS)
18
+ })
19
+
20
+ $(".windW").each(function (idx, elem) {
21
+ $(elem).css('left', (origin - cUS)*scale)
22
+ })
23
+
24
+ $($(w).find('.elephantW')).css('left', (origin - ccStrike)* scale )
25
+ $(w).find('.elephantC > .amount').html( " $" + ccStrike )
26
+ $(w).find('.riderStart > .amount').html( " $" + ccStartPrice )
27
+ $(w).find('.riderStart').css('width', scale * ccStartPrice )
28
+ $(w).find('.riderStart').css('left', -1 * scale * ccStartPrice )
29
+ $(w).find('.riderStart2').css('width', scale * ccStartPrice )
30
+
31
+ let currentAmount = ((ccStartPrice - ccCurrentPrice)*100).toPrecision(1)/100
32
+ let ccCurrentGain = ccStartPrice - ccCurrentPrice
33
+ // logg(ccCurrentGain, 'ccCurrentGain')
34
+ // logg(currentAmount, 'currentAmount')
35
+ $(w).find('.riderCurrent > .amount').html( " $" + currentAmount )
36
+ let ans = `${-1*ccCurrentGain*scale}px`
37
+ logg(ans, 'ans')
38
+ $(w).find('.riderW').css('left', ans)
39
+
40
+ if (ccCurrentGain > 0) {
41
+ $(w).find('.riderCurrent').css('width', scale * ccCurrentGain )
42
+ } else {
43
+ ccCurrentGain = -1 * ccCurrentGain
44
+ $(w).find('.riderCurrent').css('width', scale * ccCurrentGain )
45
+ $(w).find('.riderCurrent').css('background', 'red')
46
+ $(w).find('.riderCurrent').css('right', `-${ccCurrentGain*scale}px`)
47
+ $(w).find('.rider').addClass('riderF')
48
+ }
49
+ })
50
+
51
+ })
@@ -155,6 +155,44 @@ table.bordered {
155
155
  text-align: center;
156
156
  }
157
157
 
158
+ .chip,
159
+ // .main-header a.chip,
160
+ ._ {
161
+ margin-right: 20px;
162
+ // border: 1px solid black;
163
+
164
+ border-radius: 1em 0 0 1em;
165
+ padding-left: .6em;
166
+
167
+ background: white;
168
+ position: relative;
169
+
170
+
171
+
172
+ &::after {
173
+ // border: 1px solid red;
174
+
175
+ content: "";
176
+
177
+ position: absolute;
178
+ right: -30px;
179
+ width: 10px;
180
+ display: block;
181
+ // background: inherit;
182
+ // background: red;
183
+ margin: 0 20px;
184
+ top: -1px;
185
+ bottom: 0;
186
+
187
+ border-top: 16px solid white;
188
+ border-bottom: 16px solid white;
189
+
190
+ border-right: 10px solid transparent;
191
+
192
+ // border: 1px solid red;
193
+ }
194
+ }
195
+
158
196
  .close {
159
197
  position: absolute;
160
198
  top: 0;
@@ -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
  }
@@ -113,223 +114,328 @@
113
114
  }
114
115
  }
115
116
 
117
+
118
+
119
+
120
+
121
+
122
+
123
+ /*
124
+ * GameUI in Purse
125
+ **/
116
126
  .gameuiW {
117
- border: 1px solid cyan;
118
- border-radius: 0.5em;
127
+ border: 1px solid #ff9966;
128
+ border-radius: 1em;
119
129
 
120
130
  position: relative;
121
131
 
122
- margin-bottom: 100px;
123
-
124
- width: 1000px;
132
+ width: 1200px;
125
133
  height: 200px;
126
134
 
135
+ margin-bottom: 10px;
136
+
127
137
  z-index: 0;
128
138
 
129
- .elephant {
130
- // border: 2px solid yellow;
139
+ .gameui {
131
140
 
132
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04103931/200x125-elephant-1rmTiny.png');
133
- width: 200px;
134
- height: 125px;
141
+ border-left: 1px dashed black;
135
142
 
136
143
  position: absolute;
137
144
 
138
- left: 700px;
139
- bottom: 0;
145
+ height: 100%;
146
+ left: 50%;
147
+ width: 600px;
148
+
149
+ .gameuiC {
150
+ // border: 2px solid red;
151
+
152
+ background-color: brown;
140
153
 
141
- &::after { /* arrow-up */
142
- content: "";
143
154
  position: absolute;
155
+
156
+ right: 0;
157
+ left: 0;
144
158
  bottom: 0;
145
- right: calc( 50% - 25px );
159
+ height: 10px;
146
160
 
147
- width: 0;
148
- height: 0;
149
- border-left: 25px solid transparent;
150
- border-right: 25px solid transparent;
161
+ &::before {
162
+ content: "24";
163
+ color: white;
164
+ position: absolute;
165
+ left: -200px;
166
+ width: 200px;
167
+ height: 2px;
168
+ background: white;
169
+ }
170
+ &::after {
171
+ content: "22";
172
+ color: white;
173
+ position: absolute;
174
+ left: 200px;
175
+ width: 200px;
176
+ height: 2px;
177
+ background: white;
178
+ }
179
+ }
151
180
 
152
- border-bottom: 25px solid red;
181
+ .elephantW {
182
+ border: 2px solid black;
183
+ position: absolute;
184
+ // left: ?? ; /* data: cc strike */
153
185
  }
154
- }
155
186
 
156
- .elephantNext {
157
- // border: 5px solid white;
158
- border-radius: 50%;
187
+ .elephant {
188
+ // border: 2px solid yellow;
159
189
 
160
- display: none;
190
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04103931/200x125-elephant-1rmTiny.png');
191
+ width: 200px;
192
+ height: 125px;
161
193
 
162
- position: absolute;
163
- bottom: -50px;
164
- margin-left: 50px;
165
- transform: scale(1.2);
166
- opacity: 0.33;
167
- background-color: green;
194
+ position: absolute;
168
195
 
169
- }
196
+ left: -100px;
197
+ padding-left: 100px;
198
+ bottom: 0;
170
199
 
171
- .grid {
172
- background: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04110701/500x250-gridTiny.png');
173
- background-size: 100%;
174
- background-position: bottom center;
200
+ &::after { /* arrow-up */
201
+ content: "";
202
+ position: absolute;
203
+ bottom: 0;
204
+ right: calc( 50% - 25px );
175
205
 
176
- width: 1000px;
177
- height: 200px;
206
+ width: 0;
207
+ height: 0;
208
+ border-left: 25px solid transparent;
209
+ border-right: 25px solid transparent;
178
210
 
179
- position: absolute;
180
- bottom: 0;
181
- left: 0;
211
+ border-bottom: 25px solid red;
212
+ }
182
213
 
183
- z-index: -1;
184
- }
214
+ .elephantC {
215
+ // border: 10px solid black;
185
216
 
186
- .ground {
187
- border-bottom: 5px solid gray;
217
+ // width: 10px;
218
+ // height: 10px;
188
219
 
189
- position: absolute;
190
- left: 0;
191
- right: 0;
192
- top: 100%;
193
- bottom: -50px;
220
+ z-index: 1;
221
+ position: absolute;
222
+ color: #333;
223
+ background: #ddd;
224
+ display: inline-block;
194
225
 
195
- background: gray;
196
- }
226
+ .q {
227
+ border: 2px solid #eee;
228
+ color: #fff;
229
+ background: #ccc;
230
+ padding: 0.4em;
231
+ border-radius: 50%;
197
232
 
198
- .groundedW {
199
- position: absolute;
233
+ position: absolute;
234
+ left: 50px;
235
+ top: -25px;
236
+ }
237
+ }
200
238
 
201
- right: -250px;
202
- bottom: 0;
203
239
 
204
- .grounded {
205
- border: 2px solid pink;
206
- background: rgba(255,255,255, 0.75);
240
+ }
241
+
242
+ .elephantNext {
243
+ // border: 5px solid white;
207
244
  border-radius: 50%;
208
245
 
209
- width: 100px;
210
- height: 100px;
246
+ display: none;
211
247
 
212
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
213
- background-size: cover;
248
+ position: absolute;
249
+ bottom: -50px;
250
+ margin-left: 50px;
251
+ transform: scale(1.2);
252
+ opacity: 0.33;
253
+ background-color: green;
254
+ }
214
255
 
215
- .groundedStart {
216
- // border: 2px solid white;
217
- position: absolute;
218
- background: #999;
219
- bottom: 50px;
220
- top: 11px;
221
- left: 50%;
222
- right: -40px;
256
+ .groundedW {
257
+ position: absolute;
223
258
 
224
- z-index: -1;
225
- }
259
+ right: -250px;
260
+ bottom: 0;
226
261
 
227
- .groundedCurrent {
228
- position: absolute;
229
- background: red;
230
- bottom: 45px;
231
- top: 52px;
232
- left: 50%;
233
- right: -30px;
262
+ .grounded {
263
+ border: 2px solid pink;
264
+ background: rgba(255,255,255, 0.75);
265
+ border-radius: 50%;
266
+
267
+ width: 100px;
268
+ height: 100px;
269
+
270
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
271
+ background-size: cover;
272
+
273
+ .groundedStart {
274
+ // border: 2px solid white;
275
+ position: absolute;
276
+ background: #999;
277
+ bottom: 50px;
278
+ top: 11px;
279
+ left: 50%;
280
+ right: -40px;
281
+
282
+ z-index: -1;
283
+ }
284
+
285
+ .groundedCurrent {
286
+ position: absolute;
287
+ background: red;
288
+ bottom: 45px;
289
+ top: 52px;
290
+ left: 50%;
291
+ right: -30px;
292
+ }
234
293
  }
235
294
  }
236
- }
237
295
 
238
- .spearmanW {
239
- border: 2px solid yellow;
296
+ .riderCurrent {
297
+ display: none;
240
298
 
241
- position: absolute;
242
- display: inline-block;
299
+ position: absolute;
300
+ background: #339933;
301
+ bottom: -7px;
302
+ height: 5px;
303
+ right: 0;
304
+ // width: 105px;
243
305
 
244
- left: 800px;
306
+ }
307
+ .riderStart {
308
+ // border: 2px solid #cc33ff;
309
+ border-right: 2px solid #cc33ff;
245
310
 
246
- .spearman {
247
- // border: 2px solid orange;
248
- background: rgba(255,255,255, 0.75);
249
- border-radius: 50%;
311
+ position: absolute;
312
+ background: #999;
313
+ // background: red;
314
+ bottom: 50px;
315
+ height: 35px;
316
+ // right: 50px;
317
+ // right: 0;
318
+ bottom: 50px;
319
+ // width: 176px;
320
+ // left: 0;
321
+
322
+ z-index: -1;
323
+ }
324
+
325
+ .riderStart2 {
326
+ // border: 2px solid #30033f;
250
327
 
251
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
252
- background-size: cover;
328
+ position: absolute;
329
+ background: #999;
330
+ // background: red;
331
+ bottom: 50px;
332
+ height: 35px;
333
+ // right: 50px;
334
+ right: left;
335
+ bottom: 50px;
336
+ // width: 176px;
337
+ // left: 0;
338
+
339
+ z-index: -1;
340
+ }
253
341
 
254
- width: 100px;
255
- height: 100px;
342
+ .riderW {
343
+ // border: 2px solid yellow;
256
344
 
257
345
  position: absolute;
258
- left: -50px;
259
346
 
260
- // &::after { /* arrow-up */
261
- // content: "";
262
- // position: absolute;
263
- // bottom: 0;
264
- // right: calc( 50% - 25px );
347
+ left: 0;
348
+ top: 20px;
349
+
350
+ .rider {
351
+ // border: 2px solid orange;
265
352
 
266
- // width: 0;
267
- // height: 0;
268
- // border-left: 25px solid transparent;
269
- // border-right: 25px solid transparent;
353
+ // background: rgba(255,255,255, 0.5);
354
+ border-radius: 50%;
270
355
 
271
- // border-bottom: 25px solid red;
272
- // }
356
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
357
+ background-size: cover;
273
358
 
274
- .spearmanStart {
275
359
  position: absolute;
276
- background: #999;
277
- bottom: 50px;
278
- top: 11px;
279
- right: 50%;
280
- left: -134px;
360
+ width: 100px;
361
+ left: -50px;
362
+ height: 100px;
363
+ bottom: 0;
364
+ padding-left: 50px;
365
+ padding-top: 50px;
281
366
 
282
- z-index: -1;
283
- }
284
367
 
285
- .spearmanCurrent {
286
- position: absolute;
287
- background: red;
288
- bottom: 45px;
289
- top: 52px;
290
- right: 50%;
291
- left: -97px;
368
+
369
+ .riderC {
370
+ border: 6px solid white;
371
+ border-radius: 6px;
372
+
373
+ position: absolute;
374
+ left: calc( 50% - 6px );
375
+ bottom: calc( 50% - 6px );
376
+
377
+ }
292
378
  }
293
- }
294
- }
295
379
 
296
- .windW {
297
- // border: 2px solid blue;
380
+ .riderF {
381
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/05142539/200x200-spearman-rmFTiny.png');
382
+ }
298
383
 
299
- position: absolute;
300
- left: 910px; /* ( <price> - 20 ) * 200 */
301
- bottom: 0;
384
+ }
302
385
 
303
- &::after { /* arrow-up */
304
- border-bottom: 25px solid yellow;
386
+ .windW {
387
+ border: 2px solid blue;
305
388
 
306
- content: "";
307
389
  position: absolute;
390
+ left: 232px; /* Data: current underlying strike */
308
391
  bottom: 0;
309
- // right: 50%;
310
- left: -25px;
311
392
 
312
- // width: 0;
313
- // height: 0;
314
- border-left: 25px solid transparent;
315
- border-right: 25px solid transparent;
316
- }
317
393
 
318
- .wind {
394
+ &::before { /* arrow-up */
395
+ border-bottom: 25px solid yellow;
319
396
 
320
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04104623/200x200-windTiny.png');
321
- background-position: bottom center;
397
+ content: "";
398
+ position: absolute;
399
+ bottom: 0;
400
+ left: -25px;
401
+ z-index: 1;
322
402
 
323
- opacity: 0.5;
403
+ border-left: 25px solid transparent;
404
+ border-right: 25px solid transparent;
405
+ }
324
406
 
325
- width: 200px;
326
- height: 200px;
407
+ .wind {
408
+ // border: 2px solid green;
327
409
 
328
- margin-left: -25px;
410
+ display: flex;
411
+ flex-direction: column-reverse;
412
+
413
+ .c-u-s {
414
+ position: relative;
415
+ z-index: 2;
416
+
417
+ background: #333;
418
+ color: white;
419
+ display: inline-block
420
+ }
421
+
422
+ .windC {
423
+ // border: 1px solid red;
329
424
 
330
- .windC {
425
+ position: absolute;
426
+ bottom: 0;
427
+ left: 0;
428
+
429
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04104623/200x200-windTiny.png');
430
+ background-position: bottom center;
431
+ margin-left: -25px;
432
+
433
+ opacity: 0.5;
434
+
435
+ width: 200px;
436
+ height: 200px;
437
+ }
331
438
  }
332
439
  }
333
440
  }
334
-
335
441
  }
@@ -43,7 +43,7 @@ class ::IshManager::IroPursesController < IshManager::ApplicationController
43
43
  @positions = @purse.positions.order({ expires_on: :asc, strike: :asc })
44
44
  @positions.map &:refresh
45
45
 
46
- render @purse.parsed_config[:kind] || 'show'
46
+ render @purse.parsed_config[:kind] || params[:kind] || 'show'
47
47
  end
48
48
 
49
49
  def update
@@ -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
@@ -61,6 +61,7 @@ module IshManager
61
61
  "$ #{'%.2f' % a}"
62
62
  end
63
63
  def pp_money a; pp_amount a; end
64
+ def pp_currency a; pp_amount a; end
64
65
  def pp_percent a
65
66
  "#{(a*100).round(2)}%"
66
67
  end
@@ -52,7 +52,8 @@
52
52
  .a
53
53
  %ul
54
54
  %li
55
- = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX)
55
+ .chip
56
+ = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX)
56
57
  = link_to '[+]', new_email_context_path
57
58
  %li
58
59
  = link_to "Templates (#{Ish::EmailTemplate.all.count})", email_templates_path
@@ -97,6 +98,7 @@
97
98
  %span.label Purses:
98
99
  - Iro::Purse.all.map do |p|
99
100
  = link_to "[#{p.id}]", iro_purse_path(p)
101
+ = link_to "[gui]", iro_purse_gameui_path(p)
100
102
  = link_to '[+]', new_iro_purse_path
101
103
  %li
102
104
  = link_to 'Watches', iro_watches_path
@@ -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.padded
2
+ .iro-purses-show-gameui.padded
3
3
  .max-width
4
4
  .header
5
5
  %h4.title
@@ -14,42 +14,64 @@
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
- %h5.collapse-expand#gameuiPositions1
24
+
25
+ %h5.collapse-expand#gameuiPositions
26
26
  Gameui Positions (#{@positions.length})
27
27
  = link_to '[+]', new_iro_position_path({ iro_purse_id: @purse.id })
28
- .gameuiW
29
- .gameui
30
- .gameuiC
31
-
32
-
33
- .elephant
34
- .windW
35
- .wind
36
- .windC
37
- .ground
38
- .grid
39
- .spearmanW
40
- .spearman
41
- .spearmanStart
42
- .spearmanCurrent
43
- .groundedW
44
- .grounded
45
- .groundedC
46
- .groundedStart
47
- .groundedCurrent
48
-
49
- .elephant.elephantNext
50
-
51
-
52
- %h5.collapse-expand#positions2
28
+
29
+ .gameui-positions
30
+ - @positions.each do |p|
31
+
32
+ -# something like, $23 Apr-14
33
+ .gameuiW.show-amounts{ data: { cc: { strike: p.strike, startPrice: p.opened_price, currentPrice: p.current_price, cus: p.strategy.current_underlying_strike } } }
34
+ .gameui
35
+ .gameuiC
36
+
37
+ .elephantW
38
+ .elephant
39
+ .elephantC
40
+
41
+ .amount
42
+
43
+ .q= p.quantity
44
+
45
+ .riderW
46
+ .rider
47
+ .riderC
48
+
49
+ .riderStart
50
+ .amount
51
+ .riderCurrent
52
+ .amount
53
+ .riderStart2
54
+
55
+ .sunflowerW
56
+ .sunflower
57
+ .sunflowerC
58
+
59
+ .days-left= (p.expires_on.to_date - Time.now.to_date).to_i
60
+
61
+ .windW
62
+ .wind
63
+ .c-u-s= pp_currency p.strategy.current_underlying_strike
64
+ .windC
65
+
66
+
67
+ .spearW
68
+ .spear
69
+ .spearC
70
+ .spearStart
71
+ .spearCurrent
72
+
73
+
74
+ %h5.collapse-expand#spreadsheetPositions
53
75
  Positions (#{@positions.length})
54
76
  = link_to '[+]', new_iro_position_path({ iro_purse_id: @purse.id })
55
77
  .positions
@@ -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
@@ -28,6 +28,7 @@ IshManager::Engine.routes.draw do
28
28
 
29
29
  resources :iro_watches
30
30
 
31
+ get 'iro_purses/:id/show-gameui', to: 'iro_purses#show', as: :iro_purse_gameui, defaults: { kind: 'show_gameui' }
31
32
  resources :iro_purses
32
33
 
33
34
  resources :iro_strategies
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.410
4
+ version: 0.1.8.412
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -251,6 +251,7 @@ files:
251
251
  - app/assets/javascripts/ish_manager/email_conversations.js
252
252
  - app/assets/javascripts/ish_manager/email_templates.js
253
253
  - app/assets/javascripts/ish_manager/galleries.js
254
+ - app/assets/javascripts/ish_manager/iro.js
254
255
  - app/assets/javascripts/ish_manager/maps.js
255
256
  - app/assets/javascripts/ish_manager/shared.js
256
257
  - app/assets/javascripts/ish_manager/vendor/bootstrap.min.js