Commit 07ba9549 by Billy Larru

corrigiendo bug en asignacion de monto de amanecidas

parent 4d863501
...@@ -86,10 +86,9 @@ function registrar() { ...@@ -86,10 +86,9 @@ function registrar() {
estado estado
}; };
axios.post(URI_POLICIA_MONTOS_AMANECIDAS, params).then((response) => { ajaxWebService.post(URI_POLICIA_MONTOS_AMANECIDAS, params).then((response) => {
response.data = formatResponse(response);
if (response.data.status) { if (response.status) {
swal({ swal({
type: 'success', type: 'success',
title: '¡Se registró correctamente!', title: '¡Se registró correctamente!',
...@@ -121,7 +120,7 @@ function mostrarMensajeResultadoModal(result = {}){ ...@@ -121,7 +120,7 @@ function mostrarMensajeResultadoModal(result = {}){
} }
function mostrarModalEdicion(data = {}) { function mostrarModalEdicion(data = {}) {
axios.get("modals/policias/asignarMontoAmanecida/editarMontoConcepto.jsp").then((response) => { ajaxModal.get("policias/asignarMontoAmanecida/editarMontoConcepto.jsp").then((response) => {
swal({ swal({
title: '<strong>Editar Montos de amanecidas</strong>', title: '<strong>Editar Montos de amanecidas</strong>',
html: response.data, html: response.data,
...@@ -144,7 +143,7 @@ function mostrarModalEdicion(data = {}) { ...@@ -144,7 +143,7 @@ function mostrarModalEdicion(data = {}) {
function mostrarModalEliminacion(data) { function mostrarModalEliminacion(data) {
axios.put(URI_POLICIA_MONTOS_AMANECIDAS, data) // axios.put(URI_POLICIA_MONTOS_AMANECIDAS, data)
swal({ swal({
type: 'success', type: 'success',
...@@ -172,6 +171,7 @@ function listarMontos(objParams = {}) { ...@@ -172,6 +171,7 @@ function listarMontos(objParams = {}) {
}, },
classNameForDatatable, classNameForDatatable,
).then((nodes) => { ).then((nodes) => {
nodes.container.off();
nodes.container.on("click", ".editar", function () { nodes.container.on("click", ".editar", function () {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data(); let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
mostrarModalEdicion(data); mostrarModalEdicion(data);
......
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