wip
This commit is contained in:
1 parent
eae581bb08
commit
60e5ce45ce
2 files changed
+6
-8
No files matched your search
@@ -25,7 +25,6 @@ use Filament\Schemas\Schema;
|
|||||||
use Filament\Support\RawJs;
|
use Filament\Support\RawJs;
|
||||||
use Illuminate\Contracts\Support\Htmlable;
|
use Illuminate\Contracts\Support\Htmlable;
|
||||||
use Illuminate\Support\HtmlString;
|
use Illuminate\Support\HtmlString;
|
||||||
use Livewire\Component;
|
|
||||||
|
|
||||||
class Statistic extends BaseDashboard
|
class Statistic extends BaseDashboard
|
||||||
{
|
{
|
||||||
@@ -49,8 +48,8 @@ class Statistic extends BaseDashboard
|
|||||||
$filters = array_keys($this->filters);
|
$filters = array_keys($this->filters);
|
||||||
foreach($filters as $filter){
|
foreach($filters as $filter){
|
||||||
switch($filter){
|
switch($filter){
|
||||||
// exclude
|
|
||||||
case 'accuracy':
|
case 'accuracy':
|
||||||
|
$this->filters[$filter] = 0.125;
|
||||||
break;
|
break;
|
||||||
case 'similar_past_matches':
|
case 'similar_past_matches':
|
||||||
$this->filters[$filter] = 'none';
|
$this->filters[$filter] = 'none';
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ class LoadEvents
|
|||||||
|
|
||||||
$total_range = [$exp_total - $accuracy, $exp_total + $accuracy];
|
$total_range = [$exp_total - $accuracy, $exp_total + $accuracy];
|
||||||
|
|
||||||
|
// dd($exp_handicap,$exp_total, $handicap_range, $total_range);
|
||||||
|
|
||||||
$home_team = $match->home->ss_team_name;
|
$home_team = $match->home->ss_team_name;
|
||||||
$away_team = $match->away->ss_team_name;
|
$away_team = $match->away->ss_team_name;
|
||||||
} else {
|
} else {
|
||||||
@@ -73,8 +75,6 @@ class LoadEvents
|
|||||||
*/
|
*/
|
||||||
$res = LoadEventsQuery::load($filter, $handicap_range, $total_range, $match);
|
$res = LoadEventsQuery::load($filter, $handicap_range, $total_range, $match);
|
||||||
|
|
||||||
// dd($res);
|
|
||||||
|
|
||||||
$dataset_home = [];
|
$dataset_home = [];
|
||||||
$dataset_away = [];
|
$dataset_away = [];
|
||||||
$dataset_exp_home = [];
|
$dataset_exp_home = [];
|
||||||
@@ -96,7 +96,6 @@ class LoadEvents
|
|||||||
$expectations = LoadExpectations::load($res['all'], $match, $statistic_type);
|
$expectations = LoadExpectations::load($res['all'], $match, $statistic_type);
|
||||||
|
|
||||||
if ($team_id) {
|
if ($team_id) {
|
||||||
|
|
||||||
foreach ($res[$team_position] as $value) {
|
foreach ($res[$team_position] as $value) {
|
||||||
|
|
||||||
$labels[] = round($value['starttime']->diffInDays(Carbon::now()));
|
$labels[] = round($value['starttime']->diffInDays(Carbon::now()));
|
||||||
@@ -243,15 +242,15 @@ class LoadEvents
|
|||||||
if ($match->home_id == $value['home_id']) {
|
if ($match->home_id == $value['home_id']) {
|
||||||
$dataset_home[] = (int) $value['val_home'];
|
$dataset_home[] = (int) $value['val_home'];
|
||||||
$dataset_away[] = (int) $value['val_away'];
|
$dataset_away[] = (int) $value['val_away'];
|
||||||
} elseif ($match->home_id == $value['away_id']) {
|
} else {
|
||||||
$dataset_home[] = (int) $value['val_away'];
|
$dataset_home[] = (int) $value['val_away'];
|
||||||
$dataset_away[] = (int) $value['val_home'];
|
$dataset_away[] = (int) $value['val_home'];
|
||||||
}
|
}
|
||||||
// Home playing AWAY done and commited
|
// Home playing AWAY done and commited
|
||||||
elseif ($match->away_id == $value['home_id']) {
|
if ($match->away_id == $value['home_id']) {
|
||||||
$dataset_home2[] = (int) $value['val_home'];
|
$dataset_home2[] = (int) $value['val_home'];
|
||||||
$dataset_away2[] = (int) $value['val_away'];
|
$dataset_away2[] = (int) $value['val_away'];
|
||||||
} elseif ($match->away_id == $value['away_id']) {
|
} else {
|
||||||
$dataset_home2[] = (int) $value['val_away'];
|
$dataset_home2[] = (int) $value['val_away'];
|
||||||
$dataset_away2[] = (int) $value['val_home'];
|
$dataset_away2[] = (int) $value['val_home'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user