The TransactionsFeedView is a card-based transaction display interface that provides users with a visual and intuitive way to browse, search, and manage financial transactions within a book. This view complements the existing table-based transaction views by offering a more visual, card-based approach that's particularly effective for mobile devices and when users want to quickly scan transaction details.
- Component Path:
/src/pages/transactionsFeed/TransactionsFeedView.vue - Route: Accessed via book navigation with
?bookId=<id>query parameter - Layout: Uses
BookLayoutfor consistent book-scoped navigation
Each transaction is displayed as an individual card containing:
- Transaction Type Badge: Visual indicator (Income, Expense, Payment, Charge) with color coding
- Date: Transaction date in localized format
- Description: Primary transaction description as card title
- Amount: Formatted currency amount with type-based color coding
- Account Name: Source/destination account with building icon
- Category Badge: Optional category display when assigned
- Note: Optional additional details with note icon
- Exercised Status: Visual status indicator (Exercised/Pending)
- Edit Button: Full-width action button for transaction management
- Description Search: Real-time filtering by transaction description
- Search Input: Floating label input with search icon
- Active Search Display: Shows clear search button when search is active
- Case-Insensitive: Search is not case-sensitive for better UX
- Permission-Aware: Checks user write permissions before allowing edits
- Modal Integration: Uses the shared
TransactionModalcomponent - Full CRUD Operations: Create, Read, Update, Delete via modal
- Duplicate Support: Ability to duplicate transactions
- Read-Only Mode: Users without write permissions see transactions in read-only mode
- Graceful Degradation: Edit attempts by read-only users show modal in view mode
- Role-Based Access: Respects book-level user roles (admin, collaborator, viewer)
- Grid Layout: Responsive card grid using Bootstrap columns
col-12: Full width on mobilecol-sm-6: 2 cards per row on small screenscol-lg-4: 3 cards per row on large screenscol-xl-3: 4 cards per row on extra large screens
- Card Sizing: Equal height cards with flex layout
- Mobile-First: Optimized for touch interactions
- Transaction Types: Consistent color coding across the application
- Income/Payment: Success colors (green)
- Expense/Charge: Danger colors (red)
- Status Indicators:
- Exercised: Success (green)
- Pending: Warning (yellow/orange)
- Dark Mode Support: Uses Bootstrap 5.3 native dark mode classes
- Semantic Colors:
bg-body-secondary,text-light-emphasisfor theme compatibility - Component Consistency: Aligns with existing application design patterns
TransactionsFeedView
├── BookLayout (wrapper)
├── Search Form
│ ├── Floating Label Input
│ └── Clear Search Button
├── Transaction Cards Grid
│ └── Individual Transaction Cards
└── TransactionModal (shared component)transactions: Array of transactions for current bookloading: Loading state during data fetchessearchQuery: Current search filter textshowModal: Modal visibility statecurrentTransaction: Transaction being editedisEditing: Edit vs create mode flagmodalFocusTarget: Focus target for modal ('description' or 'amount')
- BooksStore: Current book data, permissions, currency formatting
- TransactionsStore: CRUD operations, data fetching, state management
-
Initialization:
- Validates book ID from route query
- Loads book data and permissions
- Fetches all transactions for the book
-
Search Flow:
- Real-time filtering via computed property
- Debounced search input for performance
- Clear search functionality
-
Edit Flow:
- Permission check before modal display
- Shared modal component for consistency
- Post-operation data refresh
GET /api/books/{bookId}/transactions: Fetch transactions with paginationPOST /api/transactions: Create new transactionPUT /api/transactions/{id}: Update existing transactionDELETE /api/transactions/{id}: Delete transaction
limit: Number of transactions to fetch (default: 1000)sortKey: Sort field (default: 'date')sortDirection: Sort order (default: 'desc')
- User selects a book from books view
- Navigates to transactions feed via book menu
- Views transactions in card format
- Can search, filter, and edit transactions
- Changes persist across navigation
- Click to Edit: Single click on edit button opens transaction modal
- Search as You Type: Immediate filtering without submit button
- Clear Search: One-click search reset
- Modal Focus: Automatic focus management for form fields
- Initial Load: Spinner while book and transactions load
- Empty State: Helpful message when no transactions exist
- Search Results: Dynamic filtering with no additional loading
TransactionModal: Full-featured transaction CRUD modalBookLayout: Consistent book-scoped layoutformatCurrency,formatTransactionType,colorByType: Utility functions
- Permission-Aware UI: Consistent permission checking across features
- Modal Management: Standardized modal state management
- Error Handling: Consistent error logging and user feedback
- Data Refresh: Post-operation data synchronization
- Date Range Filter: Start/end date filtering for transactions
- Category Filtering: Filter by transaction categories
- Bulk Operations: Multi-select for bulk actions
- Export Functionality: Export filtered transactions
- Advanced Search: Search by amount, account, or multiple fields
- Infinite Scroll: Load more transactions as user scrolls
- Sorting Options: Multiple sort criteria
- Quick Actions: Inline quick edit for simple fields
- Transaction Templates: Save and reuse common transactions
- Permission Testing: Verify read-only behavior for viewers
- Search Functionality: Test various search queries and edge cases
- Modal Integration: Verify CRUD operations work correctly
- Responsive Behavior: Test across different screen sizes
- Error Handling: Test with network failures and invalid data
- Keyboard Navigation: Ensure all interactive elements are keyboard accessible
- Screen Reader Support: Proper ARIA labels and semantic HTML
- Color Contrast: Sufficient contrast for all text and backgrounds
- Focus Management: Logical tab order and focus indicators