close cable in cloud mode
This commit is contained in:
@@ -47,7 +47,9 @@ class Api::BillController < Api::ApiController
|
||||
Promotion.promo_activate(@sale)
|
||||
|
||||
#BillBroadcastJob.perform_later(table)
|
||||
ActionCable.server.broadcast "bill_channel",table: table
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "bill_channel",table: table
|
||||
end
|
||||
else
|
||||
@status = false
|
||||
@error_message = "No Current Open Shift"
|
||||
|
||||
@@ -6,8 +6,9 @@ class Api::CallWaitersController < ActionController::API
|
||||
@time = params[:time]
|
||||
@table = DiningFacility.find(@table_id)
|
||||
# CallWaiterJob.perform_later(@table,@time)
|
||||
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time
|
||||
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time
|
||||
end
|
||||
# get printer info
|
||||
@shop = Shop.first
|
||||
unique_code = "CallWaiterPdf"
|
||||
|
||||
@@ -59,8 +59,9 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
||||
order_reservation_id, flag = OrderReservation.addOrderReservationInfo(params)
|
||||
|
||||
order_reservation = OrderReservation.find(order_reservation_id)
|
||||
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation
|
||||
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation
|
||||
end
|
||||
if flag
|
||||
render :json => { :status => true, :order_reservation_id => order_reservation_id, :message => "Order reservation is successfully created!" }
|
||||
else
|
||||
|
||||
@@ -39,7 +39,9 @@ class Origami::RequestBillsController < ApplicationController
|
||||
# Promotion Activation
|
||||
Promotion.promo_activate(@sale)
|
||||
#bill channel
|
||||
ActionCable.server.broadcast "bill_channel",table: table
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "bill_channel",table: table
|
||||
end
|
||||
if order.source == "quick_service"
|
||||
result = {:status=> @status, :data => @sale.sale_id }
|
||||
render :json => result.to_json
|
||||
|
||||
@@ -335,9 +335,9 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
end
|
||||
|
||||
Promotion.promo_activate(sale)
|
||||
|
||||
ActionCable.server.broadcast "bill_channel",table: table
|
||||
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "bill_channel",table: table
|
||||
end
|
||||
render :json => { status: status }
|
||||
else
|
||||
render :json => { status: false, error_message: 'No Current Open Shift!'}
|
||||
|
||||
Reference in New Issue
Block a user