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 {
|
||||
margin: 40px 15px 0 225px;
|
||||
margin: 60px 15px 0 225px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
@@ -101,8 +101,8 @@ section.content {
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: .46875rem 0.25rem;
|
||||
color : #fff !important;
|
||||
padding: .46875rem 0.25rem;
|
||||
color : #fff !important;
|
||||
}
|
||||
.btn-default, .bg-default{
|
||||
color : #111 !important;
|
||||
|
||||
@@ -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.sale_id.nil?
|
||||
sale_status = check_order_with_booking(booking)
|
||||
# puts "WWwwWWWWWWww"
|
||||
# puts sale_status
|
||||
|
||||
if sale_status
|
||||
return return_json_status_with_code(400, "bill requested")
|
||||
end
|
||||
@@ -79,8 +78,7 @@ class Api::OrdersController < Api::ApiController
|
||||
end
|
||||
else
|
||||
sale_status = check_order_with_table(params[:table_id])
|
||||
# puts "OOOOOOOOO"
|
||||
# puts sale_status
|
||||
|
||||
if sale_status
|
||||
return return_json_status_with_code(400, "bill requested")
|
||||
end
|
||||
@@ -88,15 +86,20 @@ class Api::OrdersController < Api::ApiController
|
||||
end #booking exists
|
||||
else
|
||||
sale_status = check_order_with_table(params[:table_id])
|
||||
# puts "MMMMMMMM"
|
||||
# puts sale_status
|
||||
|
||||
if sale_status
|
||||
# return false , @message = "bill requested"
|
||||
return return_json_status_with_code(400, "bill requested")
|
||||
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
|
||||
|
||||
# render json for http status code
|
||||
|
||||
@@ -15,5 +15,16 @@ class Oqs::EditController < ApplicationController#BaseOqsController
|
||||
order_item.qty = qty_weight
|
||||
order_item.remark = remarks
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Search Bar -->
|
||||
<!-- Search Bar -->
|
||||
<!-- <div class="search-bar">
|
||||
<div class="search-icon">
|
||||
<i class="material-icons">search</i>
|
||||
@@ -32,11 +32,11 @@ Search Bar -->
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<%if current_login_employee.role !="waiter" %>
|
||||
<p class="delete waves-effect waves-block" style="margin:0.5rem 1rem !important;" data-ref="<%=logout_path%>" data-method="delete">Logout</p>
|
||||
<span class="hidden" id="delete_text">
|
||||
<h6>Are you sure you want to Logout ?</h6>
|
||||
<!-- <h6>This action can't be undo. </h6> -->
|
||||
</span>
|
||||
<p class="delete waves-effect waves-block" style="margin:0.5rem 1rem !important;" data-ref="<%=logout_path%>" data-method="delete">Logout</p>
|
||||
<span class="hidden" id="delete_text">
|
||||
<h6>Are you sure you want to Logout ?</h6>
|
||||
<!-- <h6>This action can't be undo. </h6> -->
|
||||
</span>
|
||||
<%end%>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -53,9 +53,32 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button id="qty-update" class="btn btn-info" data-id="<%= @order_item[0].order_items_id %>">Update</button>
|
||||
</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.
|
||||
# Application configuration should go into files in config/initializers
|
||||
# -- 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_job.queue_adapter = :sidekiq
|
||||
|
||||
Reference in New Issue
Block a user