feat: 添加货币管理功能,更新国际化支持,移除报表相关代码

This commit is contained in:
2026-05-21 16:24:56 +08:00
parent 6ecbaf5fb4
commit 055c613a6d
87 changed files with 1615 additions and 1319 deletions

View File

@@ -26,6 +26,7 @@ const NAV_TRANSLATION_KEYS: Record<string, string> = {
admin_users: "admin_users",
admin_roles: "admin_roles",
players: "players",
currencies: "currencies",
wallet: "wallet",
draws: "draws",
config: "config",
@@ -33,11 +34,14 @@ const NAV_TRANSLATION_KEYS: Record<string, string> = {
settlement: "settlement",
reconcile: "reconcile",
tickets: "tickets",
reports: "reports",
audit: "audit",
settings: "settings",
};
const SETTINGS_ROUTE_LABELS: Record<string, string> = {
currencies: "currencies.title",
};
function titleCase(value: string): string {
return value
.split("-")
@@ -52,7 +56,7 @@ type BreadcrumbCrumb = {
};
export function AdminBreadcrumb() {
const { t } = useTranslation(["common", "dashboard", "reports", "audit", "config", "draws"]);
const { t } = useTranslation(["common", "dashboard", "audit", "config", "draws"]);
const pathname = usePathname();
const profile = useAdminProfile();
const navItems = profile?.navigation ?? [];
@@ -105,6 +109,11 @@ export function AdminBreadcrumb() {
let subLabel = "";
if (businessSegment === "config" && subSegment) {
subLabel = t(`nav.items.${subSegment}`, { ns: "config", defaultValue: titleCase(subSegment) });
} else if (businessSegment === "settings" && subSegment) {
subLabel = t(SETTINGS_ROUTE_LABELS[subSegment] ?? `settings.${subSegment}`, {
ns: "config",
defaultValue: titleCase(subSegment),
});
} else {
subLabel = subSegment
? t(`subnav.${subSegment}`, {