I'll add a pending status feature — allowing transactions to be marked as pending vs completed, with a dedicated pending tracker widget and visual indicators throughout the app.
Let me check the current transaction interface and plan:
Now let me implement the pending feature. Starting with the Transaction interface:
Now update the context to support status filtering:
Now update Filters to add status filter:
Now update the modal to add a status option:
Now update TransactionTable to show status and allow toggling:
Now add a Pending KPI to the KPICards:
Now create a PendingTracker widget:
Now wire PendingTracker into the App layout:
Now update RecentActivity to show pending indicators:
Let me also update the DownloadButton to include status:
The build succeeds. Here's a summary of the Pending feature:
✅ Pending Option Added
🔧 Transaction Model Update
- Every transaction now has a
status field: 'pending' | 'completed'
- Default is
'completed' for backward compatibility
- New transactions can be created as pending via the Add modal
➕ Add Transaction Modal — Status Toggle
Added a new "Status" section with two toggle buttons:
- ✓ Completed (green) — default, transaction is settled
- ⏳ Pending (amber) — transaction awaits action (bill not yet paid, money not yet received, etc.)
🔍 Filter Bar — Status Filter
Added a new "Status" filter group with three options:
- All (default) — shows everything
- ⏳ Pending — only pending items
- ✓ Done — only completed items
The status filter works alongside the existing type/category/date filters.
📊 New KPI Card — Pending
Added a new "⏳ Pending" KPI card in the dashboard showing:
- Count of pending transactions
- Subtotal of pending amount in KWD (shown in amber below the count)
📋 Transaction Table — Status Column & Row Highlighting
- New "Status" column showing a clickable badge:
⏳ Pending (amber) for pending items
✓ Done (green) for completed items
- Click the badge to toggle status instantly (one click to mark done, click again to mark pending)
- Pending rows get a subtle amber tint background for visual distinction
🆕 New Widget — PendingTracker
A dedicated widget showing all pending items in a list view with:
- Total pending amount badge
- Item count indicator
- For each pending item:
- Category icon with color
- Description + type badge
- Category, person (if any), date/time
- Amount in KWD
- "✓ Mark Done" button to quickly complete the item
- Empty state with "✨ No pending items" message
📱 Recent Activity — Pending Indicator
- Pending items get an amber background tint in the list
- A small ⏳ badge appears on the category icon in the corner
📥 Export
Both CSV and JSON exports now include the status field, so you can track pending items in external tools.
💡 Use Cases for Pending Status
- Pending bills — electricity, rent, subscriptions scheduled but not yet paid
- Awaiting payments — client invoice not yet received, refund in transit
- Transfers in progress — send money initiated but not confirmed
- Promised money — friend said they'll pay you back but hasn't yet
- Upcoming expenses — planned purchases you want to track
The filter bar lets you instantly switch between "Show me only what's pending" vs "Show me only settled items" — making it easy to see your outstanding obligations or clean up completed tasks.
Files built: src/data/sampleData.ts, src/context/DashboardContext.tsx, src/components/Filters.tsx, src/components/AddExpenseModal.tsx, src/components/TransactionTable.tsx, src/components/KPICards.tsx, src/components/PendingTracker.tsx, src/App.tsx, src/components/RecentActivity.tsx, src/components/DownloadButton.tsx