update optimization

This commit is contained in:
Aung Myo
2018-07-05 18:19:16 +06:30
parent f0df6a80ba
commit a5bb0a6746
8 changed files with 34 additions and 28 deletions

View File

@@ -18,7 +18,12 @@ class Origami::AddordersController < BaseOrigamiController
if check_mobile
@webview = true
end
display_type = Lookup.find_by_lookup_type("display_type")
if !display_type.nil? && display_type.value==2
@display_type = display_type.value
else
@display_type = nil
end
# if params[:menu] == "true"
@menus = []
@menu = []

View File

@@ -8,24 +8,27 @@ class Origami::SecondDisplayController < BaseOrigamiController
end
def customer_view
if params[:status]!= "billed"
tax_profiles = TaxProfile.all.order("order_by asc")
else
tax_profiles = nil
end
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
display_type = Lookup.find_by_lookup_type("display_type")
if !display_type.nil? && display_type.value==2
if params[:status]!= "billed"
tax_profiles = TaxProfile.all.order("order_by asc")
else
tax_profiles = nil
end
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
ActionCable.server.broadcast "second_display_view_channel",data: params[:data],tax_profiles: tax_profiles,status:params[:status],from:from
end
ActionCable.server.broadcast "second_display_view_channel",data: params[:data],tax_profiles: tax_profiles,status:params[:status],from:from
# end
end
#Shop Name in Navbor
helper_method :shop_detail
def shop_detail
@shop = Shop.first
end
# helper_method :shop_detail
# def shop_detail
# @shop = Shop.first
# end
end