app/views/iro/positions/_table.haml in iron_warbler-2.0.7.25 vs app/views/iro/positions/_table.haml in iron_warbler-2.0.7.26

- old
+ new

@@ -15,16 +15,15 @@ Expires on %br Strategy %th.q Q %th.strikes - -# .a outer_strike, inner_strike Strike %th.begin_price - .a Begin outer price, delta + .a Begin price, delta %th.max-loss Max Loss - %th.max-gain Max Gain + -# %th.max-gain Max Gain %th .end_price End Price, delta %th .net Net Amount (%) %th @@ -62,13 +61,12 @@ .d-flex = button_to 'x', position_path(position), method: :delete, data: { confirm: 'Are you sure?' } = link_to '[~]', edit_position_path(position) = link_to '[dup]', duplicate_position_path(position) .d-flex - = link_to '[re]', refresh_position_path(pos) - - if true # position.next_reasons.present? && position.rollp > 0.5 - = link_to '[roll]', prepare_to_roll_position_path(pos) + = link_to '[sync]', sync_position_path(pos) + = link_to '[roll]', prepare_to_roll_position_path(pos) %td.ticker = position.stock.ticker %br @@ -86,36 +84,36 @@ %td.q <b>#{position.quantity}</b> %td.strikes .long-or-short-item - .outer-strike= pp_amount position.outer_strike - .inner-strike= pp_amount position.inner_strike + .outer-strike= pp_amount position.outer.strike + .inner-strike= pp_amount position.inner.strike %td.begin_price .long-or-short-item .begin-outer-price - = pp_amount position.begin_outer_price - <b>D</b> #{pp_delta position.begin_outer_delta} + = pp_amount position.outer.begin_price + &nbsp;<b>D</b>&nbsp; #{pp_delta position.outer.begin_delta} .begin-inner-price - = pp_amount position.begin_inner_price - <b>D</b> #{pp_delta position.begin_inner_delta} + = pp_amount position.inner.begin_price + &nbsp;<b>D</b>&nbsp; #{pp_delta position.inner.begin_delta} %td .max-loss= pp_amount position.max_loss * pos.q * 100, precision: 0 - %td - .max-gain= pp_amount position.max_gain * pos.q * 100, precision: 0 - .max-gainp - -# = pp_percent( -1 * position.max_gain / position.max_loss ) rescue '-' # undef. for covered calls + -# %td + -# .max-gain= pp_amount position.max_gain * pos.q * 100, precision: 0 + -# .max-gainp + -# -# = pp_percent( -1 * position.max_gain / position.max_loss ) rescue '-' # undef. for covered calls - %td.end_price + %td.end .long-or-short-item .end-outer-price - = pp_amount position.end_outer_price - <b>D</b> #{pp_delta position.end_outer_delta} + = pp_amount position.outer.end_price + &nbsp;<b>D</b>&nbsp; #{pp_delta position.outer.end_delta} .end-inner-price - = pp_amount position.end_inner_price - <b>D</b> #{pp_delta position.end_inner_delta} + = pp_amount position.inner.end_price + &nbsp;<b>D</b>&nbsp; #{pp_delta position.inner.end_delta} %td.net .a= pp_amount position.net_amount * pos.q * 100, precision: 0 rescue '@TODO' .a <i>#{pp_percent position.net_amount / position.max_gain rescue '@TODO'}</i> %td.breakeven = pp_amount pos.breakeven rescue '@TODO' @@ -126,15 +124,16 @@ <i> #{pp_percent position.rollp, precision: 0}</i> %td.next_position - if position.next_reasons.present? %i.fa.fa-expand.collapse-expand{ id: "pos-reasons-#{position.id}" } reasons = render '/iro/positions/reasons', reasons: position.next_reasons - .a= position.next_symbol - .a= position.next_delta + .a= position.autonxt .a - = pp_amount position.next_mark - \=> - = pp_amount position.next_outcome * 100 * position.quantity rescue nil + - if pos.autonxt + = link_to '[autonxt]', prepare2_position_path(pos.autonxt) + = pp_amount pos.autonxt.prev_gain_loss_amount + -# \=> + -# = pp_amount position.next_outcome * 100 * position.quantity rescue nil