refactor(admin-reports, i18n): remove rebate commission report and enhance localization

Removed the `getAdminReportRebateCommission` function and its references from the admin reports API and localization files. Updated CSS for improved money display handling in admin components. Enhanced localization support by adding new finance and support workspace entries in English, Nepali, and Chinese, improving user experience across the application.
This commit is contained in:
2026-06-16 16:04:03 +08:00
parent d4cf4ff436
commit a020e34a7d
38 changed files with 1259 additions and 353 deletions

View File

@@ -5,7 +5,29 @@ export function isAgentOperator(profile: AdminProfile | null | undefined): boole
return profile?.agent != null && profile.is_super_admin !== true;
}
/** 平台站点管理员(绑定 site_admin 角色、无代理节点)。 */
export function isSiteAdminOperator(profile: AdminProfile | null | undefined): boolean {
return profile?.site != null && profile.is_super_admin !== true;
/** 任意接入站点平台账号site_admin / site_finance / site_cs)。 */
export function isSiteOperator(profile: AdminProfile | null | undefined): boolean {
if (profile?.is_super_admin === true || profile?.agent != null) {
return false;
}
const kind = profile?.account_kind;
return kind === "site_admin" || kind === "site_finance" || kind === "site_cs" || profile?.site != null;
}
/** 站点主运营(满配 site_admin代理页站点方门控仅对此角色放宽。 */
export function isSiteAdminOperator(profile: AdminProfile | null | undefined): boolean {
return profile?.account_kind === "site_admin" || (
profile?.site != null
&& profile?.account_kind == null
&& profile?.is_super_admin !== true
&& profile?.agent == null
);
}
export function isSiteFinanceOperator(profile: AdminProfile | null | undefined): boolean {
return profile?.account_kind === "site_finance";
}
export function isSiteCsOperator(profile: AdminProfile | null | undefined): boolean {
return profile?.account_kind === "site_cs";
}