whisper-money/app/Http/Requests
Víctor Falcón 71dd6e2b7f
feat(budgets): track multiple categories and labels per budget (#466)
## Summary

Budgets previously tracked a single category **or** label (mutually
exclusive). This lets a budget span **multiple** categories and labels
at once, all pooling spend against one allocated amount per period.

Scope decided with the requester:
- **Shared pool** — one allocated amount; any tracked category/label
counts against it.
- **Multi categories + multi labels** on a single budget.
- **Create-only** — tracking is chosen at creation and locked afterward
(edit dialog shows it read-only).

## Changes

**Backend**
- New `budget_category` + `budget_label` pivot tables; data migration
copies existing `category_id`/`label_id` into them, then drops those
columns.
- `Budget` model: `categories()` / `labels()` belongsToMany.
- `BudgetTransactionService` matches transactions across **all** tracked
categories OR labels (live assignment + historical backfill).
- `StoreBudgetRequest` accepts `category_ids` / `label_ids` arrays,
requires ≥1 across both, validates ownership. `update` no longer touches
tracking.

**Frontend**
- Reusable `MultiSelect` (popover + command + badge).
- Create dialog uses multi-selects; cards and show page render tracked
categories/labels as badges; edit dialog shows them read-only.
- Dexie bumped to v10 (drops unused per-category allocations table, adds
`budget_labels`).

## Testing
- Updated all budget/transaction/listener/browser tests for the pivot
model; added cases for multi-category matching, mixed category+label
pooling, and store validation (empty selection + foreign-ownership).
- Added the new `__()` strings to `lang/es.json`.
- Local `pint`, `lint`, `format` pass. Relying on CI for the full suite.
2026-06-01 12:32:23 +02:00
..
Api feat: Decrypt encrypted transactions on key unlock (#123) 2026-02-16 10:37:43 +01:00
OpenBanking feat: Coinbase banking integration (#388) 2026-05-13 19:53:30 +02:00
Settings fix(categories): expose cashflow setting on create (#448) 2026-05-29 11:05:04 +02:00
BulkReEvaluateRulesRequest.php feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02:00
BulkUpdateTransactionsRequest.php feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02:00
IndexTransactionRequest.php feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02:00
SetupEncryptionRequest.php E2E Encryption 2025-11-07 14:21:25 +00:00
StoreAccountBalanceRequest.php feat: investment benefits — show gains/losses on investment accounts (#140) 2026-02-23 13:59:10 +01:00
StoreBudgetRequest.php feat(budgets): track multiple categories and labels per budget (#466) 2026-06-01 12:32:23 +02:00
StoreRealEstateDetailRequest.php feat(accounts): add real estate asset tracking (#241) 2026-03-24 10:21:32 +00:00
StoreTransactionRequest.php feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02:00
StoreUserLeadRequest.php feat(waitlist): waiting list with referral system (#199) 2026-03-04 12:36:47 +01:00
UpdateBudgetRequest.php feat(budgets): track multiple categories and labels per budget (#466) 2026-06-01 12:32:23 +02:00
UpdateCurrentAccountBalanceRequest.php feat: investment benefits — show gains/losses on investment accounts (#140) 2026-02-23 13:59:10 +01:00
UpdateLoanDetailRequest.php feat(accounts): add loan amortization projections for loan accounts (#246) 2026-03-26 15:06:09 +01:00
UpdateRealEstateDetailRequest.php feat(accounts): add market value and annual revaluation to real estate accounts (#245) 2026-03-26 11:02:20 +01:00
UpdateTransactionRequest.php feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02:00