feat(api, agents, i18n): enhance settlement features and multi-language support

Added new types and API functions for settlement period summaries and credit ledgers, improving the management of agent settlements. Updated the admin console to reflect these changes, enhancing user experience with better navigation and data presentation. Additionally, expanded multi-language support by incorporating new translations in English, Nepali, and Chinese for settlement-related terms, ensuring consistency across the platform.
This commit is contained in:
2026-06-05 18:00:59 +08:00
parent 65eaeecf8c
commit af982bb9f7
73 changed files with 4307 additions and 2494 deletions

View File

@@ -1,10 +1,9 @@
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
import { AdminSubnav, AdminSubnavLink } from "@/components/admin/admin-subnav";
import { CONFIG_NAV_GROUPS } from "@/modules/config/config-nav-model";
export function ConfigSubNav() {
@@ -13,27 +12,15 @@ export function ConfigSubNav() {
const links = CONFIG_NAV_GROUPS.flatMap((group) => group.items);
return (
<nav
className="flex w-full flex-wrap gap-1 rounded-xl border border-border/60 bg-muted/40 p-1.5"
aria-label={t("nav.aria")}
>
<AdminSubnav aria-label={t("nav.aria")}>
{links.map(({ href, key }) => {
const active = pathname === href || pathname.startsWith(`${href}/`);
return (
<Link
key={href}
href={href}
className={cn(
"rounded-lg px-4 py-2.5 text-sm font-medium transition-colors",
active
? "bg-card text-primary shadow-sm"
: "text-muted-foreground hover:bg-card/60 hover:text-foreground",
)}
>
<AdminSubnavLink key={href} href={href} active={active}>
{t(`nav.items.${key}`)}
</Link>
</AdminSubnavLink>
);
})}
</nav>
</AdminSubnav>
);
}