minor fix in ui in addorder
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
|
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
|
||||||
<input type="hidden" name="order_id" id="order_id" value= "<%= @order_id %>">
|
<input type="hidden" name="order_id" id="order_id" value= "<%= @order_id %>">
|
||||||
<input type="hidden" name="table_id" value="" id="table_id">
|
<input type="hidden" name="table_id" value="" id="table_id">
|
||||||
<div class="row m-t--10 h-100">
|
<div class="row pt-3" style="height: 93vh">
|
||||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden d-flex flex-column h-100" id="menu_data">
|
<div class="col-lg-2 col-md-2 col-sm-2 hidden d-flex flex-column h-100" id="menu_data">
|
||||||
<li class="list-menu">
|
<li class="list-menu">
|
||||||
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
||||||
@@ -795,47 +795,6 @@ showHideNavbar(webview);
|
|||||||
<% end %>
|
<% end %>
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click','#mmqr_btn', function(event){
|
|
||||||
const paymentMethod = 'MMQR';
|
|
||||||
let table_id = $("#table_id").text();
|
|
||||||
let booking_id = $("#booking_id").text();
|
|
||||||
let customer_id = $("#customer_id").text();
|
|
||||||
let second_display_lookup = $("#display_type").val();
|
|
||||||
|
|
||||||
|
|
||||||
let params = {
|
|
||||||
order_source: "food_court",
|
|
||||||
order_type: "dine_in",
|
|
||||||
customer_id: customer_id,
|
|
||||||
guest_info: "",
|
|
||||||
table_id: table_id,
|
|
||||||
order_items: JSON.stringify(get_order_item_rows()),
|
|
||||||
create_type: "create_pay",
|
|
||||||
};
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: '/foodcourt/addorders/create',
|
|
||||||
data: params,
|
|
||||||
dataType: "json",
|
|
||||||
success: function (result) {
|
|
||||||
booking_id = result.booking_id;
|
|
||||||
console.log(result);
|
|
||||||
window.location.href = `/foodcourt/${result.sale_id}/qrpay/init#`
|
|
||||||
// `/foodcourt/sale/${result.sale_id}/${cashier_type}/payment`;
|
|
||||||
if ($("#server_mode").val() != "cloud" && second_display_lookup == 2) {
|
|
||||||
// customer_display_view(null, "reload");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
||||||
$("#oqs_loading_wrapper").hide();
|
|
||||||
$("#create_order").prop("disabled", false);
|
|
||||||
$("#create_pay_order").prop("disabled", false);
|
|
||||||
swal("Error", "Status: " + textStatus, "error");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
function create_order(data,paymentMethod = "") {
|
function create_order(data,paymentMethod = "") {
|
||||||
$("#oqs_loading_wrapper").show();
|
$("#oqs_loading_wrapper").show();
|
||||||
var cashier_type = $("#link_type").val();
|
var cashier_type = $("#link_type").val();
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<section class="content">
|
<section class="content" style="margin:0; padding: 0;">
|
||||||
<% flash.each do |type, message| %>
|
<% flash.each do |type, message| %>
|
||||||
<% if type == "notice"
|
<% if type == "notice"
|
||||||
color = "alert-success"
|
color = "alert-success"
|
||||||
|
|||||||
Reference in New Issue
Block a user