mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Prepare angular controller and serialized data
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.orders").controller "ordersCtrl", ($scope, $compile, $attrs, shops, orderCycles) ->
|
||||
angular.module("admin.orders").controller "ordersCtrl", ($scope, $compile, $attrs, Orders) ->
|
||||
$scope.$compile = $compile
|
||||
$scope.shops = shops
|
||||
$scope.orderCycles = orderCycles
|
||||
@@ -6,6 +6,10 @@ angular.module("admin.orders").controller "ordersCtrl", ($scope, $compile, $attr
|
||||
$scope.distributor_id = parseInt($attrs.ofnDistributorId)
|
||||
$scope.order_cycle_id = parseInt($attrs.ofnOrderCycleId)
|
||||
|
||||
$scope.orders = Orders.all
|
||||
|
||||
Orders.index(per_page: 15)
|
||||
|
||||
$scope.validOrderCycle = (oc) ->
|
||||
$scope.orderCycleHasDistributor oc, parseInt($scope.distributor_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user