mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
show all permitted enterprises in order cycle summery
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
%td= order_cycle_form.text_field :orders_open_at, :class => 'datetimepicker', :value => order_cycle.orders_open_at
|
||||
%td= order_cycle_form.text_field :orders_close_at, :class => 'datetimepicker', :value => order_cycle.orders_close_at
|
||||
%td.suppliers
|
||||
- order_cycle.suppliers.managed_by(spree_current_user).each do |s|
|
||||
- order_cycle.suppliers.merge(OpenFoodNetwork::Permissions.new(spree_current_user).order_cycle_enterprises).each do |s|
|
||||
= s.name
|
||||
%br/
|
||||
%td= order_cycle.coordinator.name
|
||||
%td.distributors
|
||||
- order_cycle.distributors.managed_by(spree_current_user).each do |d|
|
||||
- order_cycle.distributors.merge(OpenFoodNetwork::Permissions.new(spree_current_user).order_cycle_enterprises).each do |d|
|
||||
= d.name
|
||||
%br/
|
||||
|
||||
|
||||
@@ -471,6 +471,10 @@ feature %q{
|
||||
# I should see only the order cycle I am coordinating
|
||||
page.should have_content oc_user_coordinating.name
|
||||
page.should_not have_content oc_for_other_user.name
|
||||
|
||||
# The order cycle should show enterprises that I manage
|
||||
page.should have_selector 'td.suppliers', text: supplier_managed.name
|
||||
page.should have_selector 'td.distributors', text: distributor_managed.name
|
||||
|
||||
# The order cycle should not show enterprises that I don't manage
|
||||
page.should_not have_selector 'td.suppliers', text: supplier_unmanaged.name
|
||||
|
||||
Reference in New Issue
Block a user