mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-30 06:31:16 +00:00
Show counts including all variants in order cycle exchanges
This commit is contained in:
@@ -8,6 +8,13 @@ angular.module('admin.orderCycles')
|
||||
$scope.productsLoading = ->
|
||||
RequestMonitor.loading
|
||||
|
||||
$scope.exchangeLoadedVariants = (exchange) ->
|
||||
loaded_variants = 0
|
||||
angular.forEach $scope.enterprises[exchange.enterprise_id].supplied_products, (product) ->
|
||||
loaded_variants += product.variants.length
|
||||
|
||||
loaded_variants
|
||||
|
||||
$scope.setSelectAllVariantsCheckboxValue = (exchange, totalNumberOfVariants) ->
|
||||
exchange.select_all_variants = $scope.exchangeSelectedVariants(exchange) >= totalNumberOfVariants
|
||||
|
||||
|
||||
Reference in New Issue
Block a user