fix: add deleted user status filter (#5464)

This commit is contained in:
Seefs
2026-06-13 00:03:28 +08:00
committed by GitHub
parent 1292b8b2d5
commit 1507229238
5 changed files with 18 additions and 6 deletions
+4 -2
View File
@@ -34,6 +34,7 @@ export const isUserDeleted = (user: UserType): boolean => {
export const USER_STATUS = {
ENABLED: 1,
DISABLED: 2,
DELETED: -1,
} as const
export const USER_STATUSES = {
@@ -47,16 +48,17 @@ export const USER_STATUSES = {
variant: 'neutral' as const,
value: USER_STATUS.DISABLED,
},
DELETED: {
[USER_STATUS.DELETED]: {
labelKey: 'Deleted',
variant: 'danger' as const,
value: -1,
value: USER_STATUS.DELETED,
},
} as const
export const getUserStatusOptions = (t: (key: string) => string) => [
{ label: t('Enabled'), value: String(USER_STATUS.ENABLED) },
{ label: t('Disabled'), value: String(USER_STATUS.DISABLED) },
{ label: t('Deleted'), value: String(USER_STATUS.DELETED) },
]
// ============================================================================