update table box
This commit is contained in:
@@ -297,7 +297,7 @@
|
||||
<button type="button" class="btn bg-red btn-block" id="void" active="<%= can? :overall_void, :void %>"> Void </button>
|
||||
<% if @cashier_type=="quick_service" %>
|
||||
<hr>
|
||||
<button type="button" id="add_order" class="btn btn-block bg-blue waves-effect"><%= t("views.btn.add") %> <%= t("views.right_panel.detail.order") %></button>
|
||||
|
||||
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
|
||||
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect" >Customer</button>
|
||||
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit' <%= (can? :edit, :sale_edit)? ' ': 'disabled=' %> active="true">Edit</button>
|
||||
@@ -383,7 +383,7 @@ var cashier_type = "<%= @cashier_type %>";
|
||||
var sale_id = $('#save_order_id').attr('data-order');
|
||||
}
|
||||
var table_id = $('.tables').attr("data-id");
|
||||
window.location.href = '/origami/' + sale_id + "/customers"
|
||||
window.location.href = '/origami/' + sale_id + "/"+cashier_type+"/customers"
|
||||
});
|
||||
|
||||
// Add Other Charges
|
||||
@@ -395,7 +395,7 @@ var cashier_type = "<%= @cashier_type %>";
|
||||
var sale_id = $('#save_order_id').attr('data-order');
|
||||
}
|
||||
if (sale_id != "") {
|
||||
window.location.href = '/origami/' + sale_id + '/other_charges'
|
||||
window.location.href = '/origami/' + sale_id +"/"+cashier_type+ '/other_charges'
|
||||
}
|
||||
else {
|
||||
swal ( "Oops" , "Please select an table!" , "warning" );
|
||||
@@ -413,7 +413,7 @@ var cashier_type = "<%= @cashier_type %>";
|
||||
}
|
||||
|
||||
if (sale_id != "") {
|
||||
window.location.href = '/origami/' + sale_id + '/discount'
|
||||
window.location.href = '/origami/' + sale_id + "/"+cashier_type+'/discount'
|
||||
}
|
||||
else {
|
||||
swal ( "Oops" , "Please select an table!" , "warning" );
|
||||
@@ -426,9 +426,9 @@ var cashier_type = "<%= @cashier_type %>";
|
||||
|
||||
$('#edit').on('click', function () {
|
||||
var dining_id = "<%= @dining.id %>"
|
||||
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
|
||||
var sale_id = $('#sale_id').text();
|
||||
if ($(this).attr('active')=== "true") {
|
||||
window.location.href = '/origami/table/' + dining_id + "/sale/" + sale_id + "/edit";
|
||||
window.location.href = '/origami/table/' + dining_id + "/sale/" + sale_id + "/"+cashier_type+"/edit";
|
||||
}else{
|
||||
swal("Opps","You are not authorized for void","warning")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user