Improve delivery workflow; introduce sortable tables; use js.erb for deliveries
This commit is contained in:
parent
49cfa9aded
commit
65f61e09d5
18 changed files with 357 additions and 105 deletions
16
app/views/deliveries/_stock_article_for_adding.html.haml
Normal file
16
app/views/deliveries/_stock_article_for_adding.html.haml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
- css_class = ( @delivery and @delivery.includes_article? article ) ? ( 'unavailable' ) : ( false )
|
||||
%tr{:id => "stock_article_#{article.id}", :class => css_class}
|
||||
%td.sort-by-name
|
||||
= article.name
|
||||
%td.numeric= article.unit
|
||||
%td.numeric= number_to_currency article.price
|
||||
%td.numeric= number_to_percentage article.tax
|
||||
%td.sort-by-category= article.article_category.name
|
||||
%td
|
||||
.btn-group
|
||||
= link_to t('.action_edit'), edit_stock_article_supplier_deliveries_path(@supplier, :stock_article_id => article.id), remote: true, class: 'btn btn-mini'
|
||||
= link_to t('.action_other_price'), new_stock_article_supplier_deliveries_path(@supplier, :old_stock_article_id => article.id), remote: true, class: 'btn btn-mini'
|
||||
- if @delivery and @delivery.includes_article? article
|
||||
= link_to t('.action_add_to_delivery'), add_stock_change_supplier_deliveries_path(@supplier, :stock_article_id => article.id), :method => :post, remote: true, class: 'button-add-stock-change btn btn-mini', disabled: 'disabled'
|
||||
- else
|
||||
= link_to t('.action_add_to_delivery'), add_stock_change_supplier_deliveries_path(@supplier, :stock_article_id => article.id), :method => :post, remote: true, class: 'button-add-stock-change btn btn-mini'
|
||||
Loading…
Add table
Add a link
Reference in a new issue