Hide empty compte columns in the drill-down modal, rename its title
The modal's group is usually 2-4 rows touching only 1-2 comptes -- unlike the main table (always all 8, so columns line up across every row/year), showing all 8 there was mostly empty columns. New modalComptes computed filters allComptes down to whichever actually carry a value somewhere in filterEntreeGroup. Also renamed "Entrée + sorties liées" to "Entrées et sorties liées" (title and footer label) to match multi-entrée groups.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user