update confirm box

This commit is contained in:
Aung Myo
2017-10-19 18:17:56 +06:30
parent 034685e1e9
commit 78c6304748
21 changed files with 364 additions and 556 deletions

View File

@@ -153,10 +153,9 @@ $("#redeem").click(function(){
membership_id = $("#valid_amount").attr('data-member-value');
redeem_amount = parseFloat($("#used_amount").text());
if(redeem_amount<=0 ){
alert("Please type valid amount");
swal ( "Oops" , "Please type valid amount!" , "warning" );
}else if(valid_amount< redeem_amount){
alert(" Insufficient Amount!")
swal ( "Oops" , "Insufficient Amount!" , "warning" );
}else{
if(redeem_amount <= "<%= @redeem_prices %>"){
$.ajax({
@@ -165,14 +164,20 @@ $("#redeem").click(function(){
data: {redeem_amount:redeem_amount,membership_id:membership_id,sale_id:sale_id},
success: function(result){
if(result.status == true){
window.location.href = '/origami/sale/'+ sale_id + "/payment"
swal({
title: "Infomation!",
text: result.status,
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/payment"
});
}else{
alert(result.message);
swal ( "Information" , result.message);
}
}
})
}else {
alert("Redeem Amount is over!");
swal ( "Oops" , "Redeem Amount is over!" , "warning" );
}
}
});