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:
ryan
2026-03-11 15:40:41 +08:00
parent 13cc880f67
commit 4f8970ff5c
30 changed files with 2577 additions and 99 deletions
+2 -1
View File
@@ -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;
}