mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
For a product with one or more on_demand variants, don't show 'On demand' at the product level
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user