From 85ea3cc71416d446fdc8858fbd8a562a02334182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Falc=C3=B3n?= Date: Sat, 30 May 2026 18:48:21 +0200 Subject: [PATCH] feat(accounts): show 50 transactions per page and link to full list (#459) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What - Bump the account page transaction list page size from **10 → 50** (`Accounts/Show.tsx`). - Add a **View in Transactions** button next to *Load more* (only on the account page) that opens the Transactions page pre-filtered to the current account via `account_ids`. - Add Spanish translation `View in Transactions` → `Ver en Transacciones`. ## Notes - The account list is synced client-side (IndexedDB); `pageSize` controls how many rows render before *Load more*, so no backend change needed. - The Transactions index already defaults to `per_page = 50` and reads `account_ids` from the query string. ## Testing - `vitest` Accounts/Show tests pass. - `bun run format`, `bun run lint`, `bun run build` pass. --- lang/es.json | 1 + .../transactions/transaction-list.tsx | 19 +++++++++++++++++++ resources/js/pages/Accounts/Show.tsx | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lang/es.json b/lang/es.json index 3a2d8568..642ba713 100644 --- a/lang/es.json +++ b/lang/es.json @@ -1564,6 +1564,7 @@ "View and manage your transactions": "Ver y gestionar tus transacciones", "View balance evolution over time": "Ver evolución del balance a lo largo del tiempo", "View details": "Ver detalles", + "View in Transactions": "Ver en Transacciones", "Visual Reports": "Reportes Visuales", "Visual insights": "Análisis visuales", "Visual insights & reports": "Análisis visuales e informes", diff --git a/resources/js/components/transactions/transaction-list.tsx b/resources/js/components/transactions/transaction-list.tsx index e98ee4ff..db493ba9 100644 --- a/resources/js/components/transactions/transaction-list.tsx +++ b/resources/js/components/transactions/transaction-list.tsx @@ -1,5 +1,6 @@ import { useLocale } from '@/hooks/use-locale'; import { __ } from '@/utils/i18n'; +import { Link } from '@inertiajs/react'; import { Cell, ColumnFiltersState, @@ -15,6 +16,7 @@ import { import { VirtualItem, Virtualizer } from '@tanstack/react-virtual'; import axios from 'axios'; import { format, getYear, isWithinInterval, parseISO } from 'date-fns'; +import { ExternalLink } from 'lucide-react'; import { createElement, useCallback, @@ -26,6 +28,7 @@ import { import { toast } from 'sonner'; import { single as reEvaluateSingle } from '@/actions/App/Http/Controllers/ReEvaluateTransactionRulesController'; +import { index as transactionsIndex } from '@/actions/App/Http/Controllers/TransactionController'; import { AutomateCategorizationDialog, type AutomateCategorizationCandidate, @@ -1387,6 +1390,22 @@ export function TransactionList({ )} )} + {accountId && ( + + )} )} diff --git a/resources/js/pages/Accounts/Show.tsx b/resources/js/pages/Accounts/Show.tsx index bbdbab04..4fad4472 100644 --- a/resources/js/pages/Accounts/Show.tsx +++ b/resources/js/pages/Accounts/Show.tsx @@ -398,7 +398,7 @@ export default function AccountShow({ labels={labels} automationRules={automationRules} accountId={account.id} - pageSize={10} + pageSize={50} hideAccountFilter={true} showActionsMenu={false} maxHeight={600}