mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-17 00:07:24 +00:00
New product count for inventory takes permissions into account
This commit is contained in:
@@ -13,5 +13,5 @@ angular.module("admin.variantOverrides").filter "inventoryProducts", ($filter, I
|
||||
else
|
||||
# Important to only return if true, as other variants for this product might be visible
|
||||
return true if views.new.visible
|
||||
false
|
||||
false
|
||||
, true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
%div{ ng: { show: '(newProductCount = (products | newInventoryProducts:hub_id).length) > 0 && !views.new.visible && !alertDismissed' } }
|
||||
%div{ ng: { show: '(newProductCount = (products | hubPermissions:hubPermissions:hub.id | newInventoryProducts:hub_id).length) > 0 && !views.new.visible && !alertDismissed' } }
|
||||
%hr.divider.sixteen.columns.alpha.omega
|
||||
%alert-row{ message: "#{t('admin.inventory.new_products_alert_message', new_product_count: '{{ newProductCount }}')}",
|
||||
dismissed: "alertDismissed",
|
||||
|
||||
Reference in New Issue
Block a user