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