diff --git a/app/assets/javascripts/reservation.js b/app/assets/javascripts/reservation.js index fa3f3ddd..e41dda14 100644 --- a/app/assets/javascripts/reservation.js +++ b/app/assets/javascripts/reservation.js @@ -28,4 +28,13 @@ $(function(){ }); /*new customer UI func:*/ -}); \ No newline at end of file +}); + +/*customer UI tab btn*/ +function nextTab(elem) { + $(elem).parent().next().find('a[data-toggle="tab"]').click(); +} +function prevTab(elem) { + $(elem).parent().prev().find('a[data-toggle="tab"]').click(); +} +/*customer UI tab btn*/ \ No newline at end of file diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb index 44b3e1e3..bfecc019 100755 --- a/app/controllers/origami/home_controller.rb +++ b/app/controllers/origami/home_controller.rb @@ -32,7 +32,7 @@ class Origami::HomeController < BaseOrigamiController @shop = shop_detail @membership = MembershipSetting::MembershipSetting @payment_methods = PaymentMethodSetting.all - @dining_booking = @dining.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ") + @dining_booking = @dining.bookings.active #.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ") #@dining_booking = @dining.bookings.active.where("created_at between '#{DateTime.now.utc - 12.hours}' and '#{DateTime.now.utc}'") @order_items = Array.new @dining_booking.each do |booking| diff --git a/app/controllers/transactions/bookings_controller.rb b/app/controllers/transactions/bookings_controller.rb index 78e8dc1b..16d264af 100644 --- a/app/controllers/transactions/bookings_controller.rb +++ b/app/controllers/transactions/bookings_controller.rb @@ -35,7 +35,7 @@ class Transactions::BookingsController < ApplicationController def show @booking = Booking.find(params[:id]) - @order = [] + @order = nil @order_items = [] @booking.booking_orders.each do |booking_order| @order = Order.find(booking_order.order_id) diff --git a/app/views/origami/reservation/index.html.erb b/app/views/origami/reservation/index.html.erb index 1c3b4060..720f9d3e 100644 --- a/app/views/origami/reservation/index.html.erb +++ b/app/views/origami/reservation/index.html.erb @@ -16,7 +16,7 @@
- 1s + 1 @@ -76,7 +76,7 @@