- Add _build_reason() to backend — per-patient reason strings with specific day counts (e.g. "Supply lapsed 70 days ago. Prescriber contact required.") - Add reason field to RecordOut model and backend /api/export CSV - Fix export column headers: Coverage End Date → Resupply End Date, Days Until Coverage End → Days Until Resupply End - Pass reason through apiRecordToLocal in frontend api.js - Display reason as muted sub-line under status badge in WorklistTable - Add reason column to client-side CSVExport - Add signal-ui React source to repo (was untracked) - CLAUDE.md: add Billing and CMS integrations to Phase 2 deferred table - research: restore Section 14 stat verification (May 23 recovery) Deployed to Railway production — health check confirmed live. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
No EOL
752 B
JavaScript
24 lines
No EOL
752 B
JavaScript
import { useState, useEffect } from "react";
|
|
|
|
export default function Toast() {
|
|
const [message, setMessage] = useState("");
|
|
const [visible, setVisible] = useState(false);
|
|
|
|
useEffect(() => {
|
|
const handler = (e) => {
|
|
setMessage(e.detail.message);
|
|
setVisible(true);
|
|
setTimeout(() => setVisible(false), 3500);
|
|
};
|
|
window.addEventListener("signal-toast", handler);
|
|
return () => window.removeEventListener("signal-toast", handler);
|
|
}, []);
|
|
|
|
if (!visible) return null;
|
|
|
|
return (
|
|
<div className="fixed bottom-6 right-6 bg-[var(--bg-elevated)] border border-[var(--brand)] rounded-lg px-[18px] py-3 text-[13px] text-[var(--text-primary)] z-[100] shadow-[var(--shadow-card-md)]">
|
|
{message}
|
|
</div>
|
|
);
|
|
} |