update customer assign redirect

This commit is contained in:
Aung Myo
2018-03-30 15:07:48 +06:30
parent 4faf1083d1
commit 37f3ef7a0d
2 changed files with 8 additions and 6 deletions

View File

@@ -121,9 +121,11 @@
<%if !@dining_facility.nil?%> <%if !@dining_facility.nil?%>
<input type="hidden" id="table_id" name="table_id" value="<%= @dining_facility.id %>" /> <input type="hidden" id="table_id" name="table_id" value="<%= @dining_facility.id %>" />
<input type="hidden" id="type" name="type" value="<%= @dining_facility.type %>" /> <input type="hidden" id="type" name="type" value="<%= @dining_facility.type %>" />
<input type="hidden" id="table_type" name="table_type" value="<%= @dining_facility.type %>" />
<%else%> <%else%>
<input type="hidden" id="table_id" name="table_id" value="" /> <input type="hidden" id="table_id" name="table_id" value="" />
<input type="hidden" id="type" name="type" value="" /> <input type="hidden" id="type" name="type" value="" />
<input type="hidden" id="table_type" name="table_type" value="" />
<%end%> <%end%>
<%= f.error_notification %> <%= f.error_notification %>
<%= f.hidden_field :id, :class => "form-control col-md-6 " %> <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
@@ -469,7 +471,7 @@
if(data.status == true) if(data.status == true)
{ {
var id = $("#table_id").val(); var id = $("#table_id").val();
var type = $("#type").val(); var type = $("#table_type").val();
var booking_id = ""; var booking_id = "";
<% if !@booking_order.nil? %> <% if !@booking_order.nil? %>
booking_id = "<%= @booking_order.booking_id %>"; booking_id = "<%= @booking_order.booking_id %>";
@@ -502,7 +504,7 @@
$('#back').on('click',function(){ $('#back').on('click',function(){
var id = $("#table_id").val(); var id = $("#table_id").val();
var type = $("#type").val(); var type = $("#table_type").val();
var sale_id = $("#sale_id").val(); var sale_id = $("#sale_id").val();
if (cashier_type == "quick_service") { if (cashier_type == "quick_service") {
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/'; window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';