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 ( return (
<select <select
value={payment.status ?? ""} value={payment.status ?? ""}
onChange={(e) => onChange={(e) => {
updatePaymentStatusMutation.mutate({ const val = e.target.value as PaymentStatus;
paymentId: payment.id, if (val === "PAID") {
status: e.target.value as PaymentStatus, 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}`} 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> <option value="PENDING">Pending</option>