This commit is contained in:
Myat Zin Wai Maw
2020-01-14 18:09:45 +06:30
parent 60af9124bb
commit d6e0079314
6 changed files with 188 additions and 131 deletions

View File

@@ -124,6 +124,9 @@ class Api::OrdersController < Api::ApiController
if @status && @booking
Order.process_order_queue(@order.order_id,@order.table_id,@order.source)
if @order.source == 'app'
@status, @sale = Sale.request_bill(@order,current_user,current_login_employee)
end
end
if @order.table_id.to_i > 0
table = DiningFacility.find(@booking.dining_facility_id)

View File

@@ -2,11 +2,11 @@ class Api::ShopsController < Api::ApiController
skip_before_action :authenticate
def index
def index
@shops = Shop.select('id,logo,name,shop_code,address,phone_no').all
end
end
def show
def show
@shop = Shop.find_by_shop_code(params[:id])
end
end
end

View File

@@ -20,7 +20,7 @@ class CustomerImageUploader < CarrierWave::Uploader::Base
end
def filename
if Shop.current_shop.shop_code.nil?
if Shop.current_shop.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.current_shop.shop_code}_#{original_filename}" if original_filename.present?

View File

@@ -1,3 +1,3 @@
if (@menu_item)
json.partial! 'api/restaurant/menu/menu_item', item: @menu_item, request_url: @request_url
json.partial! 'api/restaurant/menu_items/menu_item', item: @menu_item, request_url: @request_url
end