diff --git a/web/modules/custom/figli_compta_ledger/js/home.js b/web/modules/custom/figli_compta_ledger/js/home.js index e3ba48e..ea0f6ff 100644 --- a/web/modules/custom/figli_compta_ledger/js/home.js +++ b/web/modules/custom/figli_compta_ledger/js/home.js @@ -471,6 +471,15 @@ const sorties = pool.filter((r) => r.type !== 'entree' && r.entreeLieeIds.some((id) => entreeIds.has(id))); return [...entrees, ...sorties]; }, + // Which comptes actually carry a value somewhere in the drill-down + // group -- unlike the main table (always all 8, so columns line up + // across every row/year), this modal's group is usually 2-4 rows + // touching only 1-2 comptes, so the other 6+ empty columns are pure + // clutter. + modalComptes() { + if (!this.filterEntreeGroup) return []; + return this.allComptes.filter((c) => this.filterEntreeGroup.some((r) => r.parCompte[c] !== undefined)); + }, filteredRows() { return this.rows.filter((r) => { if (this.filterCompte && r.parCompte[this.filterCompte] === undefined) return false; diff --git a/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig b/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig index bc90ca2..d8c5a57 100644 --- a/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig +++ b/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig @@ -196,7 +196,7 @@