diff --git a/src/routes/settings.fees.tsx b/src/routes/settings.fees.tsx index 9d922e3..7b20e80 100644 --- a/src/routes/settings.fees.tsx +++ b/src/routes/settings.fees.tsx @@ -32,7 +32,7 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; -import { Clock, Loader2, Pencil, Plus, Receipt, Trash2 } from "lucide-react"; +import { Clock, Loader2, Pencil, Plus, Receipt, Trash2, ClipboardPaste } from "lucide-react"; import { toast } from "sonner"; import { formatCurrency } from "@/lib/format"; @@ -52,9 +52,11 @@ interface FeeItem { } function FeeSchedulePage() { + const { user } = useAuth(); const [items, setItems] = useState([]); const [loading, setLoading] = useState(true); const [editing, setEditing] = useState | null>(null); + const [importing, setImporting] = useState<"time" | "expense" | null>(null); const load = async () => { setLoading(true); @@ -109,6 +111,7 @@ function FeeSchedulePage() { loading={loading} onEdit={setEditing} onDelete={remove} + onImport={() => setImporting("time")} /> setImporting("expense")} /> setEditing(null)} onSaved={load} /> + + setImporting(null)} + onSaved={load} + /> ); } @@ -138,6 +149,7 @@ function FeeSection({ loading, onEdit, onDelete, + onImport, }: { title: string; icon: React.ReactNode; @@ -146,13 +158,19 @@ function FeeSection({ loading: boolean; onEdit: (i: FeeItem) => void; onDelete: (id: string) => void; + onImport: () => void; }) { return (
-

- {icon} - {title} -

+
+

+ {icon} + {title} +

+ +
{loading ? (