Files
lotteryAdmin/src/lib/platform-system-roles.ts
kang a020e34a7d 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.
2026-06-16 16:04:03 +08:00

22 lines
777 B
TypeScript

import type { AdminRoleRow } from "@/types/api/index";
export const PLATFORM_SUPER_ADMIN_SLUG = "super_admin";
export const PLATFORM_SITE_ADMIN_SLUG = "site_admin";
export const PLATFORM_SITE_FINANCE_SLUG = "site_finance";
export const PLATFORM_SITE_CS_SLUG = "site_cs";
export const PLATFORM_AGENT_SLUG = "agent";
export function isPlatformFixedRole(role: Pick<AdminRoleRow, "slug">): boolean {
return (
role.slug === PLATFORM_SUPER_ADMIN_SLUG
|| role.slug === PLATFORM_SITE_ADMIN_SLUG
|| role.slug === PLATFORM_SITE_FINANCE_SLUG
|| role.slug === PLATFORM_SITE_CS_SLUG
|| role.slug === PLATFORM_AGENT_SLUG
);
}
export function isPlatformSuperAdminRole(role: Pick<AdminRoleRow, "slug">): boolean {
return role.slug === PLATFORM_SUPER_ADMIN_SLUG;
}