whisper-money/resources/js/types
Víctor Falcón 8df44c2ef4
feat(transactions): save and reuse transaction filters (#496)
## What

Adds **saved filters** on the transactions page so users can name a set
of filters and reuse them later. The whole feature is gated behind a new
\`transaction-analysis\` Pennant feature flag (off by default).

## Why

Reusing the same filter combinations (e.g. "Japan trip", "Utilities") is
currently manual every time. This ports the saved-filters work from the
\`analysis-page\` branch, scoped down to **only** the transactions page
— the analysis screen and unrelated query changes from that branch are
intentionally left out.

## Changes

**Feature flag**
- \`App\Features\TransactionAnalysis\` — class-based flag, resolves
\`false\` by default.
- Shared to the frontend as \`features.transactionAnalysis\` and added
to the \`Features\` type.

**Backend (saved filters)**
- \`SavedFilter\` model (UUID, \`filters\` json cast, user belongsTo) +
migration + factory.
- \`Api\SavedFilterController\` — user-scoped index/store/update/destroy
under \`/api/saved-filters\`, ownership enforced with \`abort_unless\`.
- \`StoreSavedFilterRequest\` / \`UpdateSavedFilterRequest\` — name
unique per user, snake_case filter rules.

**Frontend**
- \`transaction-filter-serialization.ts\` —
serialize/deserialize/fingerprint between UI filter state and the
persisted snake_case shape.
- \`SavedFilters\` dropdown — load/save/update/delete with active +
dirty indicators.
- Integrated into the filter bar via an opt-in \`enableSavedFilters\`
prop, so it renders **only** on the transactions page (budgets/accounts
reuse the same component and stay unchanged). Render is also gated by
the feature flag.

**Filter bar UX**
- Split search + filters + saved searches onto their own row, separate
from the actions row (Categorize / Add transactions / columns), which
were getting cramped.
- On mobile, the text search moves into the filters popover.

## Reviewer notes
- Backend endpoints are **not** flag-gated; only the UI is, per the
request.
- Two-layer scoping: page opt-in prop **and** feature flag — flag off
means no UI anywhere.
- Translation keys fall back to the key (English); \`es.json\` entries
not added, matching the source branch.

## Testing
- \`tests/Feature/SavedFilterTest.php\` — 9 passing (auth, per-user
listing/uniqueness, ownership on update/delete).
- Pint, Prettier, ESLint clean. No new TypeScript errors introduced.
2026-06-05 18:00:14 +02:00
..
account.ts feat(settings): centralize currency options and split profile/account support (#256) 2026-04-02 19:23:10 +02:00
automation-rule.ts feat: add transaction labels feature (#24) 2025-12-13 13:02:19 +01:00
balance-import.ts feat: investment benefits — show gains/losses on investment accounts (#140) 2026-02-23 13:59:10 +01:00
banking.ts feat: Integrate EnableBanking as open banking provider (#106) 2026-02-12 09:09:28 +01:00
budget.ts feat(budgets): track multiple categories and labels per budget (#466) 2026-06-01 12:32:23 +02:00
category.test.ts Fix Spanish translations in category and delete flows (#397) 2026-05-14 11:36:53 +01:00
category.ts feat: parent/child category tree (#474) 2026-06-03 19:30:12 +02:00
import.ts feat(importer): support YYYYMMDD date format (#470) 2026-06-01 16:44:46 +02:00
index.d.ts feat(transactions): save and reuse transaction filters (#496) 2026-06-05 18:00:14 +02:00
label.ts feat: add transaction labels feature (#24) 2025-12-13 13:02:19 +01:00
language.ts feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
pricing.ts feat(pricing): dynamic Stripe pricing with locale-aware formatting (#204) 2026-03-05 11:41:59 +00:00
transaction.ts feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02:00
uuid.ts Fix CI: Update bun.lock and fix linting errors 2025-12-01 15:16:06 +01:00
vite-env.d.ts Init browser Sentry from env DSN (#370) 2026-05-09 12:07:11 +02:00