update move table
This commit is contained in:
@@ -385,29 +385,37 @@ end
|
||||
$('#move_table').on('click',function(){
|
||||
change_to = $('#change_table_value').val();
|
||||
change_from = "<%= @dining.id %>";
|
||||
|
||||
if (change_to == ""){
|
||||
swal({
|
||||
title: "Alert!!",
|
||||
text: 'Please Select Table !',
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
}else{
|
||||
$("#oqs_loading_wrapper").show();
|
||||
$.ajax({type: "POST",
|
||||
url: "<%= origami_moving_path %>",
|
||||
data: "change_from="+ change_from + "&change_to=" + change_to,
|
||||
success:function(result){
|
||||
if (result.get_type == 'Table'){
|
||||
window.location.href = '/origami/table/' + change_to;
|
||||
}else{
|
||||
window.location.href = '/origami/room/' + change_to;
|
||||
}
|
||||
// alert("Moving Success")
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: 'Moving Success',
|
||||
type: 'success',
|
||||
}, function (){
|
||||
if (result.get_type == 'Table'){
|
||||
window.location.href = '/origami/table/' + change_to;
|
||||
}else{
|
||||
window.location.href = '/origami/room/' + change_to;
|
||||
}
|
||||
});
|
||||
// swal({
|
||||
// title: "Information!",
|
||||
// text: 'Moving Success',
|
||||
// type: 'success',
|
||||
// }, function (){
|
||||
// if (result.get_type == 'Table'){
|
||||
// window.location.href = '/origami/table/' + change_to;
|
||||
// }else{
|
||||
// window.location.href = '/origami/room/' + change_to;
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user