diff --git a/.gitignore b/.gitignore index c29faad2..02338531 100644 --- a/.gitignore +++ b/.gitignore @@ -43,5 +43,5 @@ config/deploy/config/* .byebug_history # Gem files -Gemfile -Gemfile.lock \ No newline at end of file +#Gemfile +#Gemfile.lock diff --git a/Gemfile b/Gemfile index 1481501c..ac3052b5 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ gem 'rails', '~> 5.1.0' gem 'mysql2', '>= 0.3.18', '< 0.5' #Use PosgreSQL -#gem 'pg' +gem 'pg' # redis server for cable # gem 'redis', '~> 3.0' diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index be600853..443a754b 100644 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -39,8 +39,8 @@ class Api::OrdersController < Api::ApiController #Create Table Booking or Room Booking if !params["booking_id"].nil? && params[:booking_id].to_i > 0 - @order.new_booking = false - # @order.new_booking = true + #@order.new_booking = false + @order.new_booking = true @order.booking_id = params[:booking_id] end diff --git a/app/models/order.rb b/app/models/order.rb index e489ecbf..989533fc 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -201,7 +201,7 @@ class Order < ApplicationRecord #Process order items and send to order queue def process_order_queue - #Send to background job for processing + #Send to background job for processing OrderQueueProcessorJob.perform_later(self.id) end @@ -221,7 +221,7 @@ class Order < ApplicationRecord left join dining_facilities on dining_facilities.id = bookings.dining_facility_id left join order_items on order_items.order_id = orders.id") .where("dining_facilities.type=? and orders.order_type=? and dining_facilities.is_active=?",DiningFacility::TABLE_TYPE,"dine_in",true) - .group("orders.id") + .group("orders.id") end #Origami: Cashier : to view order type Room def self.get_order_rooms