Skip to content

Commit

Permalink
Merge pull request #17 from GilbertoMV/php
Browse files Browse the repository at this point in the history
depositos y retiros √
  • Loading branch information
JPchipres committed Nov 28, 2022
2 parents 6539511 + ac4a8e1 commit 9c6c4cf
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion public/js/alertas.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,18 @@ $("#depositar").click(function() {
const monto = document.getElementById("montoDeposito").value;
const numcta = document.getElementById("numeroCuenta").value;
console.log(monto);
if(monto == '' || monto == '0'){
Swal.fire({
title:'¡Ha ocurrido un error!',
text:'¡Ingresa un monto válido!',
icon:'error',
background:"#2f2f2f",
color:"#fff",
timer:1500,
showConfirmButton:false,
timerProgressBar:true
})
}else{
Swal.fire({
title: '¿Estas Seguro?',
text: `El monto a Depositar es: ${monto}`,
Expand Down Expand Up @@ -448,14 +460,26 @@ $("#depositar").click(function() {
timer:2000
})
}

})
}
});
// RETIRAR
$("#retirar").click(function() {
const monto = document.getElementById("montoRetiro").value;
const numcta = document.getElementById("numeroCuenta_Retiro").value;
console.log(monto);
if(monto == '' || monto <= '0'){
Swal.fire({
title:'¡Ha ocurrido un error!',
text:'¡Ingresa un monto válido!',
icon:'error',
background:"#2f2f2f",
color:"#fff",
timer:1500,
showConfirmButton:false,
timerProgressBar:true
})
}else{
Swal.fire({
title: '¿Estas Seguro?',
text: `El monto a retirar es: ${monto}`,
Expand Down Expand Up @@ -534,6 +558,7 @@ $("#retirar").click(function() {
})
}
})
}
});

// ALERTAS DEL USUARIO
Expand Down

0 comments on commit 9c6c4cf

Please sign in to comment.