Desarrollo de funcionalidad: pruebas!!

This commit is contained in:
imnavajas
2024-01-07 23:39:27 +01:00
parent c7562d9668
commit 95ab901367
7 changed files with 31 additions and 29 deletions

View File

@ -118,7 +118,7 @@
$('.dataTables_processing').hide();
const theData = jqXHR.responseJSON;
drawCallback(theData);
popErrorAlert(jqXHR.responseJSON.messages.error)
popErrorAlert(jqXHR.responseJSON.message)
}
});
} else {

View File

@ -364,7 +364,7 @@ const actionBtns_lp = function(data) {
`;
};
var tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{
window.tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{
scrollX: true,
searching: false,
paging: false,
@ -376,6 +376,9 @@ var tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
initComplete: function (settings, json) {
//getVisibleTabs();
},
columnDefs: [
{
targets: 0,

View File

@ -739,8 +739,11 @@
getVisibleTabs();
$('#tab-pv-bn').on( "click", function() {
previewInteriorPlana('bn');
} );

View File

@ -463,6 +463,24 @@ function getObjetoLP(lpName) {
function getVisibleTabs() {
window.tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
var rowData = this.data();
console.log(rowData.row_id);
$("#tab-pv-bn").show();
} );
/*
tableLineasPresupuesto.rows().data().every( function ( rowIdx, tableLoop, rowLoop ) {
var rowData = this.data();
console.log(rowData.row_id);
if ($('#' + rowData.row_id + '_checkPapel').prop('checked')) {
totalPapel += parseFloat($('#' + rowData.row_id + '_totalPapelPedido').val())
margenPapel += parseFloat($('#' + rowData.row_id + '_margenPapelPedido').val())
}
});*/
/*
$("#tableLineasPresupuesto tbody tr").each(function () {
let isVisible = $(this).is(":visible");
let lpName = $(this).attr('id').replace('lp_', '');
@ -514,30 +532,8 @@ function getVisibleTabs() {
});
/*
$("#tableLineasPresupuesto tbody tr:hidden").each(function () {
//console.log("Hidden: " + $(this).attr('id'));
if ($(this).attr('id').indexOf('cubierta') > -1) {
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).hide();
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-esquema-')).hide();
$("#pv_cubierta").removeClass("active show");
$("#pv_esquema_cubierta").removeClass("active show");
} else if ($(this).attr('id').indexOf('_data') > -1) {
// Do nothing here
} else if ($(this).attr('id').indexOf('_rot') > -1) {
$("#" + $(this).attr('id').replace('lp_rot_', 'tab-pv-rot-')).hide();
$("#" + $(this).attr('id').replace('lp_', 'pv_')).removeClass("active show");
} else {
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).hide();
$("#" + $(this).attr('id').replace('lp_', 'pv_')).removeClass("active show");
}
});
*/
}

View File

@ -22,7 +22,7 @@
<?php if(str_contains($formAction,'edit')): ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems") ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems") ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_previewItems") ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems") ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios") ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_comentariosItems") ?>