whisper-money/app
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
..
Actions Add category type field support (#2) 2025-12-01 20:19:47 +01:00
Console/Commands Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Enums Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Events Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Http feat: Add label support to single transaction update endpoint (#75) 2026-01-24 17:54:54 +01:00
Jobs feat: Load transactions history on budget created (#72) 2026-01-22 11:10:15 +01:00
Listeners feat: Add label support to single transaction update endpoint (#75) 2026-01-24 17:54:54 +01:00
Mail feat: New discord offer 2026-01-10 10:27:32 +01:00
Models feat: Load transactions history on budget created (#72) 2026-01-22 11:10:15 +01:00
Policies Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Providers Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Services feat: Load transactions history on budget created (#72) 2026-01-22 11:10:15 +01:00