From f3ce872b02fb424595487605bcbecf67764e3006 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 4 Sep 2026 12:37:06 +0200 Subject: [PATCH] Compact date format, move action buttons to the left Dates render as jj/mm/aa instead of the API's ISO yyyy-mm-dd -- saves width in a table already packed with 8 compte columns. Actions column (edit pencil, link icon) moves from the right end to the first column. Column-hover crosshair logic is unaffected: it walks colSpan positions dynamically rather than assuming a fixed index. Co-Authored-By: Claude Sonnet 5 --- .../custom/figli_compta_ledger/js/home.js | 7 ++++ .../templates/figli-compta-home.html.twig | 38 +++++++++---------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/web/modules/custom/figli_compta_ledger/js/home.js b/web/modules/custom/figli_compta_ledger/js/home.js index 3737785..1de4d55 100644 --- a/web/modules/custom/figli_compta_ledger/js/home.js +++ b/web/modules/custom/figli_compta_ledger/js/home.js @@ -234,6 +234,13 @@ formatEur(v) { return v === null || v === undefined ? '' : EUR.format(v); }, + // jj/mm/aa -- shorter than the API's ISO yyyy-mm-dd, saves column + // width in a table already packed with 8 compte columns. + formatDate(iso) { + if (!iso) return ''; + const [y, m, d] = iso.split('-'); + return d + '/' + m + '/' + y.slice(2); + }, typeLabel(t) { return TYPE_LABELS[t] || t; }, 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 a515a6e..f6cdbec 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 @@ -66,6 +66,7 @@ + @@ -74,7 +75,6 @@ - @@ -83,23 +83,6 @@ - - - - - - - - + + + + + + + + + -
Date Client TypeMontant TTC {{ c }} Écart
{{ item.label }} ({{ item.count }} lignes)
{{ item.date }}{{ item.client || '—' }}{{ typeLabel(item.type) }} - {{ item.libelle }} - {{ reconciliationByEntree.get(item.id).count }} sortie{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} liée{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} - {{ formatEur(item.montant_ht) }}{{ formatEur(item.montant_ttc) }}{{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }}{{ item.hasError ? formatEur(item.ecart) : '' }} {{ formatDate(item.date) }}{{ item.client || '—' }}{{ typeLabel(item.type) }} + {{ item.libelle }} + {{ reconciliationByEntree.get(item.id).count }} sortie{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} liée{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} + {{ formatEur(item.montant_ht) }}{{ formatEur(item.montant_ttc) }}{{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }}{{ item.hasError ? formatEur(item.ecart) : '' }}
Solde (créditeur / débiteur) — {{ filteredRows.length }} lignes filtrées {{ formatEur(footerTotals.montant_ht) }} {{ formatEur(footerTotals.montant_ttc) }} {{ formatEur(footerTotals.parCompte[c]) }} {{ formatEur(footerTotals.ecart) }}