Merge branch 'ui_ux_changes' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-05-11 17:04:33 +06:30
6 changed files with 30 additions and 6 deletions

View File

@@ -20,8 +20,12 @@ class CommissionerImageUploader < CarrierWave::Uploader::Base
end end
def filename def filename
if Shop.find(1).shop_code.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present? "#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
end end
end
# def cache_dir # def cache_dir
# '/tmp/images' # '/tmp/images'

View File

@@ -20,8 +20,12 @@ class CustomerImageUploader < CarrierWave::Uploader::Base
end end
def filename def filename
if Shop.find(1).shop_code.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present? "#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
end end
end
# def cache_dir # def cache_dir
# '/tmp/images' # '/tmp/images'

View File

@@ -20,8 +20,12 @@ class EmployeeImageUploader < CarrierWave::Uploader::Base
end end
def filename def filename
if Shop.find(1).shop_code.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present? "#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
end end
end
# def cache_dir # def cache_dir
# '/tmp/images' # '/tmp/images'

View File

@@ -20,8 +20,12 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
end end
def filename def filename
if Shop.find(1).shop_code.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present? "#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
end end
end
# def cache_dir # def cache_dir
# '/tmp/images' # '/tmp/images'

View File

@@ -20,8 +20,12 @@ class ProductImageUploader < CarrierWave::Uploader::Base
end end
def filename def filename
if Shop.find(1).shop_code.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present? "#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
end end
end
# def cache_dir # def cache_dir
# '/tmp/images' # '/tmp/images'

View File

@@ -20,8 +20,12 @@ class ShopImageUploader < CarrierWave::Uploader::Base
end end
def filename def filename
if Shop.find(1).shop_code.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present? "#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
end end
end
# def cache_dir # def cache_dir
# '/tmp/images' # '/tmp/images'