Merge pull request #11234 from jibees/10867-vouchers-vouchers-page-is-shown-for-profile-enterprises

Show vouchers panel only if enterprise sells products (own or any)
This commit is contained in:
Konrad
2023-08-02 13:11:29 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ module Admin
{ name: 'shipping_methods', icon_class: "icon-truck", show: show_shipping_methods },
{ name: 'payment_methods', icon_class: "icon-money", show: show_payment_methods },
{ name: 'enterprise_fees', icon_class: "icon-tasks", show: show_enterprise_fees },
{ name: 'vouchers', icon_class: "icon-ticket", show: true },
{ name: 'vouchers', icon_class: "icon-ticket", show: is_shop },
{ name: 'enterprise_permissions', icon_class: "icon-plug", show: true,
href: admin_enterprise_relationships_path },
{ name: 'inventory_settings', icon_class: "icon-list-ol", show: is_shop },

View File

@@ -9,7 +9,7 @@ describe '
include WebHelper
include AuthenticationHelper
let(:enterprise) { create(:supplier_enterprise, name: 'Feedme') }
let(:enterprise) { create(:supplier_enterprise, name: 'Feedme', sells: 'own') }
let(:voucher_code) { 'awesomevoucher' }
let(:amount) { 25 }
let(:enterprise_user) { create(:user, enterprise_limit: 1) }