feat(ledger): add bookkeeping workbench and transaction views
- Add transactions_dirty table and zero-tolerance cleansing action - Implement bookkeeping workbench (/bookkeeping) with searchable Combobox channel selector and card suffix / account identifier - Implement transaction ledger (/transactions) with date groupings, multi-currency metrics, and filters - Update AGENTS.md guidelines for Base UI Select and Combobox bindings
This commit is contained in:
+18
-17
@@ -1,8 +1,8 @@
|
||||
"use client";
|
||||
"use client"
|
||||
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { type LucideIcon } from "lucide-react";
|
||||
import Link from "next/link"
|
||||
import { usePathname } from "next/navigation"
|
||||
import { type LucideIcon } from "lucide-react"
|
||||
|
||||
import {
|
||||
SidebarGroup,
|
||||
@@ -11,24 +11,24 @@ import {
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
useSidebar,
|
||||
} from "@/components/ui/sidebar";
|
||||
} from "@/components/ui/sidebar"
|
||||
|
||||
export interface NavMainItem {
|
||||
title: string;
|
||||
url: string;
|
||||
icon: LucideIcon;
|
||||
badge?: string;
|
||||
title: string
|
||||
url: string
|
||||
icon: LucideIcon
|
||||
badge?: string
|
||||
}
|
||||
|
||||
export function NavMain({ items }: { items: NavMainItem[] }) {
|
||||
const pathname = usePathname();
|
||||
const { isMobile, setOpenMobile } = useSidebar();
|
||||
const pathname = usePathname()
|
||||
const { isMobile, setOpenMobile } = useSidebar()
|
||||
|
||||
const handleNavigation = () => {
|
||||
if (isMobile) {
|
||||
setOpenMobile(false);
|
||||
setOpenMobile(false)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<SidebarGroup>
|
||||
@@ -37,14 +37,15 @@ export function NavMain({ items }: { items: NavMainItem[] }) {
|
||||
</SidebarGroupLabel>
|
||||
<SidebarMenu>
|
||||
{items.map((item) => {
|
||||
const Icon = item.icon;
|
||||
const Icon = item.icon
|
||||
return (
|
||||
<SidebarMenuItem key={item.title}>
|
||||
<SidebarMenuButton
|
||||
isActive={
|
||||
item.url === "/"
|
||||
? pathname === "/"
|
||||
: pathname === item.url || pathname.startsWith(`${item.url}/`)
|
||||
: pathname === item.url ||
|
||||
pathname.startsWith(`${item.url}/`)
|
||||
}
|
||||
tooltip={item.title}
|
||||
render={<Link href={item.url} onClick={handleNavigation} />}
|
||||
@@ -58,9 +59,9 @@ export function NavMain({ items }: { items: NavMainItem[] }) {
|
||||
)}
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
);
|
||||
)
|
||||
})}
|
||||
</SidebarMenu>
|
||||
</SidebarGroup>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user