For a product with one or more on_demand variants, don't show 'On demand' at the product level

This commit is contained in:
Rohan Mitchell
2014-01-17 16:02:05 +11:00
parent ed78cc053b
commit 87cf596a30
4 changed files with 24 additions and 2 deletions

View File

@@ -316,6 +316,10 @@ productsApp.controller "AdminBulkProductsCtrl", [
Object.keys(product.variants).length > 0
$scope.hasOnDemandVariants = (product) ->
(variant for id, variant of product.variants when variant.on_demand).length > 0
$scope.updateProducts = (productsToSubmit) ->
$scope.displayUpdating()
$http(