Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant into adminbsb_material_ui
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
section.content {
|
section.content {
|
||||||
margin: 40px 15px 0 225px;
|
margin: 60px 15px 0 225px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
|
|||||||
@@ -68,8 +68,7 @@ class Api::OrdersController < Api::ApiController
|
|||||||
if booking.dining_facility_id.to_i == params[:table_id].to_i && booking.booking_status != 'moved'
|
if booking.dining_facility_id.to_i == params[:table_id].to_i && booking.booking_status != 'moved'
|
||||||
if !booking.sale_id.nil?
|
if !booking.sale_id.nil?
|
||||||
sale_status = check_order_with_booking(booking)
|
sale_status = check_order_with_booking(booking)
|
||||||
# puts "WWwwWWWWWWww"
|
|
||||||
# puts sale_status
|
|
||||||
if sale_status
|
if sale_status
|
||||||
return return_json_status_with_code(400, "bill requested")
|
return return_json_status_with_code(400, "bill requested")
|
||||||
end
|
end
|
||||||
@@ -79,8 +78,7 @@ class Api::OrdersController < Api::ApiController
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
sale_status = check_order_with_table(params[:table_id])
|
sale_status = check_order_with_table(params[:table_id])
|
||||||
# puts "OOOOOOOOO"
|
|
||||||
# puts sale_status
|
|
||||||
if sale_status
|
if sale_status
|
||||||
return return_json_status_with_code(400, "bill requested")
|
return return_json_status_with_code(400, "bill requested")
|
||||||
end
|
end
|
||||||
@@ -88,8 +86,7 @@ class Api::OrdersController < Api::ApiController
|
|||||||
end #booking exists
|
end #booking exists
|
||||||
else
|
else
|
||||||
sale_status = check_order_with_table(params[:table_id])
|
sale_status = check_order_with_table(params[:table_id])
|
||||||
# puts "MMMMMMMM"
|
|
||||||
# puts sale_status
|
|
||||||
if sale_status
|
if sale_status
|
||||||
# return false , @message = "bill requested"
|
# return false , @message = "bill requested"
|
||||||
return return_json_status_with_code(400, "bill requested")
|
return return_json_status_with_code(400, "bill requested")
|
||||||
@@ -97,6 +94,12 @@ class Api::OrdersController < Api::ApiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
@status, @booking = @order.generate
|
@status, @booking = @order.generate
|
||||||
|
# # for parallel order
|
||||||
|
# remoteIP = ""
|
||||||
|
# begin
|
||||||
|
# @status, @booking = @order.generate
|
||||||
|
# remoteIP = request.remote_ip
|
||||||
|
# end while request.remote_ip != remoteIP
|
||||||
end
|
end
|
||||||
|
|
||||||
# render json for http status code
|
# render json for http status code
|
||||||
|
|||||||
@@ -15,5 +15,16 @@ class Oqs::EditController < ApplicationController#BaseOqsController
|
|||||||
order_item.qty = qty_weight
|
order_item.qty = qty_weight
|
||||||
order_item.remark = remarks
|
order_item.remark = remarks
|
||||||
order_item.save
|
order_item.save
|
||||||
|
|
||||||
|
# print
|
||||||
|
assigned_item = AssignedOrderItem.find_by_item_code(order_item.item_code)
|
||||||
|
# order queue stations
|
||||||
|
oqs = assigned_item.order_queue_station
|
||||||
|
|
||||||
|
unique_code="OrderItemPdf"
|
||||||
|
|
||||||
|
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||||
|
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
|
||||||
|
order_queue_printer.print_order_item(print_settings, oqs,assigned_item.order_id, assigned_item.item_code, print_status=" (Edited)" )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Search Bar -->
|
<!-- Search Bar -->
|
||||||
<!-- <div class="search-bar">
|
<!-- <div class="search-bar">
|
||||||
<div class="search-icon">
|
<div class="search-icon">
|
||||||
<i class="material-icons">search</i>
|
<i class="material-icons">search</i>
|
||||||
|
|||||||
@@ -53,9 +53,32 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button id="qty-update" class="btn btn-info" data-id="<%= @order_item[0].order_items_id %>">Update</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
// Qty update for OQS Edit Controller
|
||||||
|
$('#qty-update').on('click', function(){
|
||||||
|
var qty_weight = $("input[name='qty_weight']").val();
|
||||||
|
var remarks = $("textarea[name='remarks']").val();
|
||||||
|
var order_items_id = $(this).attr('data-id');
|
||||||
|
var params = { 'order_items_id': order_items_id, 'qty_weight': qty_weight, 'remarks': remarks }
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '/oqs/' + order_items_id,
|
||||||
|
data: params,
|
||||||
|
success: function(result){
|
||||||
|
alert("Updated!");
|
||||||
|
window.location.href = '/oqs';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ module SXRestaurants
|
|||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
# Application configuration should go into files in config/initializers
|
# Application configuration should go into files in config/initializers
|
||||||
# -- all .rb files in that directory are automatically loaded.
|
# -- all .rb files in that directory are automatically loaded.
|
||||||
config.i18n.default_locale = :'mm' # English 'en'
|
config.i18n.default_locale = :'en' # English 'en'
|
||||||
|
|
||||||
config.active_record.time_zone_aware_types = [:datetime, :time]
|
config.active_record.time_zone_aware_types = [:datetime, :time]
|
||||||
config.active_job.queue_adapter = :sidekiq
|
config.active_job.queue_adapter = :sidekiq
|
||||||
|
|||||||
Reference in New Issue
Block a user