Accounting: surface Recurring from Journal Entries & Bills pages

Add a 'Recurring' button to the Journal Entries and Bills page headers
that links to the Recurring (Bills & Journals) page, and rename the
sidebar item so it's clear it covers journals too. Improves discovery —
users looking for recurring journals on the Journal Entries page now have
a direct link.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 00:43:25 -04:00
parent 10cd24e738
commit 0eaf3efb4f
3 changed files with 16 additions and 6 deletions
+5 -1
View File
@@ -10,7 +10,8 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, DialogFooter } from "@/components/ui/dialog"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, DialogFooter } from "@/components/ui/dialog";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@/components/ui/table"; import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@/components/ui/table";
import { Plus, Trash2, Search, Receipt, Upload, Sparkles, FileText, X, AlertCircle, Printer, Loader2, Pencil } from "lucide-react"; import { Plus, Trash2, Search, Receipt, Upload, Sparkles, FileText, X, AlertCircle, Printer, Loader2, Pencil, Repeat } from "lucide-react";
import { Link } from "react-router-dom";
import { toast } from "sonner"; import { toast } from "sonner";
import { money, fmtDate } from "./lib/format"; import { money, fmtDate } from "./lib/format";
import { StatusBadge } from "./components/StatusBadge"; import { StatusBadge } from "./components/StatusBadge";
@@ -600,6 +601,8 @@ export default function AccountingBillsPage() {
)} )}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<h1 className="text-2xl font-semibold">Bills</h1> <h1 className="text-2xl font-semibold">Bills</h1>
<div className="flex items-center gap-2">
<Button asChild variant="outline"><Link to="/dashboard/accounting/recurring"><Repeat className="mr-1 h-4 w-4" /> Recurring</Link></Button>
<Dialog open={open} onOpenChange={(o) => { setOpen(o); if (!o) resetForm(); }}> <Dialog open={open} onOpenChange={(o) => { setOpen(o); if (!o) resetForm(); }}>
<DialogTrigger asChild><Button><Plus className="mr-1 h-4 w-4" /> New Bill</Button></DialogTrigger> <DialogTrigger asChild><Button><Plus className="mr-1 h-4 w-4" /> New Bill</Button></DialogTrigger>
<DialogContent className="max-w-5xl max-h-[92vh] overflow-hidden p-0 gap-0 flex flex-col"> <DialogContent className="max-w-5xl max-h-[92vh] overflow-hidden p-0 gap-0 flex flex-col">
@@ -765,6 +768,7 @@ export default function AccountingBillsPage() {
</DialogFooter> </DialogFooter>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
</div>
</div> </div>
{/* Aging summary */} {/* Aging summary */}
@@ -12,7 +12,8 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@/components/ui/table"; import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@/components/ui/table";
import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/components/ui/sheet"; import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/components/ui/sheet";
import { Plus, Trash2, ChevronRight, AlertCircle, Loader2, Pencil } from "lucide-react"; import { Plus, Trash2, ChevronRight, AlertCircle, Loader2, Pencil, Repeat } from "lucide-react";
import { Link } from "react-router-dom";
import { toast } from "sonner"; import { toast } from "sonner";
import { money, fmtDate } from "./lib/format"; import { money, fmtDate } from "./lib/format";
@@ -208,9 +209,14 @@ export default function AccountingJournalEntriesPage() {
<h1 className="text-2xl font-semibold">Journal Entries</h1> <h1 className="text-2xl font-semibold">Journal Entries</h1>
<p className="text-sm text-muted-foreground mt-0.5">Manual double-entry journal entries</p> <p className="text-sm text-muted-foreground mt-0.5">Manual double-entry journal entries</p>
</div> </div>
<Button onClick={() => { resetForm(); setOpen(true); }}> <div className="flex gap-2">
<Plus className="h-4 w-4 mr-1" /> New entry <Button asChild variant="outline">
</Button> <Link to="/dashboard/accounting/recurring"><Repeat className="h-4 w-4 mr-1" /> Recurring</Link>
</Button>
<Button onClick={() => { resetForm(); setOpen(true); }}>
<Plus className="h-4 w-4 mr-1" /> New entry
</Button>
</div>
</div> </div>
<Card> <Card>
+1 -1
View File
@@ -45,7 +45,7 @@ const NAV: NavSection[] = [
{ to: "chart-of-accounts", label: "Chart of Accounts" }, { to: "chart-of-accounts", label: "Chart of Accounts" },
{ to: "budgets", label: "Budgeting" }, { to: "budgets", label: "Budgeting" },
{ to: "journal-entries", label: "Journal Entries" }, { to: "journal-entries", label: "Journal Entries" },
{ to: "recurring", label: "Recurring" }, { to: "recurring", label: "Recurring (Bills & Journals)" },
{ to: "general-ledger", label: "General Ledger" }, { to: "general-ledger", label: "General Ledger" },
{ to: "banking", label: "Banking" }, { to: "banking", label: "Banking" },
{ to: "reconciliation", label: "Reconciliation" }, { to: "reconciliation", label: "Reconciliation" },