feat(hq-web): client 360 recurring, amc and interaction sections

Browser-walk fixes (Task 12 step 3): reload the reminder queue after a failed send so the row flips to 'failed' live, and reload AMC contracts after recording a payment so the Paid badge derives fresh.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat/client-detail-redesign
Thomas Joise 2 weeks ago
parent a9f78c4e3c
commit 92fb5e6245

@ -144,7 +144,9 @@ export function ClientDetail() {
)} )}
<PaymentForm <PaymentForm
clientId={id} clientId={id}
onDone={() => { ledger.reload(); cms.reload() }} // amc.reload too: AMC paid state derives from settlement, so a payment
// must flip the Paid badge live (Task 12 walk §3.4).
onDone={() => { ledger.reload(); cms.reload(); amc.reload() }}
/> />
{ledger.data !== undefined && ledger.data.payments.length > 0 && ( {ledger.data !== undefined && ledger.data.payments.length > 0 && (
<DataTable <DataTable

@ -107,7 +107,11 @@ function QueueActions(props: { rem: Reminder & { docNo: string | null }; onDone:
const [busy, setBusy] = useState(false) const [busy, setBusy] = useState(false)
const run = (p: Promise<unknown>) => { const run = (p: Promise<unknown>) => {
setBusy(true); props.onError('') setBusy(true); props.onError('')
p.then(props.onDone).catch((e: Error) => props.onError(e.message)).finally(() => setBusy(false)) p.catch((e: Error) => props.onError(e.message))
// Reload even on failure: the server has already parked the reminder as
// 'failed' with its error, and the row must flip live (Task 12 walk §3.2).
.then(props.onDone)
.finally(() => setBusy(false))
} }
return ( return (
<div style={{ display: 'flex', gap: 6 }}> <div style={{ display: 'flex', gap: 6 }}>

Loading…
Cancel
Save