mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-23 05:28:53 +00:00
Adding ability to show and hide menu items
This commit is contained in:
@@ -45,3 +45,11 @@ angular.module("admin.enterprises")
|
||||
count++ if shipping_method.selected
|
||||
count
|
||||
, 0
|
||||
|
||||
$scope.$watch "Enterprise.is_primary_producer", (newValue, oldValue) ->
|
||||
if newValue
|
||||
$scope.menu.hide_item_by_name('Shipping Methods')
|
||||
$scope.menu.hide_item_by_name('Payment Methods')
|
||||
else if !newValue
|
||||
$scope.menu.show_item_by_name('Shipping Methods')
|
||||
$scope.menu.show_item_by_name('Payment Methods')
|
||||
|
||||
@@ -4,18 +4,18 @@ angular.module("admin.enterprises")
|
||||
$scope.menu = SideMenu
|
||||
$scope.select = SideMenu.select
|
||||
|
||||
SideMenu.setItems [
|
||||
$scope.menu.setItems [
|
||||
{ name: 'Primary Details' }
|
||||
{ name: 'Address' }
|
||||
{ name: 'Contact' }
|
||||
{ name: 'Social' }
|
||||
{ name: 'About' }
|
||||
{ name: "Business Details"}
|
||||
{ name: 'Business Details' }
|
||||
{ name: 'Images' }
|
||||
{ name: "Shipping Methods"}
|
||||
{ name: "Payment Methods"}
|
||||
{ name: "Enterprise Fees"}
|
||||
{ name: "Preferences"}
|
||||
{ name: "Shipping Methods" }
|
||||
{ name: "Payment Methods" }
|
||||
{ name: "Enterprise Fees" }
|
||||
{ name: "Preferences" }
|
||||
]
|
||||
|
||||
$scope.select(0)
|
||||
|
||||
Reference in New Issue
Block a user