Display quantity in field for BOM

This commit is contained in:
Rob H
2014-01-31 10:48:28 +08:00
parent 67db698a50
commit a5ffdbb1ba
2 changed files with 5 additions and 4 deletions

View File

@@ -35,7 +35,8 @@
%td.date {{ line_item.order.completed_at }}
%td.producer {{ line_item.supplier.name }}
%td.variant {{ line_item.variant_unit_text }}
%td.quantity {{ line_item.quantity }}
%td.quantity
%input{ :type => 'number', :name => 'quantity', 'ng-model' => "line_item.quantity" }
%td.max {{ line_item.max }}
%td.actions
%a{ 'ng-click' => "deleteLineItem(line_item)", :class => "delete-line-item icon-trash no-text" }

View File

@@ -69,10 +69,10 @@ feature %q{
page.should have_selector "td.variant", text: li2.product.name, :visible => true
end
it "displays a column for quantity" do
it "displays a field for quantity" do
page.should have_selector "th.quantity", text: "QUANTITY", :visible => true
page.should have_selector "td.quantity", text: li1.quantity.to_s, :visible => true
page.should have_selector "td.quantity", text: li2.quantity.to_s, :visible => true
page.should have_field "quantity", with: li1.quantity.to_s, :visible => true
page.should have_field "quantity", with: li2.quantity.to_s, :visible => true
end
it "displays a column for max quantity" do