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:
luisramos0
2019-06-09 23:15:44 +01:00
parent 568e3003ba
commit 6cf705ea55
12 changed files with 41 additions and 12 deletions

View File

@@ -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':

View File

@@ -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