check mobile

This commit is contained in:
phyusin
2018-04-06 13:15:32 +06:30
parent 0b869ccb89
commit 818f441529
3 changed files with 7 additions and 13 deletions

View File

@@ -3,10 +3,7 @@ class Origami::HomeController < BaseOrigamiController
before_action :set_dining, only: [:show]
def index
@webview = false
if check_mobile
@webview = true
end
@webview = check_mobile
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
@@ -18,10 +15,7 @@ class Origami::HomeController < BaseOrigamiController
# origami table detail
def show
@webview = false
if check_mobile
@webview = true
end
@webview = check_mobile
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')