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