Merge branch 'mod/click_edit_list_presu' into 'main'

al clickar en una linea se edita

See merge request jjimenez/safekat!382
This commit is contained in:
2024-11-13 16:02:24 +00:00
2 changed files with 13 additions and 1 deletions

View File

@ -292,6 +292,12 @@ $(document).on('click', '.btn-edit', function(e) {
window.location.href = `/presupuestos/cosidotapablanda/edit/${$(this).attr('data-id')}/`;
});
theTable.on('click', 'tr', function () {
var data = theTable.row(this).data();
console.log(data);
var url = '/presupuestos/cosidotapablanda/edit/' + data['id'];
window.location.href = url;
});
$(document).on('click', '.btn-delete', function(e) {
$(".btn-remove").attr('data-id', $(this).attr('data-id'));

View File

@ -292,7 +292,13 @@ theTable = $('#tableOfPresupuestos').DataTable({
]
});
theTable.on('click', 'tr', function () {
var data = theTable.row(this).data();
console.log(data);
var url = '/presupuestos/presupuestocliente/edit/' + data['id'];
window.location.href = url;
});
theTable.on( 'draw.dt', function () {
const dateCols = [1];