Do not show flash message if we're performing an async update without reload

This commit is contained in:
Rohan Mitchell
2015-11-17 11:42:16 +11:00
parent 9fef0a9909
commit a2c0088c91
4 changed files with 21 additions and 5 deletions

View File

@@ -133,7 +133,7 @@ angular.module('admin.orderCycles').factory('OrderCycle', ($resource, $window, $
update: (destination) ->
oc = new OrderCycle({order_cycle: this.dataForSubmit()})
oc.$update {order_cycle_id: this.order_cycle.id}, (data) =>
oc.$update {order_cycle_id: this.order_cycle.id, reloading: (if destination? then 1 else 0)}, (data) =>
if data['success']
if destination?
$window.location = destination