changes Ubaldo before Logomatic
This commit is contained in:
1 parent
498660e9cc
commit
f9e8b17d58
11 files changed
+607
-843
No files matched your search
@@ -252,8 +252,8 @@ class LoadEventsAverages
|
||||
'events' => $events,
|
||||
'data' => $data_team,
|
||||
'tension' => 0.5,
|
||||
'borderColor' => '#ad46ff',
|
||||
'backgroundColor' => '#ad46ff',
|
||||
'borderColor' => '#00c950',
|
||||
// 'backgroundColor' => '#ad46ff',
|
||||
'borderDash' => [5, 5],
|
||||
'pointStyle' => false,
|
||||
'hidden' => false,
|
||||
@@ -265,8 +265,8 @@ class LoadEventsAverages
|
||||
'events' => $events,
|
||||
'data' => $data_league,
|
||||
'tension' => 0.5,
|
||||
'borderColor' => '#00bba7',
|
||||
'backgroundColor' => '#00bba7',
|
||||
'borderColor' => '#2b7fff',
|
||||
// 'backgroundColor' => '#00bba7',
|
||||
'borderDash' => [5, 5],
|
||||
'pointStyle' => false,
|
||||
'hidden' => false,
|
||||
|
||||
@@ -48,17 +48,23 @@ class LoadEventsQueryAll
|
||||
$matches_played = [];
|
||||
|
||||
if ($ss_player_id) {
|
||||
// $matches_season = StatistikoEvent::whereIn('season', $season)
|
||||
// ->where(function ($query) use ($team_id, $team_position) {
|
||||
// switch ($team_position) {
|
||||
// case 'home':
|
||||
// return $query->where('home_id', '=', $team_id);
|
||||
// case 'away':
|
||||
// return $query->where('away_id', '=', $team_id);
|
||||
// default:
|
||||
// return $query->where('home_id', '=', $team_id)
|
||||
// ->orWhere('away_id', '=', $team_id);
|
||||
// }
|
||||
// })->pluck('match_id')->toArray();
|
||||
|
||||
$matches_season = StatistikoEvent::whereIn('season', $season)
|
||||
->where(function ($query) use ($team_id, $team_position) {
|
||||
switch ($team_position) {
|
||||
case 'home':
|
||||
return $query->where('home_id', '=', $team_id);
|
||||
case 'away':
|
||||
return $query->where('away_id', '=', $team_id);
|
||||
default:
|
||||
return $query->where('home_id', '=', $team_id)
|
||||
->orWhere('away_id', '=', $team_id);
|
||||
}
|
||||
->where(function ($query) use ($team_id) {
|
||||
return $query->where('home_id', '=', $team_id)
|
||||
->orWhere('away_id', '=', $team_id);
|
||||
})->pluck('match_id')->toArray();
|
||||
|
||||
$matches_played = StatistikoPlayer::query()
|
||||
@@ -101,19 +107,23 @@ class LoadEventsQueryAll
|
||||
return $query->where('league_id', $league_id);
|
||||
}
|
||||
})
|
||||
->where(function ($query) use ($team_id, $similar_past_matches, $team_position) {
|
||||
if ($team_id && $similar_past_matches == 'none') {
|
||||
switch ($team_position) {
|
||||
case 'home':
|
||||
return $query->where('home_id', '=', $team_id);
|
||||
case 'away':
|
||||
return $query->where('away_id', '=', $team_id);
|
||||
default:
|
||||
return $query->where('home_id', '=', $team_id)
|
||||
->orWhere('away_id', '=', $team_id);
|
||||
}
|
||||
}
|
||||
->where(function ($query) use ($team_id) {
|
||||
return $query->where('home_id', '=', $team_id)
|
||||
->orWhere('away_id', '=', $team_id);
|
||||
})
|
||||
// ->where(function ($query) use ($team_id, $similar_past_matches, $team_position) {
|
||||
// if ($team_id && $similar_past_matches == 'none') {
|
||||
// switch ($team_position) {
|
||||
// case 'home':
|
||||
// return $query->where('home_id', '=', $team_id);
|
||||
// case 'away':
|
||||
// return $query->where('away_id', '=', $team_id);
|
||||
// default:
|
||||
// return $query->where('home_id', '=', $team_id)
|
||||
// ->orWhere('away_id', '=', $team_id);
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
->when($matches_played, function ($query) use ($matches_played, $player_on_field) {
|
||||
if ($player_on_field == 'notplayed') {
|
||||
return $query->whereNotIn('match_id', $matches_played);
|
||||
|
||||
Reference in new issue
Block a user