Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
772643f175
commit
4e3b6b8bc9
@@ -13,11 +13,12 @@ import {
|
||||
import { FL_CIRCUITS } from "@/lib/florida";
|
||||
import { Packer } from "docx";
|
||||
import { buildPleadingDoc, downloadPleading, type PleadingFootnote } from "@/lib/docx-pleading";
|
||||
import { downloadPleadingPdf } from "@/lib/pdf-pleading";
|
||||
import { RichTextEditor } from "@/components/documents/rich-text-editor";
|
||||
import { supabase } from "@/integrations/supabase/client";
|
||||
import { useAuth } from "@/lib/auth";
|
||||
import { toast } from "sonner";
|
||||
import { Download, Save, Loader2, Plus, Trash2 } from "lucide-react";
|
||||
import { Download, FileText, Save, Loader2, Plus, Trash2 } from "lucide-react";
|
||||
|
||||
export const Route = createFileRoute("/documents/pleading/new")({
|
||||
component: PleadingNewPage,
|
||||
@@ -66,6 +67,10 @@ function PleadingNewPage() {
|
||||
await downloadPleading(input, docName || "Pleading");
|
||||
};
|
||||
|
||||
const onDownloadPdf = async () => {
|
||||
await downloadPleadingPdf(input, docName || "Pleading");
|
||||
};
|
||||
|
||||
const onSave = async () => {
|
||||
setSaving(true);
|
||||
try {
|
||||
@@ -113,6 +118,7 @@ function PleadingNewPage() {
|
||||
description="Florida court caption · Bookman Old Style, 12pt"
|
||||
actions={
|
||||
<>
|
||||
<Button variant="outline" onClick={onDownloadPdf}><FileText className="h-4 w-4 mr-2" /> Download PDF</Button>
|
||||
<Button variant="outline" onClick={onDownload}><Download className="h-4 w-4 mr-2" /> Download .docx</Button>
|
||||
<Button onClick={onSave} disabled={saving}>
|
||||
{saving ? <Loader2 className="h-4 w-4 mr-2 animate-spin" /> : <Save className="h-4 w-4 mr-2" />}
|
||||
|
||||
Reference in New Issue
Block a user