mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 15:06:37 +08:00
feat: add user management features including user creation, editing, and role management
- Implemented user API functions for fetching, creating, updating, and managing users. - Created a UsersPage component for displaying and managing users with search and pagination. - Added types for user data and mutation payloads. - Introduced a LegacyRouteRedirect component for handling legacy routes. - Defined settings-related types for better type safety in settings management.
This commit is contained in:
@@ -17,7 +17,8 @@ function toDate(value: string | Date | null | undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const date = value instanceof Date ? value : new Date(value);
|
||||
const normalizedValue = typeof value === 'string' ? value.replace(' ', 'T') : value;
|
||||
const date = normalizedValue instanceof Date ? normalizedValue : new Date(normalizedValue);
|
||||
return Number.isNaN(date.getTime()) ? null : date;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user