whisper-money/app/Http/Controllers
Víctor Falcón e5eca1eacb
feat: Add label support to single transaction update endpoint (#75)
## Summary
- Added label update support to the single transaction `update()`
endpoint
- Previously, labels could only be updated via the bulk update endpoint
- Now both endpoints support label updates with consistent behavior

## Changes
- **UpdateTransactionRequest**: Added `label_ids` validation (array of
UUIDs that must belong to user)
- **TransactionController@update**: Now handles label updates alongside
other attributes
  - Syncs labels when `label_ids` is provided
  - Reloads labels relationship for fresh data in events
  - Fires single `updated` event after all changes
- **AssignTransactionToBudget listener**: Ensures labels are loaded
fresh after queue serialization
- **Tests**: Added 6 comprehensive tests covering all label update
scenarios

## Behavior
- **Don't send `label_ids`** → labels unchanged (partial update)
- **Send `label_ids: []`** → removes all labels
- **Send `label_ids: [uuid1, uuid2]`** → replaces labels with these

## Testing
When labels are updated, the `TransactionUpdated` event fires and the
transaction is automatically assigned to matching budgets (via queued
listener).

All tests pass (29 tests, 134 assertions).

Fixes the issue where transactions wouldn't appear in budget after
adding a matching label via the single transaction update endpoint.
2026-01-24 17:54:54 +01:00
..
Api chore: Simplify IndexedDB sync by moving to Inertia shared props (#63) 2026-01-19 19:15:26 +01:00
Settings Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Sync chore: Simplify IndexedDB sync by moving to Inertia shared props (#63) 2026-01-19 19:15:26 +01:00
AccountBalanceController.php chore: Simplify IndexedDB sync by moving to Inertia shared props (#63) 2026-01-19 19:15:26 +01:00
AccountController.php Accounts: new pages to list, and see account details (#13) 2025-12-05 14:33:18 +01:00
BudgetController.php feat: Load transactions history on budget created (#72) 2026-01-22 11:10:15 +01:00
CashflowController.php Add Cashflow Analytics Feature (#49) 2026-01-05 13:06:50 +01:00
Controller.php Set up a fresh Laravel app 2025-11-07 12:01:36 +00:00
DashboardController.php feat: Auto-open encryption key modal after login (#54) 2026-01-11 20:29:49 +01:00
EncryptionController.php Remove unused controllers and routes (#11) 2025-12-04 08:48:17 +01:00
OnboardingController.php User Onboarding Flow (#23) 2025-12-12 13:06:08 +01:00
RobotsController.php User Onboarding Flow (#23) 2025-12-12 13:06:08 +01:00
SitemapController.php SEO landing page 2025-11-25 11:33:11 +01:00
SubscriptionController.php Demo Account Experience (#51) 2026-01-07 10:58:14 +01:00
TransactionController.php feat: Add label support to single transaction update endpoint (#75) 2026-01-24 17:54:54 +01:00
UserLeadController.php Add lead tracking webhook implementation 2025-11-25 12:13:29 +01:00