refactor: add Enum labels, fix indentation, and add URL links to StatsOverviewWidget
Adds `label()` methods to TrendDirection and PredictionSource enums for cleaner display. Fixes mixed tab/space indentation in StatsOverviewWidget. Links all stats cards to their respective Filament resources (searches, stations, oil-predictions, api-logs). Documents BrentPriceChartWidget's manual registration.
This commit is contained in:
@@ -7,4 +7,13 @@ enum PredictionSource: string
|
||||
case Llm = 'llm';
|
||||
case LlmWithContext = 'llm_with_context';
|
||||
case Ewma = 'ewma';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Llm => 'LLM',
|
||||
self::LlmWithContext => 'LLM+Context',
|
||||
self::Ewma => 'EWMA',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,9 @@ enum TrendDirection: string
|
||||
case Rising = 'rising';
|
||||
case Falling = 'falling';
|
||||
case Flat = 'flat';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return ucfirst($this->value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user