Remove unused edit variable in articles_by-views

The edit version is already handled in group_order_article_edit_result().
This commit is contained in:
Patrick Gansterer 2020-03-23 12:16:34 +01:00
parent 17059a8104
commit f8a4341c76
6 changed files with 6 additions and 7 deletions

View file

@ -10,4 +10,4 @@
= ", #{pkg_info}".html_safe unless pkg_info.blank? = ", #{pkg_info}".html_safe unless pkg_info.blank?
) )
- for goa in order_article.group_order_articles.ordered - for goa in order_article.group_order_articles.ordered
= render 'shared/articles_by/article_single_goa', goa: goa, edit: (edit rescue nil) = render 'shared/articles_by/article_single_goa', goa: goa

View file

@ -1,5 +1,5 @@
%tr{class: if goa.result == 0 then 'unavailable' end, id: "goa_#{goa.id}"} %tr{class: if goa.result == 0 then 'unavailable' end, id: "goa_#{goa.id}"}
%td{:style => "width:70%"}= goa.group_order.ordergroup_name %td{:style => "width:70%"}= goa.group_order.ordergroup_name
%td.center= "#{goa.quantity} + #{goa.tolerance}" %td.center= "#{goa.quantity} + #{goa.tolerance}"
%td.center.input-delta= (edit or true rescue true) ? group_order_article_edit_result(goa) : goa.result %td.center.input-delta= group_order_article_edit_result(goa)
%td.price{data: {value: goa.total_price}}= number_to_currency(goa.total_price) %td.price{data: {value: goa.total_price}}= number_to_currency(goa.total_price)

View file

@ -9,6 +9,6 @@
%th= t 'shared.articles_by.price' %th= t 'shared.articles_by.price'
- for order_article in order.order_articles.ordered.includes([:article, :article_price]) - for order_article in order.order_articles.ordered.includes([:article, :article_price])
= render 'shared/articles_by/article_single', order_article: order_article, edit: (edit rescue nil) = render 'shared/articles_by/article_single', order_article: order_article
%tr %tr
%td{colspan: 4} %td{colspan: 4}

View file

@ -6,7 +6,7 @@
- total = 0 - total = 0
- for goa in group_order.group_order_articles.ordered.includes(:order_article) - for goa in group_order.group_order_articles.ordered.includes(:order_article)
- total += goa.total_price - total += goa.total_price
= render 'shared/articles_by/group_single_goa', goa: goa, edit: (edit rescue nil) = render 'shared/articles_by/group_single_goa', goa: goa
%tr{class: cycle('even', 'odd', :name => 'articles')} %tr{class: cycle('even', 'odd', :name => 'articles')}
%th{colspan: 7}= t 'shared.articles_by.price_sum' %th{colspan: 7}= t 'shared.articles_by.price_sum'
%th.price_sum{colspan: 2, data: {value: total}}= number_to_currency(total) %th.price_sum{colspan: 2, data: {value: total}}= number_to_currency(total)

View file

@ -2,10 +2,9 @@
%td.name= goa.order_article.article.name %td.name= goa.order_article.article.name
%td= goa.order_article.article.unit %td= goa.order_article.article.unit
%td.center= "#{goa.quantity} + #{goa.tolerance}" %td.center= "#{goa.quantity} + #{goa.tolerance}"
%td.center.input-delta= (edit or true rescue true) ? group_order_article_edit_result(goa) : goa.result %td.center.input-delta= group_order_article_edit_result(goa)
%td.symbol × %td.symbol ×
%td= number_to_currency(goa.order_article.price.fc_price) %td= number_to_currency(goa.order_article.price.fc_price)
%td.symbol = %td.symbol =
%td.price{data: {value: goa.total_price}}= number_to_currency(goa.total_price) %td.price{data: {value: goa.total_price}}= number_to_currency(goa.total_price)
%td= pkg_helper goa.order_article.price %td= pkg_helper goa.order_article.price

View file

@ -14,4 +14,4 @@
%th= #heading_helper Article, :unit_quantity, short: true %th= #heading_helper Article, :unit_quantity, short: true
- for group_order in order.group_orders.ordered - for group_order in order.group_orders.ordered
= render 'shared/articles_by/group_single', group_order: group_order, edit: (edit rescue nil) = render 'shared/articles_by/group_single', group_order: group_order