mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Merge pull request #9023 from apricot12/8908-Access-Enterprise-perms-from-setting-page
Enterprise can access permissions from enterprise edit page
This commit is contained in:
@@ -16,6 +16,7 @@ angular.module("admin.enterprises")
|
||||
{ name: 'shipping_methods', label: t('shipping_methods'), icon_class: "icon-truck", show: "showShippingMethods()" }
|
||||
{ name: 'payment_methods', label: t('payment_methods'), icon_class: "icon-money", show: "showPaymentMethods()" }
|
||||
{ name: 'enterprise_fees', label: t('enterprise_fees'), icon_class: "icon-tasks", show: "showEnterpriseFees()" }
|
||||
{ name: 'enterprise_permissions', label: t('enterprise_permissions'), icon_class: "icon-plug" }
|
||||
{ name: 'inventory_settings', label: t('inventory_settings'), icon_class: "icon-list-ol", show: "enterpriseIsShop()" }
|
||||
{ name: 'tag_rules', label: t('tag_rules'), icon_class: "icon-random", show: "enterpriseIsShop()" }
|
||||
{ name: 'shop_preferences', label: t('shop_preferences'), icon_class: "icon-shopping-cart", show: "enterpriseIsShop()" }
|
||||
@@ -44,3 +45,5 @@ angular.module("admin.enterprises")
|
||||
|
||||
$scope.enterpriseIsShop = ->
|
||||
$scope.Enterprise.sells != "none"
|
||||
|
||||
$scope.menu.redirect_function('enterprise_permissions', '/admin/enterprise_relationships')
|
||||
|
||||
@@ -30,3 +30,14 @@ angular.module("admin.side_menu")
|
||||
for item in @items when item.name is name
|
||||
return item
|
||||
null
|
||||
|
||||
redirect_function: (elementID , href) =>
|
||||
window.addEventListener 'load', ->
|
||||
element = document.getElementById(elementID)
|
||||
if !element
|
||||
return
|
||||
element.addEventListener 'click', ->
|
||||
window.location.replace(href)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
%legend {{menu.selected.label}}
|
||||
= render 'admin/enterprises/form/enterprise_fees', f: f
|
||||
|
||||
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='enterprise_permissions'" } }
|
||||
%legend {{menu.selected.label}}
|
||||
|
||||
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='inventory_settings'" } }
|
||||
%legend {{menu.selected.label}}
|
||||
= render 'admin/enterprises/form/inventory_settings', f: f
|
||||
|
||||
@@ -441,6 +441,9 @@ a .icon-flip-vertical:before {
|
||||
.icon-home:before {
|
||||
content: "\f015";
|
||||
}
|
||||
.icon-plug:before {
|
||||
content: "\f1e6";
|
||||
}
|
||||
.icon-file-alt:before {
|
||||
content: "\f016";
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ en:
|
||||
producers_join: Australian producers are now welcome to join the Open Food Network. #FIXME
|
||||
charges_sales_tax: Charges GST?
|
||||
business_address: "Business Address"
|
||||
Invoice_item_sorting: "Invoice sorting"
|
||||
enterprise_permissions: "Enterprise Permissions"
|
||||
print_invoice: "Print Invoice"
|
||||
print_ticket: "Print Ticket"
|
||||
select_ticket_printer: "Select printer for tickets"
|
||||
@@ -880,6 +880,8 @@ en:
|
||||
manage_fees: Manage Enterprise Fees
|
||||
no_fees_yet: You don't have any enterprise fees yet.
|
||||
create_button: Create One Now
|
||||
enterprise_permissions:
|
||||
enterprise_relationships: Enterprise Relationships
|
||||
images:
|
||||
logo: Logo
|
||||
promo_image_placeholder: 'This image is displayed in "About Us"'
|
||||
|
||||
Reference in New Issue
Block a user