change saleitem query and js for order reservation

This commit is contained in:
phyusin
2018-06-06 11:47:21 +06:30
parent 4b7881b14e
commit 2cc52bd888
4 changed files with 35 additions and 35 deletions

View File

@@ -322,13 +322,10 @@ class OrderReservation < ApplicationRecord
if order_reservation.length > 0
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
ActionCable.server.broadcast "check_new_order_channel",data: order_reservation, shop_code: shop_code,from:from
else
from = ""
end
# if ENV["SERVER_MODE"] == 'cloud'
# ActionCable.server.broadcast "check_new_order_channel",data: order_reservation, shop_code: shop_code
# end
ActionCable.server.broadcast "check_new_order_channel",data: order_reservation, shop_code: shop_code,from:from
end
end
@@ -343,13 +340,10 @@ class OrderReservation < ApplicationRecord
if order_reservation.length > 0
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
ActionCable.server.broadcast "check_order_send_to_kitchen_channel",data: order_reservation, shop_code: shop_code,from:from
else
from = ""
end
# if ENV["SERVER_MODE"] == 'cloud'
# ActionCable.server.broadcast "check_order_send_to_kitchen_channel",data: order_reservation, shop_code: shop_code
# end
ActionCable.server.broadcast "check_order_send_to_kitchen_channel",data: order_reservation, shop_code: shop_code,from:from
end
end
@@ -364,10 +358,10 @@ class OrderReservation < ApplicationRecord
if order_reservation.length > 0
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
ActionCable.server.broadcast "check_order_ready_to_delivery_channel",data: order_reservation, shop_code: shop_code,from:from
else
from = ""
end
ActionCable.server.broadcast "check_order_ready_to_delivery_channel",data: order_reservation, shop_code: shop_code,from:from
end
end