 app = angular.module('order_cycle', ['ngResource'])
 
-app.controller 'AdminCreateOrderCycleCtrl', ($scope, OrderCycle, Enterprise) ->
+app.controller 'AdminCreateOrderCycleCtrl', ['$scope', 'OrderCycle', 'Enterprise', ($scope, OrderCycle, Enterprise) ->
   $scope.enterprises = Enterprise.index()
   $scope.supplied_products = Enterprise.supplied_products
 

        numVariants += if product.variants.length == 0 then 1 else product.variants.length

      numVariants
  }


app.directive 'datetimepicker', ['$parse', ($parse) ->


  $scope.submit = ->
    OrderCycle.create()
  ]

app.controller 'AdminEditOrderCycleCtrl', ['$scope', '$location', 'OrderCycle', 'Enterprise', ($scope, $location, OrderCycle, Enterprise) ->
  $scope.enterprises = Enterprise.index()
  $scope.supplied_products = Enterprise.supplied_products

