feat: add Preauth Followup section to claims page

Adds From/To date pickers and CCA PA / United PA / Tufts PA / All recent PA
buttons above the Upload claim documents section; button logic is stubbed
for now.
This commit is contained in:
2026-07-16 23:00:46 -04:00
parent 95abbabb36
commit 5979d27c57

View File

@@ -7,6 +7,12 @@ import {
CardContent,
CardDescription,
} from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { Calendar as CalendarIcon } from "lucide-react";
import { Calendar } from "@/components/ui/calendar";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { formatLocalDate } from "@/utils/dateUtils";
import { ClaimForm } from "@/components/claims/claim-form";
import { useToast } from "@/hooks/use-toast";
import { useAuth } from "@/hooks/use-auth";
@@ -48,6 +54,12 @@ export default function ClaimsPage() {
const [previewOpen, setPreviewOpen] = useState(false);
const [previewPdfId, setPreviewPdfId] = useState<number | string | null>(null);
const [previewFallbackFilename, setPreviewFallbackFilename] = useState<string | null>(null);
// Preauth followup state
const [preauthFollowupFrom, setPreauthFollowupFrom] = useState<Date | undefined>(undefined);
const [preauthFollowupTo, setPreauthFollowupTo] = useState<Date | undefined>(undefined);
const [preauthFollowupFromOpen, setPreauthFollowupFromOpen] = useState(false);
const [preauthFollowupToOpen, setPreauthFollowupToOpen] = useState(false);
const dispatch = useAppDispatch();
const { status, message, show } = useAppSelector(
(state) => state.seleniumTasks.claimSubmit
@@ -1138,6 +1150,115 @@ export default function ClaimsPage() {
</CardContent>
</Card>
{/* Preauth Followup Section */}
<Card>
<CardHeader>
<CardTitle>Preauth Followup</CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex flex-wrap gap-4 items-center">
<div className="flex items-center gap-2">
<Label className="flex items-center">From</Label>
<Popover
open={preauthFollowupFromOpen}
onOpenChange={setPreauthFollowupFromOpen}
>
<PopoverTrigger asChild>
<Button
variant="outline"
className="w-[140px] justify-start text-left font-normal"
>
<CalendarIcon className="mr-2 h-4 w-4" />
{preauthFollowupFrom
? formatLocalDate(preauthFollowupFrom)
: "Pick Date"}
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto">
<Calendar
mode="single"
selected={preauthFollowupFrom}
onSelect={(date) => {
setPreauthFollowupFrom(date);
setPreauthFollowupFromOpen(false);
}}
onClose={() => setPreauthFollowupFromOpen(false)}
/>
</PopoverContent>
</Popover>
</div>
<div className="flex items-center gap-2">
<Label className="flex items-center">To</Label>
<Popover
open={preauthFollowupToOpen}
onOpenChange={setPreauthFollowupToOpen}
>
<PopoverTrigger asChild>
<Button
variant="outline"
className="w-[140px] justify-start text-left font-normal"
>
<CalendarIcon className="mr-2 h-4 w-4" />
{preauthFollowupTo
? formatLocalDate(preauthFollowupTo)
: "Pick Date"}
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto">
<Calendar
mode="single"
selected={preauthFollowupTo}
onSelect={(date) => {
setPreauthFollowupTo(date);
setPreauthFollowupToOpen(false);
}}
onClose={() => setPreauthFollowupToOpen(false)}
/>
</PopoverContent>
</Popover>
</div>
</div>
<div className="flex flex-wrap gap-2 items-center">
<Button
type="button"
variant="outline"
onClick={() => {
// TODO: define CCA PA followup logic
}}
>
CCA PA
</Button>
<Button
type="button"
variant="outline"
onClick={() => {
// TODO: define United PA followup logic
}}
>
United PA
</Button>
<Button
type="button"
variant="outline"
onClick={() => {
// TODO: define Tufts PA followup logic
}}
>
Tufts PA
</Button>
<Button
type="button"
variant="outline"
onClick={() => {
// TODO: define All recent PA followup logic
}}
>
All recent PA
</Button>
</div>
</CardContent>
</Card>
{/* File Upload Zone */}
<ClaimDocumentsUploadMultiple />