Enabled inline paid amount edit
X-Lovable-Edit-ID: edt-5fbbb3f0-b093-46f5-9eb3-6406190ebd5f Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
@@ -394,7 +394,25 @@ export function CasePaymentPlansTab({ caseRecord }: { caseRecord: any }) {
|
||||
</TableCell>
|
||||
<TableCell className="text-xs">
|
||||
{i.paid ? (
|
||||
<span>{i.paid_on ? formatDate(i.paid_on) : ""}{i.paid_method ? ` • ${i.paid_method}` : ""}{i.paid_reference ? ` (${i.paid_reference})` : ""}</span>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<Input
|
||||
type="number"
|
||||
step="0.01"
|
||||
value={i.paid_amount ?? i.amount}
|
||||
onChange={(e) =>
|
||||
updateInstallment(i.id, {
|
||||
paid_amount: e.target.value === "" ? null : parseFloat(e.target.value) || 0,
|
||||
})
|
||||
}
|
||||
className="h-7 w-[90px] text-xs"
|
||||
title="Amount paid"
|
||||
/>
|
||||
<span className="text-muted-foreground">
|
||||
{i.paid_on ? formatDate(i.paid_on) : ""}
|
||||
{i.paid_method ? ` • ${i.paid_method}` : ""}
|
||||
{i.paid_reference ? ` (${i.paid_reference})` : ""}
|
||||
</span>
|
||||
</div>
|
||||
) : "—"}
|
||||
</TableCell>
|
||||
<TableCell className="text-right">
|
||||
|
||||
Reference in New Issue
Block a user