From 4a792464b48e547752b947848de0a9d8f3074ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Wed, 13 Nov 2024 17:02:00 +0100 Subject: [PATCH] al clickar en una linea se edita --- .../vuexy/form/presupuestos/buscador/viewBuscadorList.php | 6 ++++++ .../form/presupuestos/cliente/viewPresupuestoList.php | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/buscador/viewBuscadorList.php b/ci4/app/Views/themes/vuexy/form/presupuestos/buscador/viewBuscadorList.php index f98cf37b..e29501d2 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/buscador/viewBuscadorList.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/buscador/viewBuscadorList.php @@ -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')); diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php index 25041520..bad39b6e 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php @@ -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];