File tree Expand file tree Collapse file tree 3 files changed +18
-20
lines changed Expand file tree Collapse file tree 3 files changed +18
-20
lines changed Original file line number Diff line number Diff line change 1- # frozen_string_literal: true
2-
31module Spree
42 class Vendor < Spree ::Base
53 extend FriendlyId
@@ -75,7 +73,7 @@ def should_generate_new_friendly_id?
7573 end
7674
7775 def update_stock_location_names
78- if ( Spree . version . to_f < 3.5 && name_changed? ) || ( Spree . version . to_f >= 3.5 && saved_changes &.include? ( :name ) )
76+ if ( Spree . version . to_f < 3.5 && self . name_changed? ) || ( Spree . version . to_f >= 3.5 && saved_changes &.include? ( :name ) )
7977 stock_locations . update_all ( { name : name } )
8078 end
8179 end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44 replace : 'erb[silent]:contains("current_store")' ,
55 text : '<% if can?(:admin, current_store) || current_spree_user.vendors.any? %>'
66)
7+ Deface ::Override . new (
8+ virtual_path : 'spree/admin/shared/_main_menu' ,
9+ name : 'vendors_main_menu_tabs' ,
10+ insert_bottom : 'nav' ,
11+ text : <<-HTML
12+ < % if current_spree_user.respond_to?(:has_spree_role?) && current_spree_user.has_spree_role?(:admin) %>
13+ < ul class ="nav nav-sidebar border-bottom ">
14+ < %= tab plural_resource_name(Spree::Vendor), url: admin_vendors_path, icon: 'money' %>
15+ </ ul >
16+ < % end %>
17+ < % if defined?(current_spree_vendor) && current_spree_vendor %>
18+ < ul class ="nav nav-sidebar border-bottom ">
19+ < %= tab Spree::Vendor.model_name.human, url: admin_vendor_settings_path, icon: 'money' %>
20+ </ ul >
21+ < % end %>
22+ HTML
23+ )
You can’t perform that action at this time.
0 commit comments