Advertisement
juanftp100

ver detalle

Jun 5th, 2024
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.92 KB | Fixit | 0 0
  1. // Manejar clic en el botón "Ver Detalle"
  2.   $('#pediTable tbody').on('click', '.verDetalle', function() {
  3.     const detalle_pedido_de_compras = $(this).data('detalle_pedido_de_compras');
  4.     // Limpiar la lista de detalles del insumo
  5.     $('#insumoDetalle-info').empty();
  6.     // Agregar detalles del insumo a la lista
  7.     if(detalle_pedido_de_compras) {
  8.       detalle_pedido_de_compras.forEach(function(insumo) {
  9.           $('#insumoDetalle-info').append(`
  10.               <li class="list-group-item">
  11.                   <strong>ID Insumo:</strong> ${insumo.id_insumo}<br>
  12.                   <strong>Cantidad:</strong> ${insumo.cantidad}<br>
  13.                   <strong>Nombre Insumo:</strong> ${insumo.nombre_insumo}<br>
  14.                   <strong>Unidad de Medida:</strong> ${insumo.unidad_medida}
  15.               </li>`);
  16.       });
  17.     }
  18.     // Mostrar el modal con los detalles del insumo
  19.     $('#detalleModal').modal('show');
  20.   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement