This commit is contained in:
phyusin
2018-08-07 10:43:40 +06:30
parent b933f959f6
commit 456bb61f61
3 changed files with 40 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ class Api::SoundEffectController < Api::ApiController
end
ActionCable.server.broadcast "sound_effect_channel",data: {status: params[:status], message: params[:message]},shop_code: shop_code,from:from,audio:audio
else
render :json => { :status => true, :message => "Something wrongs!" }
render :json => { :status => false, :message => "Something wrongs!" }
end
end
#sound effect / alarm api for doemal side calling

View File

@@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
#before_action :check_installation
protect_from_forgery with: :exception
helper_method :shop_detail
helper_method :shop_detail, :order_reservation, :bank_integration
# lookup domain for db from provision
# before_action :set_locale
# helper_method :current_company,:current_login_employee,:current_user
@@ -21,6 +21,36 @@ class ApplicationController < ActionController::Base
def shop_detail
@shop = Shop.first
end
def order_reservation
order_reserve = Lookup.collection_of('order_reservation')
status = false
if !order_reserve.empty?
order_reserve.each do |order|
if order[0] == 'OrderReservation'
if order[1] == '1'
status = true
end
end
end
end
return status
end
def bank_integration
bank_integration = Lookup.collection_of('bank_integration')
status = false
if !bank_integration.empty?
bank_integration.each do |bank|
if bank[0] == 'Bank Integration'
if bank[1] == '1'
status = true
end
end
end
end
return status
end
end

View File

@@ -119,9 +119,11 @@
</li>
<% end %>
<% if can? :manage, OrderReservation %>
<li>
<a href="<%= transactions_order_reservations_path %>"><%= t("views.right_panel.detail.order_reservation") %></a>
</li>
<% if order_reservation %>
<li>
<a href="<%= transactions_order_reservations_path %>"><%= t("views.right_panel.detail.order_reservation") %></a>
</li>
<% end %>
<% end %>
</ul>
</li>
@@ -141,9 +143,11 @@
<li>
<a href="<%= reports_product_sale_index_path %>">Product Sale</a>
</li>
<% if order_reservation %>
<li>
<a href="<%= reports_order_reservation_index_path %>">Order Reservation</a>
<a href="<%= reports_order_reservation_index_path %>"><%= t("views.right_panel.detail.order_reservation") %></a>
</li>
<% end %>
<li>
<a href="<%= reports_receipt_no_index_path %>">Receipt</a>
</li>