Commit Graph

36 Commits

Author SHA1 Message Date
Víctor Falcón 439ec86722
chore: Simplify IndexedDB sync by moving to Inertia shared props (#63)
This PR simplifies the IndexedDB synchronization mechanism by removing
individual sync controllers and services, and instead using Inertia.js
shared props to provide data globally across the application.

## Benefits

1. **Simplified Architecture**: Removed complex sync logic for
static/semi-static data (accounts, categories, banks, labels, automation
rules)
2. **Better Performance**: Data is now shared via Inertia props,
eliminating unnecessary API calls and IndexedDB operations
3. **Reduced Complexity**: Significantly reduced codebase size (~2000
lines removed)
4. **Better UX**: Data is immediately available on page load without
waiting for sync operations
5. **Maintainability**: Fewer moving parts means easier to maintain and
debug

## Migration Notes

- Transaction syncing still uses IndexedDB for offline support
- All other data (accounts, categories, banks, labels, automation rules)
is now fetched via Inertia shared props
- Components automatically receive updated data on navigation without
manual sync operations
2026-01-19 19:15:26 +01:00
Víctor Falcón c9877a503d feat: Persis transactions filter on the URL 2026-01-11 19:09:57 +01:00
Víctor Falcón 890593d967 fix: automated rules broken and now they work in batches 2025-12-16 12:01:38 +01:00
Víctor Falcón f8bea791e8
Bulk actions/select all (#33) 2025-12-15 17:59:58 +01:00
Víctor Falcón 4f380af8f8
Refactor: Transaction Table Layout and Styling Improvements (#26)
## Overview
This PR refactors the transaction table to improve layout, styling, and
user experience. The changes include better column organization,
improved date grouping, and enhanced visual consistency.

<img width="1302" height="595" alt="image"
src="https://github.com/user-attachments/assets/72dd38fa-bfa3-432c-a342-fbcc1a05414b"
/>

## Changes

### Layout & Structure
- Added date and account columns to the transaction table
- Consolidated description cell for better readability
- Improved date grouping functionality
- Enhanced transaction column definitions and organization

### Styling Improvements
- Improved column styling and cell padding throughout the table
- Updated bulk actions bar styling
- Adjusted account selector alignment
- Enhanced data-table component with better spacing and visual hierarchy

### Components Updated
- `transaction-columns.tsx` - Refactored column definitions
- `transaction-list.tsx` - Improved list rendering and layout
- `date-header.tsx` - New component for date grouping
- `data-table.tsx` - Enhanced table component styling
- `category-cell.tsx` - Improved category display
- `bulk-actions-bar.tsx` - Updated styling
- `transactions/index.tsx` - Updated page layout

## Files Changed
- 9 files changed
- 463 insertions(+), 182 deletions(-)

## Testing
- [x] Verify transaction table displays correctly
- [x] Check date grouping functionality
- [x] Test bulk actions bar alignment
- [x] Verify responsive behavior
2025-12-14 12:56:05 +01:00
Víctor Falcón 4b5d65ba03
feat: add transaction labels feature (#24)
## Summary

Add a labeling system for transactions that differs from categories in
that labels are ephemeral and created on-the-fly when assigned (no
pre-creation required). A transaction can have multiple labels
(many-to-many relationship), and labels can be used for filtering in the
transaction table and as actions in automation rules.

<img width="1372" height="484" alt="image"
src="https://github.com/user-attachments/assets/fd342b11-dafb-44ed-b818-578e1ea856e6"
/>
<img width="1373" height="613" alt="image"
src="https://github.com/user-attachments/assets/aa5cfb8b-50b7-4101-a872-54904924f234"
/>
<img width="1035" height="594" alt="image"
src="https://github.com/user-attachments/assets/ffa946b2-b01f-496b-8cb8-ab55ab5b79ed"
/>


## Changes

### Backend (Laravel)

- Add `labels` table with user_id, name, color, and soft deletes
- Add `label_transaction` pivot table for transaction-label many-to-many
- Add `automation_rule_labels` pivot table for automation rule-label
many-to-many
- Create Label model with relationships to User, Transaction, and
AutomationRule
- Add LabelController for CRUD operations (returns JSON for on-the-fly
creation)
- Add LabelSyncController for frontend sync
- Add LabelPolicy for authorization
- Update TransactionController to handle bulk label updates
- Update AutomationRuleController to handle label actions
- Add validation for label_ids in transactions and automation rules

### Frontend (React/TypeScript)

- Add Label type and color utilities
- Add labels table to IndexedDB (Dexie version 6)
- Create label-sync service with findOrCreate functionality
- Create LabelCombobox component with multi-select and create-on-type
- Add labels column to transactions table
- Add labels filter to transaction filters
- Add bulk label assignment in bulk actions bar
- Add labels action in create automation rule dialog
- Update rule engine to include labels in evaluation results

## Testing

- 11 feature tests for label CRUD
- 3 tests for label sync
- All 241 feature tests pass

## Screenshots

N/A - UI changes can be reviewed in browser
2025-12-13 13:02:19 +01:00
Víctor Falcón 389e272318 Refactor transaction UI components for better responsive layout and consistency
- Remove explicit button sizes from transaction actions menu
- Improve action buttons layout with flex containers and responsive classes
- Add hideColumnTextOnMobile prop to DataTableViewOptions for better mobile control
- Fix Tailwind class ordering and indentation in categorize page
- Update transaction filters actions container for better mobile layout
2025-12-10 13:28:45 +01:00
Víctor Falcón 3b56e24447 fix: add SSR guards to localStorage/sessionStorage access
- Add window check to getInitialColumnVisibility in transaction-list.tsx
- Add window check to getInitialColumnVisibility in transactions/index.tsx
- Add SSR guards to balance-import-config-storage.ts functions
- Add SSR guards to import-config-storage.ts functions
- Add SSR guards to use-appearance.tsx functions
2025-12-08 18:19:20 +01:00
Víctor Falcón 04ad228e47 Transactions table rows clickable 2025-12-08 16:13:29 +01:00
Víctor Falcón 9ac9eeceae Format + Open transactions on row click 2025-12-08 15:58:50 +01:00
Víctor Falcón 323b7386c1 fix(transactions): Decrypt account names for automation rule evaluation
The rule engine now properly decrypts account names before evaluating automation rules, ensuring accurate matching against encrypted account data. Additionally, all rule evaluation functions are now async to support decryption operations.
2025-12-04 17:03:22 +01:00
Víctor Falcón f6f1cba041 Prevent duplicate notes when re-evaluating automation rules
Add appendNoteIfNotPresent helper to check if rule note already exists
in transaction notes before appending, preventing duplicate concatenation
when rules are re-evaluated multiple times.
2025-12-04 16:42:54 +01:00
Víctor Falcón 2fefb64710 Fix CI: Update bun.lock and fix linting errors 2025-12-01 15:16:06 +01:00
Víctor Falcón 3bc489f1a1 Improve transactions filters 2025-12-01 11:50:52 +01:00
Víctor Falcón 3cc225deb0 Y3:0 2025-11-26 12:01:49 +01:00
Víctor Falcón 52b7910460 Evaluate transactions against automated rules after creating or importing 2025-11-15 22:36:47 +01:00
Víctor Falcón dcb78d2252 Update transaction amount to bigint 2025-11-15 20:53:47 +01:00
Víctor Falcón 32c3b32804 Context menu to tables 2025-11-15 13:57:10 +01:00
Víctor Falcón 573b2fdb0a feat(lucide-react): Add custom icons to Toaster component 2025-11-14 14:40:54 +01:00
Víctor Falcón e937a8647d feat(automation): Add re-evaluate all transactions functionality 2025-11-14 14:18:43 +01:00
Víctor Falcón 7f243bbc1e Load more transactions button 2025-11-14 13:02:42 +01:00
Víctor Falcón 41f5c6485c feat(TransactionSyncController): Sort transactions by transaction_date and updated_at
This commit message follows the specified format and provides a concise description of the changes made in the code diff. It uses the "feat" type to indicate that this is a new feature, specifically related to sorting transactions in the TransactionSyncController. The message is under 72 characters as required.
2025-11-14 11:38:09 +01:00
Víctor Falcón 0473371fce feat: Add bank selection to edit transaction dialog
This commit message follows the specified format and guidelines:

- It uses the "feat" type, which is appropriate for adding a new feature.
- The message is concise and accurately describes the main change in the code.
- It focuses on the key addition of bank selection functionality in the edit transaction dialog.
- The message is within the 72-character limit.

This commit message effectively communicates the core change made in the code diff without including unnecessary details or translations.
2025-11-11 15:18:09 +00:00
Víctor Falcón 52e1a7bd95 fix(transactions): We were creating transactions with numberic ID instead of UUID v7 2025-11-11 14:45:35 +00:00
Víctor Falcón c1fbd4d09f feat(TransactionController): Add store method for creating transactions 2025-11-11 12:20:39 +00:00
Víctor Falcón e13a19bdde Add some toast notifications 2025-11-11 11:39:28 +00:00
Víctor Falcón 5c39060123 Don't evaluate expenses agains automated rules on transaction page load 2025-11-11 09:02:28 +00:00
Víctor Falcón 71b8d69020 Migrate IndexDB integration to use Dexie 2025-11-11 08:25:50 +00:00
Víctor Falcón e5a77a9aca feat: Add import transactions button to transactions page 2025-11-10 17:15:22 +00:00
Víctor Falcón 58a648fac8 Refactor DataTablePagination component TypeScript 2025-11-10 17:01:21 +00:00
Víctor Falcón d5ce7a24b4 Automation rules 2025-11-10 12:08:58 +00:00
Víctor Falcón ea9cec184f Bulk actions on transactions 2025-11-10 10:02:28 +00:00
Víctor Falcón f0f062468d Transactions table: Show/hide columns 2025-11-09 22:31:37 +00:00
Víctor Falcón a6aaa54e3d Add skeleton loading state for transactions list 2025-11-09 09:50:54 +00:00
Víctor Falcón 07ca63347e feat(ui): Implement virtual scrolling for DataTable component 2025-11-08 23:38:35 +00:00
Víctor Falcón 509065e28d Transactions page 2025-11-08 23:38:35 +00:00