mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
In the order cycle pages (both create and edit, both simple and normal), add OC coordinator to schedules request to the server and make the controller filter schedules of order cycles coordinated by that enterprise id.
This commit is contained in:
@@ -3,6 +3,8 @@ angular.module("admin.resources").factory 'ScheduleResource', ($resource) ->
|
||||
'index':
|
||||
method: 'GET'
|
||||
isArray: true
|
||||
params:
|
||||
enterprise_id: '@enterprise_id'
|
||||
'create':
|
||||
method: 'POST'
|
||||
'update':
|
||||
|
||||
@@ -40,7 +40,7 @@ angular.module("admin.resources").factory "Schedules", ($q, $injector, RequestMo
|
||||
delete @byID[schedule.id]
|
||||
StatusMessage.display 'success', "#{t('js.admin.order_cycles.schedules.deleted_schedule')}: '#{schedule.name}'"
|
||||
|
||||
index: ->
|
||||
request = ScheduleResource.index (data) => @load(data)
|
||||
index: (params) ->
|
||||
request = ScheduleResource.index params, (data) => @load(data)
|
||||
RequestMonitor.load(request.$promise)
|
||||
request
|
||||
|
||||
Reference in New Issue
Block a user