mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Sort enterprises by name on enterprise fees admin page
This commit is contained in:
@@ -8,6 +8,7 @@ module Admin
|
||||
def index
|
||||
@include_calculators = params[:include_calculators].present?
|
||||
@enterprise = current_enterprise
|
||||
@enterprises = Enterprise.managed_by(spree_current_user).by_name
|
||||
|
||||
blank_enterprise_fee = EnterpriseFee.new
|
||||
blank_enterprise_fee.enterprise = current_enterprise
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
%tr{'ng-repeat' => 'enterprise_fee in enterprise_fees | filter:query'}
|
||||
%td
|
||||
= f.ng_hidden_field :id
|
||||
= f.ng_collection_select :enterprise_id, Enterprise.managed_by(spree_current_user), :id, :name, 'enterprise_fee.enterprise_id', :include_blank => true
|
||||
= f.ng_collection_select :enterprise_id, @enterprises, :id, :name, 'enterprise_fee.enterprise_id', :include_blank => true
|
||||
%td= f.ng_select :fee_type, enterprise_fee_type_options, 'enterprise_fee.fee_type'
|
||||
%td= f.ng_text_field :name
|
||||
%td= f.ng_collection_select :calculator_type, @calculators, :name, :description, 'enterprise_fee.calculator_type', {'class' => 'calculator_type', 'ng-model' => 'calculatorType', 'spree-ensure-calculator-preferences-match-type' => "1"}
|
||||
|
||||
Reference in New Issue
Block a user