Integrate Data Completeness Dashboard

Adds comprehensive data completeness dashboard UI and hooks:
- Introduces data completeness types and hook (useDataCompleteness) to fetch and subscribe to updates
- Builds dashboard components (summary, filters, table) and integrates into Admin Settings
- Wireframes for real-time updates and filtering across parks, rides, companies, and ride models
- Integrates into AdminSettings with a new Data Quality tab and route
- Adds data types and scaffolding for analytics, including completeness analysis structure
This commit is contained in:
gpt-engineer-app[bot]
2025-11-11 16:38:26 +00:00
parent 901d25807d
commit 69db3c7743
8 changed files with 1047 additions and 2 deletions

View File

@@ -0,0 +1,58 @@
/**
* Data Completeness Types
*
* TypeScript interfaces for the comprehensive data completeness analysis system
*/
export type EntityType = 'park' | 'ride' | 'company' | 'ride_model';
export type MissingFieldCategory = 'critical' | 'important' | 'valuable' | 'supplementary';
export interface MissingFields {
critical: string[];
important: string[];
valuable: string[];
supplementary: string[];
}
export interface EntityCompleteness {
id: string;
name: string;
slug: string;
entity_type: EntityType;
updated_at: string;
completeness_score: number;
missing_fields: MissingFields;
}
export interface CompletenessSummary {
total_entities: number;
avg_completeness_score: number;
entities_below_50: number;
entities_100_complete: number;
by_entity_type: {
parks: number;
rides: number;
companies: number;
ride_models: number;
};
}
export interface CompletenessAnalysis {
summary: CompletenessSummary;
entities: {
parks: EntityCompleteness[];
rides: EntityCompleteness[];
companies: EntityCompleteness[];
ride_models: EntityCompleteness[];
};
generated_at: string;
}
export interface CompletenessFilters {
entityType?: EntityType;
minScore?: number;
maxScore?: number;
missingCategory?: MissingFieldCategory;
searchQuery?: string;
}