wio
This commit is contained in:
1 parent
71f90b0043
commit
40f29b8d6b
1 file changed
+6
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Actions\Statistics\LoadEvents;
|
||||
use App\Actions\Statistics\LoadEventsAspGoal;
|
||||
use Filament\Widgets\Concerns\InteractsWithPageFilters;
|
||||
use Filament\Widgets\StatsOverviewWidget;
|
||||
@@ -13,7 +14,11 @@ class MedianAverageWidget extends StatsOverviewWidget
|
||||
|
||||
protected function getStats(): array
|
||||
{
|
||||
$data = LoadEventsAspGoal::load($this->filters);
|
||||
if ($this->filters['similar_past_matches'] = 'none') {
|
||||
$data = LoadEvents::load($this->filters);
|
||||
} else {
|
||||
$data = LoadEventsAspGoal::load($this->filters);
|
||||
}
|
||||
|
||||
if (! isset($data['datasets'][0])) {
|
||||
return [];
|
||||
|
||||
Reference in new issue
Block a user