fix: wire status dropdown "Paid in Full" to full payment calculation

Selecting "Paid in Full" from the inline status dropdown now calls
pay-absolute-full-claim (same as the Pay in Full button) instead of
only patching the status label.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-05-06 19:24:49 -04:00
parent cf59de898b
commit 108e2406e2

View File

@@ -720,12 +720,17 @@ export default function PaymentsRecentTable({
return (
<select
value={payment.status ?? ""}
onChange={(e) =>
updatePaymentStatusMutation.mutate({
paymentId: payment.id,
status: e.target.value as PaymentStatus,
})
}
onChange={(e) => {
const val = e.target.value as PaymentStatus;
if (val === "PAID") {
handlePayAbsoluteFullDue(payment.id);
} else {
updatePaymentStatusMutation.mutate({
paymentId: payment.id,
status: val,
});
}
}}
className={`px-2 py-1 text-xs font-medium rounded-full border-0 cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-teal-400 ${color}`}
>
<option value="PENDING">Pending</option>