Skip to content

feat(loans): show EMI amount, drop status/interest columns from loans list - #35

Merged
parameshjava merged 1 commit into
mainfrom
feat/loans-list-emi-column
Aug 6, 2026
Merged

feat(loans): show EMI amount, drop status/interest columns from loans list#35
parameshjava merged 1 commit into
mainfrom
feat/loans-list-emi-column

Conversation

@parameshjava

Copy link
Copy Markdown
Owner

What changed

Loans list columns are now: Loan # · Member · Type · Principal · EMI · Start date · [End date] · Outstanding

  • Added an EMI column (right-aligned, sortable) showing the monthly installment. Accrual-model loans render rather than ₹0. Sourced from loans.emi_amount, already in the getLoans() select — no extra query.
  • Removed the EMI badge from the Type cell, the Status column (and its dropdown filter), Interest paid, and Interest due. Status was redundant now that the list is split into Active / Past tabs; interest figures live on the loan detail page.
  • Added a rose "Write off" pill next to the loan number for write_off loans, so the Past tab still distinguishes them from paid loans. Also searchable via the global filter.
  • CSV/PDF export columns follow the new set. Global-search placeholder no longer mentions "status".
  • Both list pages (/dashboard/loans, /admin/loans) drop the now-unused getPendingInterestByLoan(loanIds) fetch — one fewer round trip per load.

Kept: the "next EMI dd-mm-yyyy" hint under Start date and the red overdue marker beside the loan number.

Notes

Exported rows no longer carry a status field, so a past-loans export doesn't distinguish paid from written-off. Easy to add back if wanted.

Verification

  • npm run build
  • tsc --noEmit
  • npm run lint ✅ (only the pre-existing _prev warning in pending-interest-panel.tsx)
  • npm test ✅ 244 passed / 23 files

🤖 Generated with Claude Code

… list

The loans list is already split into Active and Past tabs, so the Status
column was redundant; interest paid/due belong on the loan detail page.

- Add an EMI column (right-aligned, sortable) with the monthly installment;
  accrual-model loans render a dash.
- Remove the EMI badge from Type, the Status column + its dropdown filter,
  Interest paid and Interest due. Export columns follow.
- Mark written-off loans with a "Write off" pill next to the loan number so
  the Past tab still distinguishes them from paid loans.
- Both list pages drop the now-unused getPendingInterestByLoan fetch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aits-fcf-tracker Ready Ready Preview Aug 6, 2026 2:38pm

@parameshjava
parameshjava merged commit a8ba35d into main Aug 6, 2026
3 checks passed
@parameshjava
parameshjava deleted the feat/loans-list-emi-column branch August 6, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant