mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Make simple create redirect to OC list but normal create to jump to incoming settings
This commit is contained in:
@@ -150,7 +150,10 @@ angular.module('admin.orderCycles').factory 'OrderCycle', ($resource, $window, S
|
||||
create: (destination) ->
|
||||
oc = new OrderCycleResource({order_cycle: this.dataForSubmit()})
|
||||
oc.$create (data) ->
|
||||
$window.location = destination
|
||||
if destination? && destination.length != 0
|
||||
$window.location = destination
|
||||
else if data.edit_path?
|
||||
$window.location = data.edit_path
|
||||
, (response) ->
|
||||
if response.data.errors?
|
||||
StatusMessage.display('failure', response.data.errors[0])
|
||||
|
||||
Reference in New Issue
Block a user