diff --git a/app/Filament/Widgets/Boxes/ExpectationsTeam.php b/app/Filament/Widgets/Boxes/ExpectationsTeam.php index e5256962..89492a1e 100644 --- a/app/Filament/Widgets/Boxes/ExpectationsTeam.php +++ b/app/Filament/Widgets/Boxes/ExpectationsTeam.php @@ -39,7 +39,7 @@ class ExpectationsTeam return []; } - $tmp = self::template(); + $tmp = []; foreach ($res as $value) { // dd($match->home_id, $match->away_id, $value); ExpectationCollecting::sort($similar_past_matches, $tmp, 'gls', $value->home_id, $value->away_id, $value->gls_h, $value->gls_a, $match); @@ -52,12 +52,12 @@ class ExpectationsTeam } if ($expectations) { - if (self::$collectionMethod == 'A') { + if (self::$collectionMethod == 'A' or $similar_past_matches != 'none') { $expectations = ExpectationMethodA::calc($tmp); } else { $expectations = ExpectationMethodB::calc($tmp); + ExpectationsMinMax::calc($expectations, $match); } - ExpectationsMinMax::calc($expectations, $match); } $expectations['gls']['name'] = 'Goals'; diff --git a/app/Filament/Widgets/Boxes/Helper/ExpectationMethodA.php b/app/Filament/Widgets/Boxes/Helper/ExpectationMethodA.php index ea11e294..7f8bc8f1 100644 --- a/app/Filament/Widgets/Boxes/Helper/ExpectationMethodA.php +++ b/app/Filament/Widgets/Boxes/Helper/ExpectationMethodA.php @@ -21,7 +21,7 @@ class ExpectationMethodA } $summen2 = []; - $bets = ['gls', 'fls', 'ofs', 'crd', 'snt', 'tsh']; + $bets = ['gls', 'fls', 'ofs', 'crd', 'crn', 'snt', 'tsh']; foreach ($bets as $name) { $summen2[$name]['home']['sum'] = 0; $summen2[$name]['home']['cnt'] = 0;