change alert to swal in origami/Add to Existing

This commit is contained in:
phyusin
2017-12-19 16:01:45 +06:30
parent 60a58bc948
commit d7a3ba7004
2 changed files with 23 additions and 7 deletions

View File

@@ -491,7 +491,7 @@
window.location.href = '/origami/' + sale_id + '/other_charges' window.location.href = '/origami/' + sale_id + '/other_charges'
} }
else { else {
alert("Please select an table!"); swal ( "Oops" , "Please select an table!" , "warning" );
} }
return false; return false;
@@ -510,7 +510,7 @@
window.location.href = '/origami/' + sale_id + '/discount' window.location.href = '/origami/' + sale_id + '/discount'
} }
else { else {
alert("Please select an table!"); swal ( "Oops" , "Please select an table!" , "warning" );
} }
return false; return false;
@@ -584,8 +584,16 @@
url: ajax_url, url: ajax_url,
data: 'dining_id=' + dining_id + "&sale_id=" + sale_id, data: 'dining_id=' + dining_id + "&sale_id=" + sale_id,
success: function (result) { success: function (result) {
alert("Invoice updated") swal({
title: "Information!",
text: "Invoice updated",
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.reload(); window.location.reload();
});
} }
}); });
}) })

View File

@@ -498,7 +498,7 @@ $(document).ready(function(){
window.location.href = '/origami/' + sale_id + '/discount' window.location.href = '/origami/' + sale_id + '/discount'
} }
else { else {
alert("Please select an table!"); swal ( "Oops" , "Please select an table!" , "warning" );
} }
return false; return false;
@@ -517,7 +517,7 @@ $(document).ready(function(){
window.location.href = '/origami/' + sale_id + '/other_charges' window.location.href = '/origami/' + sale_id + '/other_charges'
} }
else { else {
alert("Please select an table!"); swal ( "Oops" , "Please select an table!" , "warning" );
} }
return false; return false;
@@ -600,8 +600,16 @@ $('#add_invoice').on('click',function(){
url: ajax_url, url: ajax_url,
data: 'dining_id='+ dining_id + "&sale_id=" + sale_id, data: 'dining_id='+ dining_id + "&sale_id=" + sale_id,
success:function(result){ success:function(result){
alert("Invoice updated") swal({
title: "Information!",
text: "Invoice updated",
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.reload(); window.location.reload();
});
} }
}); });
}); });