mirror of
https://github.com/coaidev/coai.git
synced 2025-05-23 15:00:14 +09:00
feat: readable subscription levels (#86)
This commit is contained in:
parent
15b7e204e1
commit
e12fd20f9e
@ -65,6 +65,20 @@ type OperationMenuProps = {
|
|||||||
onRefresh?: () => void;
|
onRefresh?: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export enum UserType {
|
||||||
|
normal = "normal",
|
||||||
|
basic_plan = "basic_plan",
|
||||||
|
standard_plan = "standard_plan",
|
||||||
|
pro_plan = "pro_plan",
|
||||||
|
}
|
||||||
|
|
||||||
|
export const userTypeArray = [
|
||||||
|
UserType.normal,
|
||||||
|
UserType.basic_plan,
|
||||||
|
UserType.standard_plan,
|
||||||
|
UserType.pro_plan,
|
||||||
|
];
|
||||||
|
|
||||||
function doToast(t: any, toast: any, resp: CommonResponse) {
|
function doToast(t: any, toast: any, resp: CommonResponse) {
|
||||||
if (!resp.status)
|
if (!resp.status)
|
||||||
toast({
|
toast({
|
||||||
@ -405,7 +419,7 @@ function UserTable() {
|
|||||||
<TableCell>{user.quota}</TableCell>
|
<TableCell>{user.quota}</TableCell>
|
||||||
<TableCell>{user.used_quota}</TableCell>
|
<TableCell>{user.used_quota}</TableCell>
|
||||||
<TableCell>{t(user.is_subscribed.toString())}</TableCell>
|
<TableCell>{t(user.is_subscribed.toString())}</TableCell>
|
||||||
<TableCell>{user.level}</TableCell>
|
<TableCell className={`whitespace-nowrap`}>{t(`admin.identity.${userTypeArray[user.level]}`)}</TableCell>
|
||||||
<TableCell>{user.total_month}</TableCell>
|
<TableCell>{user.total_month}</TableCell>
|
||||||
{useDeeptrain && (
|
{useDeeptrain && (
|
||||||
<TableCell>{t(user.enterprise.toString())}</TableCell>
|
<TableCell>{t(user.enterprise.toString())}</TableCell>
|
||||||
|
Loading…
Reference in New Issue
Block a user