second display reload fixed
This commit is contained in:
@@ -196,7 +196,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
|
||||
<%= link_to '/foodcourt/app_orders', class: 'btn btn-block btn-default waves-effect', style: "padding-top: 0;" do%>
|
||||
<%= link_to '/foodcourt/app_orders', class: 'btn btn-block btn-default waves-effect', :id => 'foodcourt_back', style: "padding-top: 0;" do%>
|
||||
<i class="material-icons">reply</i>
|
||||
BACK
|
||||
<% end %>
|
||||
@@ -508,20 +508,20 @@ $(document).ready(function(){
|
||||
$("#card_payment").show();
|
||||
var dining_id = "<%= @sale_data.bookings[0].dining_facility_id %>";
|
||||
|
||||
$("#back").on('click', function() {
|
||||
$("#foodcourt_back").on('click', function() {
|
||||
localStorage.removeItem('cash');
|
||||
customer_display_view(null,"reload");
|
||||
var sale_id = $('#sale_id').text();
|
||||
var flag = localStorage.getItem("trans_flag");
|
||||
if((flag!=null) && (flag != "true")){
|
||||
window.location.href = '/transactions/sales/'+sale_id;
|
||||
}else{
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/foodcourt/table/'+ dining_id;
|
||||
}else{
|
||||
window.location.href = '/foodcourt/'+cashier_type+'/pending_order/'+sale_id;
|
||||
}
|
||||
}
|
||||
// var sale_id = $('#sale_id').text();
|
||||
// var flag = localStorage.getItem("trans_flag");
|
||||
// if((flag!=null) && (flag != "true")){
|
||||
// window.location.href = '/transactions/sales/'+sale_id;
|
||||
// }else{
|
||||
// if (cashier_type=="cashier") {
|
||||
// window.location.href = '/foodcourt/table/'+ dining_id;
|
||||
// }else{
|
||||
// window.location.href = '/foodcourt/'+cashier_type+'/pending_order/'+sale_id;
|
||||
// }
|
||||
// }
|
||||
|
||||
});
|
||||
|
||||
@@ -641,9 +641,8 @@ $(document).ready(function(){
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
});
|
||||
|
||||
function customer_display_view(data,status) {
|
||||
url = '../../../../foodcourt/customer_view';
|
||||
window.customer_display_view = function(data,status) {
|
||||
url = '/foodcourt/customer_view';
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
@@ -902,9 +901,7 @@ $(document).ready(function(){
|
||||
window.location.href = '/foodcourt';
|
||||
}else{
|
||||
window.location.href = '/foodcourt/'+cashier_type;
|
||||
if (cashier_type=="quick_service"){
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@@ -933,6 +930,7 @@ $(document).ready(function(){
|
||||
}, function () {
|
||||
var flag = localStorage.getItem("trans_flag");
|
||||
localStorage.removeItem("trans_flag");
|
||||
customer_display_view(null,"reload");
|
||||
if((flag!=null) && (flag != "true")){
|
||||
window.location.href = '/transactions/sales/'+sale_id;
|
||||
}else{
|
||||
@@ -940,9 +938,6 @@ $(document).ready(function(){
|
||||
window.location.href = '/foodcourt';
|
||||
}else {
|
||||
window.location.href = '/foodcourt/'+cashier_type;
|
||||
if(cashier_type=="quick_service"){
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user