Private
Public Access
1
0

Auto-populate loan details from Plaid liabilities and pre-fill setup form

Fetch loan data (mortgage/student) from Plaid's Liabilities API during sync
and auto-create LoanDetail records. For accounts without liabilities data,
pre-populate the setup form with balance, interest rate, and smart term
defaults. Also fixes maturity date computation in the frontend form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-14 16:23:49 -05:00
parent a689681872
commit 3bb9c688ed
10 changed files with 237 additions and 4 deletions
+4 -1
View File
@@ -1,10 +1,13 @@
import api from './api'
import type { LoanDetail, PayoffScenario } from '@/types'
import type { LoanDefaults, LoanDetail, PayoffScenario } from '@/types'
export const loansApi = {
getLoanDetail: (accountId: string) =>
api.get<LoanDetail>(`/loans/${accountId}/amortization`),
getLoanDefaults: (accountId: string) =>
api.get<LoanDefaults>(`/loans/${accountId}/defaults`),
createLoanDetail: (accountId: string, data: any) =>
api.post<LoanDetail>(`/loans/${accountId}`, data),