feat(loans): show EMI amount, drop status/interest columns from loans list - #35
Merged
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Loans list columns are now: Loan # · Member · Type · Principal · EMI · Start date · [End date] · Outstanding
EMIcolumn (right-aligned, sortable) showing the monthly installment. Accrual-model loans render—rather than ₹0. Sourced fromloans.emi_amount, already in thegetLoans()select — no extra query.EMIbadge from the Type cell, theStatuscolumn (and its dropdown filter),Interest paid, andInterest due. Status was redundant now that the list is split into Active / Past tabs; interest figures live on the loan detail page.write_offloans, so the Past tab still distinguishes them from paid loans. Also searchable via the global filter./dashboard/loans,/admin/loans) drop the now-unusedgetPendingInterestByLoan(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_prevwarning inpending-interest-panel.tsx)npm test✅ 244 passed / 23 files🤖 Generated with Claude Code