update reload second display

This commit is contained in:
Aung Myo
2018-03-13 10:26:18 +06:30
parent 428b9a4b64
commit 5b99a8cf65
3 changed files with 23 additions and 13 deletions

View File

@@ -776,17 +776,17 @@ $(function() {
e.preventDefault();
$("#oqs_loading_wrapper").show();
type = window.location.href.indexOf("quick_service");
if (type != -1) {
quick_service = window.location.href.indexOf("quick_service");
if (quick_service != -1) {
type = 'quick_service'
var table_type = $('#table_type').text();
var table_type = $('#table_type').text();
var table_id = $('#table_id').val();
var customer_id = $('#customer_id').val();
var booking_id = $('#booking_id').text();
var ajax_url = 'addorders/create';
}else{
type = 'cashier'
var table_type = $('#table_type').text();
var table_type = $('#table_type').text();
var table_id = $('#table_id').text();
var customer_id = $('#customer_id').text();
var booking_id = $('#booking_id').text();
@@ -813,17 +813,19 @@ $(function() {
data: params,
dataType: "json",
success:function(result){
customer_display_view(null,"reload");
console.log(type)
console.log(table_type)
if (type == "quick_service") {
window.location.href = "/origami/quick_service"
window.location.href = "/origami/quick_service"
}else{
if(table_type == "Table"){
window.location.href = "/origami/table/" + table_id
window.location.href = "/origami/table/" + table_id
}
else {
window.location.href = "/origami/room/" + table_id
window.location.href = "/origami/room/" + table_id
}
}
customer_display_view(null,"reload");
}
});
// }else{