updae session error
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
class Origami::QuickServiceController < ApplicationController
|
class Origami::QuickServiceController < ApplicationController
|
||||||
# before_action :set_dining, only: [:detail]
|
# before_action :set_dining, only: [:detail]
|
||||||
|
before_action :check_user
|
||||||
|
def check_user
|
||||||
|
if current_user.nil?
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
today = DateTime.now
|
today = DateTime.now
|
||||||
@@ -211,6 +217,11 @@ class Origami::QuickServiceController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_user
|
||||||
|
if current_user.nil?
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
|
end
|
||||||
# this can always true
|
# this can always true
|
||||||
def check_order_with_booking(booking)
|
def check_order_with_booking(booking)
|
||||||
if booking.sale.sale_status == "completed" || booking.sale.sale_status == "new"
|
if booking.sale.sale_status == "completed" || booking.sale.sale_status == "new"
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
class Origami::RequestBillsController < ApplicationController
|
class Origami::RequestBillsController < ApplicationController
|
||||||
|
before_action :check_user
|
||||||
|
|
||||||
|
def check_user
|
||||||
|
if current_user.nil?
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
|
end
|
||||||
# Print Request Bill and add to sale tables
|
# Print Request Bill and add to sale tables
|
||||||
def print
|
def print
|
||||||
@sale = Sale.new
|
@sale = Sale.new
|
||||||
|
|||||||
Reference in New Issue
Block a user