Introduced the agent_node_id field in AdminDrawListQuery, AdminPlayerListQuery, AdminSettlementBatchListQuery, TicketItemsListQuery, and TransferOrderListQuery to improve filtering capabilities. Updated the admin-breadcrumb and admin-sidebar components to include new translations for agent-related terms in English, Nepali, and Chinese, enhancing the overall user experience and multi-language support across the admin interface.
40 lines
999 B
TypeScript
40 lines
999 B
TypeScript
import type { TFunction } from "i18next";
|
||
|
||
/** 与 {@link AdminBreadcrumb} / 侧栏共用:仅用 i18n,避免 API 旧 label 作 defaultValue 导致水合不一致 */
|
||
const NAV_SEGMENT_I18N_KEYS: Record<string, string> = {
|
||
dashboard: "dashboard",
|
||
admin_users: "admin_users",
|
||
admin_roles: "admin_roles",
|
||
players: "players",
|
||
currencies: "currencies",
|
||
wallet: "wallet",
|
||
draws: "draws",
|
||
rules_plays: "rules_plays",
|
||
rules_odds: "rules_odds",
|
||
jackpot: "jackpot",
|
||
risk_cap: "risk_cap",
|
||
risk: "risk",
|
||
settlement: "settlement",
|
||
reconcile: "reconcile",
|
||
reports: "reports",
|
||
tickets: "tickets",
|
||
audit: "audit",
|
||
settings: "settings",
|
||
integration: "integration",
|
||
agents: "agents",
|
||
config: "config",
|
||
};
|
||
|
||
export function adminNavLabel(
|
||
segment: string,
|
||
t: TFunction,
|
||
apiLabel?: string | null,
|
||
): string {
|
||
const key = NAV_SEGMENT_I18N_KEYS[segment];
|
||
if (key) {
|
||
return t(`nav.${key}`, { ns: "common" });
|
||
}
|
||
|
||
return apiLabel?.trim() ? apiLabel : segment;
|
||
}
|