From 8e3871370ae17e2b582effdb72218ba2ed65b40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Falc=C3=B3n?= Date: Mon, 22 Jun 2026 19:21:15 +0200 Subject: [PATCH] fix(transactions): pad Category column when Date column is hidden (#585) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem On `/transactions`, hiding the Date column left the Category column flush against the table edge (`pl-0`), despite #582/#583 trying to fix exactly this. ## Root cause The padding fix (commit `0424c737`) drove the Category left padding from `isDateHidden`, but only wired it into `transaction-list.tsx` (used by Accounts and budgets). The `/transactions` page builds its **own** table and called `createTransactionColumns` without `isDateHidden`, so it always defaulted to `false` → `pl-0`. ## Fix Pass `isDateHidden: columnVisibility.transaction_date === false` (and add `columnVisibility` to the `useMemo` deps) on the `/transactions` page, mirroring `transaction-list.tsx`. ## Tests `transaction-columns.test.tsx` already covers the `pl-0`/`pl-2` branch driven by `isDateHidden`; the bug was missing wiring, not logic. Verified manually on `/transactions` with the Date column hidden. --- resources/js/pages/transactions/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/js/pages/transactions/index.tsx b/resources/js/pages/transactions/index.tsx index db04b364..05c620c1 100644 --- a/resources/js/pages/transactions/index.tsx +++ b/resources/js/pages/transactions/index.tsx @@ -847,6 +847,7 @@ export default function Transactions({ onUpdate: updateTransaction, onCategorized: showAutomatizeToast, onReEvaluateRules: handleReEvaluateRules, + isDateHidden: columnVisibility.transaction_date === false, }), [ accounts, @@ -857,6 +858,7 @@ export default function Transactions({ updateTransaction, showAutomatizeToast, handleReEvaluateRules, + columnVisibility, ], );