mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-20 04:59:16 +00:00
43 lines
2.0 KiB
Plaintext
43 lines
2.0 KiB
Plaintext
- content_for :page_title do
|
|
= "Bulk Order Management"
|
|
|
|
= render :partial => 'spree/admin/shared/order_sub_menu'
|
|
|
|
%div{ 'ng-app' => 'ofn.bulk_order_management', 'ng-controller' => 'AdminOrderMgmtCtrl', 'ng-init' => "initialise('#{@spree_api_key}');" }
|
|
%div{ 'ng-show' => '!spree_api_key_ok' }
|
|
{{ api_error_msg }}
|
|
.filter_selects{ :class => "four columns alpha" }
|
|
.filter_select{ :class => "four columns alpha" }
|
|
Producer
|
|
%br
|
|
%select.select2{ :class => "four columns alpha", :id => 'supplier_filter', 'ng-model' => 'supplierFilter', 'ng-options' => 's.name for s in suppliers' }
|
|
.filter_select{ :class => "four columns alpha" }
|
|
Hub
|
|
%br
|
|
%select.select2{ :class => "four columns alpha", :id => 'distributor_filter', 'ng-model' => 'distributorFilter', 'ng-options' => 'd.name for d in distributors'}
|
|
|
|
%table.index#listing_orders.bulk
|
|
%thead
|
|
%tr
|
|
%th.id ID
|
|
%th.email Email
|
|
%th.date Order Date
|
|
%th.producer Producer
|
|
%th.variant Product (Unit): Var
|
|
%th.quantity Quantity
|
|
%th.max Max
|
|
%th.actions
|
|
Ask?
|
|
%input{ :type => 'checkbox', 'ng-model' => "confirmDelete" }
|
|
%tr.line_item{ 'ng-repeat' => 'line_item in lineItems | selectFilter:supplierFilter:distributorFilter', 'ng-class-even' => "'even'", 'ng-class-odd' => "'odd'" }
|
|
%td.id {{ line_item.id }}
|
|
%td.email {{ line_item.order.email }}
|
|
%td.date {{ line_item.order.completed_at }}
|
|
%td.producer {{ line_item.supplier.name }}
|
|
%td.variant {{ line_item.variant_unit_text }}
|
|
%td.quantity
|
|
%input{ :type => 'number', :name => 'quantity', 'ng-model' => "line_item.quantity", 'ofn-line-item-upd-attr' => "quantity" }
|
|
%td.max {{ line_item.max }}
|
|
%td.actions
|
|
%a{ 'ng-click' => "deleteLineItem(line_item)", :class => "delete-line-item icon-trash no-text" }
|
|
%input{ :type => "button", 'value' => 'Update', 'ng-click' => 'pendingChanges.submitAll()' } |