feat: 添加货币管理功能,更新国际化支持,移除报表相关代码
This commit is contained in:
@@ -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}`, {
|
||||
|
||||
Reference in New Issue
Block a user