Remove supplied products from enterprise serializer and from UI side

This list of products s now loaded in a specific call to ExchangeProducts and for each specific exchange
This commit is contained in:
luisramos0
2019-11-11 13:26:26 +00:00
parent 24d7672abb
commit 2b3bc6d1ff
6 changed files with 12 additions and 88 deletions

View File

@@ -4,7 +4,6 @@ angular.module('admin.orderCycles')
$scope.supplier_enterprises = Enterprise.producer_enterprises
$scope.distributor_enterprises = Enterprise.hub_enterprises
$scope.supplied_products = Enterprise.supplied_products
$scope.exchangeSelectedVariants = (exchange) ->
OrderCycle.exchangeSelectedVariants(exchange)

View File

@@ -12,7 +12,6 @@ angular.module('admin.orderCycles').factory('Enterprise', ($resource) ->
enterprises: {}
producer_enterprises: []
hub_enterprises: []
supplied_products: []
loaded: false
index: (params={}, callback=null) ->
@@ -22,9 +21,6 @@ angular.module('admin.orderCycles').factory('Enterprise', ($resource) ->
@producer_enterprises.push(enterprise) if enterprise.is_primary_producer
@hub_enterprises.push(enterprise) if enterprise.sells == 'any'
for product in enterprise.supplied_products
@supplied_products.push(product)
@loaded = true
(callback || angular.noop)(@enterprises)