mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-16 04:24:23 +00:00
Getting in notification to select order cycle
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user