fixed conflict
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -43,5 +43,3 @@ config/deploy/config/*
|
|||||||
.byebug_history
|
.byebug_history
|
||||||
|
|
||||||
# Gem files
|
# Gem files
|
||||||
Gemfile
|
|
||||||
Gemfile.lock
|
|
||||||
4
Gemfile
4
Gemfile
@@ -10,6 +10,7 @@ end
|
|||||||
gem 'rails', '~> 5.1.0'
|
gem 'rails', '~> 5.1.0'
|
||||||
# Use mysql as the database for Active Record
|
# Use mysql as the database for Active Record
|
||||||
#gem 'mysql2', '>= 0.3.18', '< 0.5'
|
#gem 'mysql2', '>= 0.3.18', '< 0.5'
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
#Use PosgreSQL
|
#Use PosgreSQL
|
||||||
gem 'pg'
|
gem 'pg'
|
||||||
@@ -17,6 +18,9 @@ gem 'pg'
|
|||||||
# redis server for cable
|
# redis server for cable
|
||||||
gem 'redis', '~> 3.0'
|
gem 'redis', '~> 3.0'
|
||||||
|
|
||||||
|
=======
|
||||||
|
gem 'pg'
|
||||||
|
>>>>>>> origami
|
||||||
# Use Puma as the app server
|
# Use Puma as the app server
|
||||||
gem 'puma', '~> 3.0'
|
gem 'puma', '~> 3.0'
|
||||||
# Use SCSS for stylesheets
|
# Use SCSS for stylesheets
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
class OrderBroadcastJob < ApplicationJob
|
class OrderBroadcastJob < ApplicationJob
|
||||||
queue_as :default
|
queue_as :default
|
||||||
|
|
||||||
|
|
||||||
def perform(message)
|
def perform(message)
|
||||||
order = Order.find(message) # message come as order_id
|
order = Order.find(message) # message come as order_id
|
||||||
ApplicationCable.server.broadcast "order_queue_station_channel", order: order
|
ApplicationCable.server.broadcast "order_queue_station_channel", order: order
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -221,7 +221,9 @@ class Order < ApplicationRecord
|
|||||||
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
||||||
left join order_items on order_items.order_id = orders.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)
|
.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
|
end
|
||||||
#Origami: Cashier : to view order type Room
|
#Origami: Cashier : to view order type Room
|
||||||
def self.get_order_rooms
|
def self.get_order_rooms
|
||||||
@@ -232,7 +234,7 @@ class Order < ApplicationRecord
|
|||||||
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
||||||
left join order_items on order_items.order_id = orders.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::ROOM_TYPE,"dine_in",true)
|
.where("dining_facilities.type=? and orders.order_type=? and dining_facilities.is_active=?",DiningFacility::ROOM_TYPE,"dine_in",true)
|
||||||
.group("orders.id")
|
.group("orders.id,order_items.id,dining_facilities.name")
|
||||||
end
|
end
|
||||||
#Origami: Cashier : to view orders
|
#Origami: Cashier : to view orders
|
||||||
def self.get_orders
|
def self.get_orders
|
||||||
@@ -243,6 +245,6 @@ class Order < ApplicationRecord
|
|||||||
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
||||||
left join order_items on order_items.order_id = orders.id")
|
left join order_items on order_items.order_id = orders.id")
|
||||||
.where("dining_facilities.is_active=?",true)
|
.where("dining_facilities.is_active=?",true)
|
||||||
.group("orders.id")
|
.group("orders.id,order_items.id,dining_facilities.name")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -38,5 +38,6 @@ class OrderItem < ApplicationRecord
|
|||||||
order_details = OrderItem.select("order_items.item_name,order_items.qty,order_items.price,(order_items.qty*order_items.price) as total_price")
|
order_details = OrderItem.select("order_items.item_name,order_items.qty,order_items.price,(order_items.qty*order_items.price) as total_price")
|
||||||
.joins("left join orders on orders.id = order_items.order_id")
|
.joins("left join orders on orders.id = order_items.order_id")
|
||||||
.where("order_items.order_id=?",order_id)
|
.where("order_items.order_id=?",order_id)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user