Commit ed6ef304 by Billy Larru

cambio de estado en asignar monto de amanecidas

parent 982e61a6
......@@ -99,7 +99,7 @@ function registrar() {
if (response.status) {
swal({
type: 'success',
title: '¡Se registró correctamente!',
title: '¡Se registró exitosamente!',
showConfirmButton: false,
timer: 1500
});
......@@ -120,7 +120,7 @@ function mostrarMensajeResultadoModal(result = {}){
if (result.value) {
swal({
type: 'success',
title: '¡Se realizó la actualización correctamente!',
title: '¡Se realizó la actualización exitosamente!',
showConfirmButton: false,
timer: 1500
});
......@@ -151,26 +151,38 @@ function mostrarModalEdicion(data = {}) {
function mostrarModalEliminacion(data) {
let {id, estado} = data;
let mensaje = "";
let
let titulo = "";
let textoConfirmacion = ""
let tituloOperacion = "";
if (estado) {
titulo = 'Está seguro de eliminar?';
textoConfirmacion = 'Sí, eliminar!';
tituloOperacion = '¡Eliminado exitosamente!';
estado = 0;
} else {
titulo = 'Está seguro de activar?';
textoConfirmacion = 'Sí, activar!';
tituloOperacion = '¡Activado exitosamente!';
estado = 1;
}
swal({
title: 'Está seguro de eliminar?',
title: titulo,
text: "",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Sí, eliminar!'
confirmButtonText: textoConfirmacion
}).then((result) => {
if (result.value) {
ajaxWebService.patch(`${URI_POLICIA_MONTOS_AMANECIDAS}/${id}`, {estado}).then((response) => {
if (response.status) {
swal({
type: 'success',
title: '¡Eliminado correctamente!',
title: tituloOperacion,
showConfirmButton: false,
timer: 1500
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment