fix: add deleted user status filter (#5464)
This commit is contained in:
+4
-2
@@ -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) },
|
||||
]
|
||||
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user