Getting in notification to select order cycle

This commit is contained in:
Will Marshall
2014-04-07 13:14:32 +10:00
parent 5c999fd9cf
commit 1c22a2c848
4 changed files with 16 additions and 10 deletions

View File

@@ -1,5 +1,10 @@
Darkswarm.controller "OrderCycleCtrl", ($scope, $rootScope, OrderCycle) ->
Darkswarm.controller "OrderCycleCtrl", ($scope, $rootScope, OrderCycle, $tour) ->
$scope.order_cycle = OrderCycle.order_cycle
$scope.OrderCycle = OrderCycle
$scope.changeOrderCycle = ->
$tour.end()
OrderCycle.push_order_cycle()
if !OrderCycle.selected()
$tour.start()

View File

@@ -7,9 +7,8 @@ Darkswarm.factory 'OrderCycle', ($resource, Product, orderCycleData) ->
Product.update()
@orders_close_at: ->
if @order_cycle
if @selected()
@order_cycle.orders_close_at
else
""
@selected: ->
@order_cycle != null
@order_cycle != null and !$.isEmptyObject(@order_cycle) and @order_cycle.orders_close_at != undefined