Implement admin database stats dashboard

Add admin-only database statistics dashboard
- Introduces types for database statistics and recent additions
- Implements hooks to fetch statistics and recent additions via RPCs
- Adds UI components for stats cards and a recent additions table
- Integrates new AdminDatabaseStats page and routing under /admin/database-stats
- Updates admin sidebar and app routes to expose the new dashboard
- Enables real-time updates and export capabilities for recent additions
This commit is contained in:
gpt-engineer-app[bot]
2025-11-11 16:54:02 +00:00
parent 69db3c7743
commit f036776dce
11 changed files with 906 additions and 1 deletions

View File

@@ -6829,6 +6829,7 @@ export type Database = {
generate_ticket_number: { Args: never; Returns: string }
get_auth0_sub_from_jwt: { Args: never; Returns: string }
get_current_user_id: { Args: never; Returns: string }
get_database_statistics: { Args: never; Returns: Json }
get_email_change_status: { Args: never; Returns: Json }
get_filtered_profile: {
Args: { _profile_user_id: string; _viewer_id?: string }
@@ -6853,6 +6854,21 @@ export type Database = {
id: string
}[]
}
get_recent_additions: {
Args: { limit_count?: number }
Returns: {
created_at: string
created_by_avatar: string
created_by_id: string
created_by_username: string
entity_id: string
entity_name: string
entity_slug: string
entity_type: string
image_url: string
park_slug: string
}[]
}
get_recent_changes: {
Args: { limit_count?: number }
Returns: {