wip
This commit is contained in:
1 parent
78db21c71c
commit
e1f3b728a9
9 files changed
+252
-203
No files matched your search
@@ -129,7 +129,7 @@ class Statistic extends BaseDashboard
|
||||
|
||||
Grid::make([
|
||||
'default' => 1,
|
||||
'sm' => 3,
|
||||
'sm' => 2,
|
||||
'md' => 5,
|
||||
])
|
||||
->columnSpanFull()
|
||||
@@ -139,10 +139,10 @@ class Statistic extends BaseDashboard
|
||||
->live()
|
||||
->preload()
|
||||
->searchable(false)
|
||||
->prefixIconColor(fn (Get $get): string => $get('sofascore_category_id') ? 'success' : 'danger')
|
||||
->prefixIconColor(fn(Get $get): string => $get('sofascore_category_id') ? 'success' : 'danger')
|
||||
->prefixIcon('phosphor-globe-fill')
|
||||
->hiddenLabel()
|
||||
->options(fn () => LoadSofaScoreCategory::load())
|
||||
->options(fn() => LoadSofaScoreCategory::load())
|
||||
->placeholder('Select Country')
|
||||
->afterStateUpdated(function (callable $set, $state) {
|
||||
$set('seasonmode', SofaScoreCategory::where('id', $state)->value('season_mode'));
|
||||
@@ -155,10 +155,10 @@ class Statistic extends BaseDashboard
|
||||
Select::make('league_id')
|
||||
->live()
|
||||
->preload()
|
||||
->prefixIconColor(fn (Get $get): string => $get('league_id') ? 'success' : 'danger')
|
||||
->prefixIconColor(fn(Get $get): string => $get('league_id') ? 'success' : 'danger')
|
||||
->prefixIcon('phosphor-trophy-fill')
|
||||
->hiddenLabel()
|
||||
->options(fn (Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('sofascore_category_id')))
|
||||
->options(fn(Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('sofascore_category_id')))
|
||||
->placeholder('Select League')
|
||||
->afterStateUpdated(function (callable $set) {
|
||||
$set('match_id', null);
|
||||
@@ -169,8 +169,8 @@ class Statistic extends BaseDashboard
|
||||
Select::make('match_id')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->columnSpan(fn (Get $get) => $get('similar_past_matches') != 'none' ? 2 : 1)
|
||||
->prefixIconColor(fn (Get $get): string => $get('match_id') ? 'success' : 'danger')
|
||||
->columnSpan(fn(Get $get) => $get('similar_past_matches') != 'none' ? 2 : 1)
|
||||
->prefixIconColor(fn(Get $get): string => $get('match_id') ? 'success' : 'danger')
|
||||
->prefixIcon('phosphor-calendar-check-fill')
|
||||
->options(function (Get $get) {
|
||||
return LoadStatisticFixturesMatchOptions::load($get('league_id'));
|
||||
@@ -183,10 +183,10 @@ class Statistic extends BaseDashboard
|
||||
->placeholder('Select Event'),
|
||||
Action::make('esc')
|
||||
->hiddenLabel()
|
||||
->visible(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->tooltip('Clear all (esc)')
|
||||
->visible(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->tooltip('Clear All (esc)')
|
||||
->icon('phosphor-x-circle')
|
||||
->color('warning')
|
||||
->color('danger')
|
||||
->keyBindings(['esc'])
|
||||
->action('resetFilters'),
|
||||
|
||||
@@ -202,8 +202,13 @@ class Statistic extends BaseDashboard
|
||||
return 'danger';
|
||||
}
|
||||
})
|
||||
->prefixIcon('phosphor-users-three-fill')
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-users-fill')
|
||||
->suffixAction(Action::make('reset')
|
||||
->icon('phosphor-x-circle')
|
||||
->tooltip('Clear Team')
|
||||
->action(fn(callable $set) => $set('team_id', null))
|
||||
->color(fn(Get $get): string => $get('team_id') != 0 ? 'danger' : 'gray'))
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->options(function (Get $get) {
|
||||
if ($get('match_id')) {
|
||||
$res = StatisticFixtures::where('id', $get('match_id'))->first();
|
||||
@@ -222,7 +227,14 @@ class Statistic extends BaseDashboard
|
||||
$this->dispatch('reset-tab');
|
||||
})
|
||||
->placeholder('Select Team'),
|
||||
|
||||
]),
|
||||
Grid::make([
|
||||
'default' => 1,
|
||||
'sm' => 3,
|
||||
'md' => 5,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->schema([
|
||||
Select::make('team_position')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
@@ -232,9 +244,9 @@ class Statistic extends BaseDashboard
|
||||
Action::make('iconInfo')
|
||||
->color('success')
|
||||
->icon('phosphor-question-fill')
|
||||
->tooltip(fn () => 'Team Position')
|
||||
->tooltip(fn() => 'Team Position')
|
||||
)
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->default('all')
|
||||
->selectablePlaceholder(false)
|
||||
->options([
|
||||
@@ -244,14 +256,6 @@ class Statistic extends BaseDashboard
|
||||
])->afterStateUpdated(function (callable $set) {
|
||||
$set('ss_player_id', null);
|
||||
}),
|
||||
]),
|
||||
Grid::make([
|
||||
'default' => 1,
|
||||
'sm' => 3,
|
||||
'md' => 5,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->schema([
|
||||
Select::make('statistic_type')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
@@ -289,20 +293,21 @@ class Statistic extends BaseDashboard
|
||||
->live()
|
||||
// ->columnSpan(2)
|
||||
->hiddenLabel()
|
||||
->columnSpan(fn (Get $get) => $get('similar_past_matches') != 'none' ? 2 : 1)
|
||||
->hidden(fn(Get $get) => $get('team_id') != null)
|
||||
->columnSpan(fn(Get $get) => $get('similar_past_matches') != 'none' ? 2 : 1)
|
||||
->suffixAction(Action::make('reset')
|
||||
->icon('phosphor-x-circle')
|
||||
->action(fn (callable $set) => $set('similar_past_matches', 'none'))
|
||||
->color(fn (Get $get): string => $get('similar_past_matches') != 'none' ? 'info' : 'gray'))
|
||||
->tooltip('Clear SMP')
|
||||
->action(fn(callable $set) => $set('similar_past_matches', 'none'))
|
||||
->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'danger' : 'gray'))
|
||||
->placeholder('Similar Past Matches')
|
||||
->suffix(fn (Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± '.$get('accuracy').'</div>') : '')
|
||||
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± ' . $get('accuracy') . '</div>') : '')
|
||||
->prefix('SPM')
|
||||
->prefixAction(
|
||||
Action::make('iconInfo')
|
||||
->icon('phosphor-question-fill')
|
||||
// ->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'success' : 'primary')
|
||||
->color('success')
|
||||
->tooltip(fn () => $this->tooltip_similar_past_matches())
|
||||
->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'success' : 'danger')
|
||||
->tooltip(fn() => $this->tooltip_similar_past_matches())
|
||||
)
|
||||
->default('none')
|
||||
->selectablePlaceholder(false)
|
||||
@@ -322,7 +327,7 @@ class Statistic extends BaseDashboard
|
||||
Slider::make('accuracy')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') == 'none')
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') == 'none')
|
||||
->fillTrack()
|
||||
->minValue(0)
|
||||
->maxValue(0.25)
|
||||
@@ -342,13 +347,13 @@ class Statistic extends BaseDashboard
|
||||
->allowHtml()
|
||||
->columnSpan(2)
|
||||
->placeholder('Player')
|
||||
->visible(fn (Get $get) => $get('team_id'))
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'success' : '')
|
||||
->visible(fn(Get $get) => $get('team_id'))
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->prefixIconColor(fn(Get $get): string => $get('similar_past_matches') == 'none' ? 'success' : '')
|
||||
->prefixIcon('icon-player')
|
||||
->preload()
|
||||
->searchable()
|
||||
->extraAttributes(fn () => [
|
||||
->extraAttributes(fn() => [
|
||||
'id' => 'player_selector',
|
||||
'style' => 'width: 100%;',
|
||||
])
|
||||
@@ -356,7 +361,7 @@ class Statistic extends BaseDashboard
|
||||
Action::make('iconInfo')
|
||||
->icon('phosphor-question-fill')
|
||||
->color('success')
|
||||
->tooltip(fn () => $this->tooltip_player_info())
|
||||
->tooltip(fn() => $this->tooltip_player_info())
|
||||
)
|
||||
->options(function (Get $get) {
|
||||
$team_id = $get('team_id');
|
||||
@@ -373,7 +378,7 @@ class Statistic extends BaseDashboard
|
||||
->placeholder('Time on field')
|
||||
->prefixIcon('phosphor-watch-fill')
|
||||
->default('all')
|
||||
->hidden(fn (Get $get) => ! $get('ss_player_id'))
|
||||
->hidden(fn(Get $get) => ! $get('ss_player_id'))
|
||||
->prefixIconColor('success')
|
||||
->selectablePlaceholder(false)
|
||||
->options([
|
||||
@@ -394,7 +399,7 @@ class Statistic extends BaseDashboard
|
||||
->extraAttributes([
|
||||
'class' => 'radio-statistic-group',
|
||||
])
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->columnSpan(2)
|
||||
->inline()
|
||||
->default('season')
|
||||
@@ -413,8 +418,8 @@ class Statistic extends BaseDashboard
|
||||
->multiple()
|
||||
->placeholder('Current Season')
|
||||
->prefixIconColor('success')
|
||||
->visible(fn (Get $get) => $get('seasonmode'))
|
||||
->hidden(fn (Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->visible(fn(Get $get) => $get('seasonmode'))
|
||||
->hidden(fn(Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-calendar-star-fill')
|
||||
->options([
|
||||
'2026' => '2026',
|
||||
@@ -434,8 +439,8 @@ class Statistic extends BaseDashboard
|
||||
->multiple()
|
||||
->placeholder('Current Season')
|
||||
->prefixIconColor('success')
|
||||
->visible(fn (Get $get) => $get('seasonmode'))
|
||||
->hidden(fn (Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->visible(fn(Get $get) => $get('seasonmode'))
|
||||
->hidden(fn(Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-calendar-star-fill')
|
||||
->options([
|
||||
'26/27' => '26/27',
|
||||
@@ -451,44 +456,44 @@ class Statistic extends BaseDashboard
|
||||
DatePicker::make('start_date')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
|
||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor(fn (Get $get): string => $get('start_date') ? 'success' : 'primary')
|
||||
->prefixIconColor(fn(Get $get): string => $get('start_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar-fill')
|
||||
->prefix('Start')
|
||||
->suffixAction(
|
||||
Action::make('clear_start')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('start_date', null))
|
||||
->action(fn(Set $set) => $set('start_date', null))
|
||||
),
|
||||
DatePicker::make('end_date')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
|
||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor(fn (Get $get): string => $get('end_date') ? 'success' : 'primary')
|
||||
->prefixIconColor(fn(Get $get): string => $get('end_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar-fill')
|
||||
->prefix('End')
|
||||
->suffixAction(
|
||||
Action::make('clear_end')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('end_date', null))
|
||||
->action(fn(Set $set) => $set('end_date', null))
|
||||
),
|
||||
Actions::make([
|
||||
Action::make('esc')
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->tooltip('Clear all (esc)')
|
||||
->icon('phosphor-x-circle')
|
||||
->color(fn (Get $get) => $get('sofascore_category_id') ? 'warning' : 'gray')
|
||||
->color(fn(Get $get) => $get('sofascore_category_id') ? 'warning' : 'gray')
|
||||
->keyBindings(['esc'])
|
||||
->action('resetFilters'),
|
||||
Action::make('copy')
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->visible(fn (Get $get) => $get('team_id'))
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->visible(fn(Get $get) => $get('team_id'))
|
||||
->tooltip('Copy data for pasting into spreadsheet')
|
||||
->color('success')
|
||||
->icon('phosphor-copy')
|
||||
@@ -514,7 +519,7 @@ class Statistic extends BaseDashboard
|
||||
$data = LoadEventsBoxes::load($this->filters, false);
|
||||
|
||||
$header = ['Team', 'Event', 'Odd 1', 'Odd X', 'Odd 2', 'Category', 'EXP H', 'EXP A', 'AGV+', 'AGV-', 'AGV Team Season H', 'AGV Team Season A', 'AGV League H', 'AGV League A'];
|
||||
$copystring = implode(';', $header)."\n";
|
||||
$copystring = implode(';', $header) . "\n";
|
||||
$row = [];
|
||||
$row[] = $data['active_team'];
|
||||
$row[] = $data['count_events'];
|
||||
@@ -530,7 +535,7 @@ class Statistic extends BaseDashboard
|
||||
$row[] = $data['gls_team_season']['away'];
|
||||
$row[] = $data['gls_liga_season']['home'];
|
||||
$row[] = $data['gls_liga_season']['away'];
|
||||
$copystring .= implode(';', $row)."\n";
|
||||
$copystring .= implode(';', $row) . "\n";
|
||||
$row = [];
|
||||
$row = array_fill(0, 5, '');
|
||||
$row[] = 'Fouls';
|
||||
@@ -542,7 +547,7 @@ class Statistic extends BaseDashboard
|
||||
$row[] = $data['fls_team_season']['away'];
|
||||
$row[] = $data['fls_liga_season']['home'];
|
||||
$row[] = $data['fls_liga_season']['away'];
|
||||
$copystring .= implode(';', $row)."\n";
|
||||
$copystring .= implode(';', $row) . "\n";
|
||||
$row = [];
|
||||
$row = array_fill(0, 5, '');
|
||||
$row[] = 'Offside';
|
||||
@@ -554,7 +559,7 @@ class Statistic extends BaseDashboard
|
||||
$row[] = $data['ofs_team_season']['away'];
|
||||
$row[] = $data['ofs_liga_season']['home'];
|
||||
$row[] = $data['ofs_liga_season']['away'];
|
||||
$copystring .= implode(';', $row)."\n";
|
||||
$copystring .= implode(';', $row) . "\n";
|
||||
$row = [];
|
||||
$row = array_fill(0, 5, '');
|
||||
$row[] = 'Cards';
|
||||
@@ -566,7 +571,7 @@ class Statistic extends BaseDashboard
|
||||
$row[] = $data['crd_team_season']['away'];
|
||||
$row[] = $data['crd_liga_season']['home'];
|
||||
$row[] = $data['crd_liga_season']['away'];
|
||||
$copystring .= implode(';', $row)."\n";
|
||||
$copystring .= implode(';', $row) . "\n";
|
||||
$row = [];
|
||||
$row = array_fill(0, 5, '');
|
||||
$row[] = 'Shots on traget';
|
||||
@@ -578,7 +583,7 @@ class Statistic extends BaseDashboard
|
||||
$row[] = $data['snt_team_season']['away'];
|
||||
$row[] = $data['snt_liga_season']['home'];
|
||||
$row[] = $data['snt_liga_season']['away'];
|
||||
$copystring .= implode(';', $row)."\n";
|
||||
$copystring .= implode(';', $row) . "\n";
|
||||
$row = [];
|
||||
$row = array_fill(0, 5, '');
|
||||
$row[] = 'Total Shots';
|
||||
@@ -590,7 +595,7 @@ class Statistic extends BaseDashboard
|
||||
$row[] = $data['tsh_team_season']['away'];
|
||||
$row[] = $data['tsh_liga_season']['home'];
|
||||
$row[] = $data['tsh_liga_season']['away'];
|
||||
$copystring .= implode(';', $row)."\n";
|
||||
$copystring .= implode(';', $row) . "\n";
|
||||
|
||||
return $copystring;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ class LoadEventsBoxes
|
||||
$league_id = (int) $filter['league_id'] ?? 0;
|
||||
$match_id = (int) $filter['match_id'] ?? 0;
|
||||
$team_id = (int) $filter['team_id'] ?? 0;
|
||||
$team_position = $filter['team_position'];
|
||||
$similar_past_matches = $filter['similar_past_matches'];
|
||||
|
||||
if (! $league_id) {
|
||||
@@ -20,9 +19,6 @@ class LoadEventsBoxes
|
||||
if (! $match_id) {
|
||||
return [];
|
||||
}
|
||||
if (! $team_id) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$match = StatisticFixtures::with('home')->with('away')->where('id', (int) $match_id)->first();
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
{
|
||||
$data = LoadEventsBoxes::load($this->filters, false);
|
||||
|
||||
// dd($data);
|
||||
|
||||
$similar_past_matches = $this->filters['similar_past_matches'];
|
||||
$team_position = $this->filters['team_position'];
|
||||
|
||||
@@ -50,7 +48,7 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
$count_events = $data['count_events'];
|
||||
$boxes = [];
|
||||
$boxes[] = Stat::make('Total', self::template_total($count_events))
|
||||
->description(fn () => $similar_past_matches == 'none' ? 'Team Selected' : 'Similar Past Matches')
|
||||
->description(fn() => $similar_past_matches == 'none' ? 'Team Selected' : 'Similar Past Matches')
|
||||
->extraAttributes(['x-init' => "animate('number-of-events', $count_events);", 'class' => 'box-success justify-center']);
|
||||
|
||||
// BOX 1X2
|
||||
@@ -70,22 +68,22 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
|
||||
// BOX AVERAGE
|
||||
if (isset($data['gls_team'])) {
|
||||
$boxes[] = Stat::make('Average '.$data['active_team'], self::template_tabelle_2($data))
|
||||
$boxes[] = Stat::make('Average ' . $data['active_team'], self::template_tabelle_2($data))
|
||||
->extraAttributes(['class' => 'box-blank'])
|
||||
->description($team_position);
|
||||
}
|
||||
|
||||
// BOX AVERAGE WITH TEAM FIXED TO ACTIVE SEASON
|
||||
if (isset($data['gls_team_season'])) {
|
||||
$boxes[] = Stat::make('Average '.$data['active_team'], self::template_tabelle_3($data))
|
||||
$boxes[] = Stat::make('Average ' . $data['active_team'], self::template_tabelle_3($data))
|
||||
->extraAttributes(['class' => 'box-blank'])
|
||||
->description('Season '.$data['active_season']);
|
||||
->description('Season ' . $data['active_season']);
|
||||
}
|
||||
// BOX AVERAGE ALL LEAGUE FIXED TO ACTIVE SEASON
|
||||
if (isset($data['gls_liga_season'])) {
|
||||
$boxes[] = Stat::make('League Average', self::template_tabelle_4($data))
|
||||
->extraAttributes(['class' => 'box-blank'])
|
||||
->description('Season '.$data['active_season']);
|
||||
->description('Season ' . $data['active_season']);
|
||||
}
|
||||
|
||||
$this->columns = [
|
||||
@@ -102,7 +100,7 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
protected function template_total(float $total_home): HtmlString
|
||||
{
|
||||
return new HtmlString('<div class="grid grid-cols-1 justify-center font-bold text-2xl">
|
||||
<span class="text-center" id="number-of-events">'.$total_home.'</span>
|
||||
<span class="text-center" id="number-of-events">' . $total_home . '</span>
|
||||
<span class="text-center text-xs text-gray-500 dark:text-gray-400">Events</span>
|
||||
</div>');
|
||||
}
|
||||
@@ -111,22 +109,22 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
protected function template_odds(array &$data, float $win, float $draw, float $lost): HtmlString
|
||||
{
|
||||
if ($this->filters['similar_past_matches'] != 'none') {
|
||||
$name_win = '<b>1</b> ('.$data['win_count'].')';
|
||||
$name_draw = '<b>X</b> ('.$data['draw_count'].')';
|
||||
$name_lost = '<b>2</b> ('.$data['lost_count'].')';
|
||||
$name_win = '<b>1</b> (' . $data['win_count'] . ')';
|
||||
$name_draw = '<b>X</b> (' . $data['draw_count'] . ')';
|
||||
$name_lost = '<b>2</b> (' . $data['lost_count'] . ')';
|
||||
} else {
|
||||
$name_win = '<b>Win</b> ('.$data['win_count'].')';
|
||||
$name_draw = '<b>Draw</b> ('.$data['draw_count'].')';
|
||||
$name_lost = '<b>Lost</b> ('.$data['lost_count'].')';
|
||||
$name_win = '<b>Win</b> (' . $data['win_count'] . ')';
|
||||
$name_draw = '<b>Draw</b> (' . $data['draw_count'] . ')';
|
||||
$name_lost = '<b>Lost</b> (' . $data['lost_count'] . ')';
|
||||
}
|
||||
|
||||
return new HtmlString('<div class="grid grid-cols-3 gap-3">
|
||||
<span class="text-center font-bold text-xl" id="win">'.number_format($win, 2).'</span>
|
||||
<span class="text-center font-bold text-xl" id="draw">'.number_format($draw, 2).'</span>
|
||||
<span class="text-center font-bold text-xl" id="lost">'.number_format($lost, 2).'</span>
|
||||
<span class="text-center text-xs text-gray-500 dark:text-gray-400">'.$name_win.'</span>
|
||||
<span class="text-center text-xs text-gray-500 dark:text-gray-400">'.$name_draw.'</span>
|
||||
<span class="text-center text-xs text-gray-500 dark:text-gray-400">'.$name_lost.'</span>
|
||||
<span class="text-center font-bold text-xl" id="win">' . number_format($win, 2) . '</span>
|
||||
<span class="text-center font-bold text-xl" id="draw">' . number_format($draw, 2) . '</span>
|
||||
<span class="text-center font-bold text-xl" id="lost">' . number_format($lost, 2) . '</span>
|
||||
<span class="text-center text-xs text-gray-500 dark:text-gray-400">' . $name_win . '</span>
|
||||
<span class="text-center text-xs text-gray-500 dark:text-gray-400">' . $name_draw . '</span>
|
||||
<span class="text-center text-xs text-gray-500 dark:text-gray-400">' . $name_lost . '</span>
|
||||
</div>');
|
||||
}
|
||||
|
||||
@@ -137,9 +135,9 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
$str = '<div class="grid grid-cols-4 gap-0.5 text-xs">';
|
||||
// $str .= '<div class="col-span-2"></div><div>Home</div><div>Away</div>';
|
||||
foreach ($bets as $name) {
|
||||
$str .= '<div class="font-normal text-left col-span-2">'.$data[$name]['name'].'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['home'], 1).'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['away'], 1).'</div>';
|
||||
$str .= '<div class="font-normal text-left col-span-2">' . $data[$name]['name'] . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['home'], 1) . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['away'], 1) . '</div>';
|
||||
}
|
||||
$str .= '</div>';
|
||||
|
||||
@@ -152,9 +150,9 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
$str = '<div class="grid grid-cols-4 gap-0.5 text-xs">';
|
||||
// $str .= '<div class="col-span-2"></div><div>Home</div><div>Away</div>';
|
||||
foreach ($bets as $name) {
|
||||
$str .= '<div class="font-normal text-left col-span-2">'.$data[$name]['name'].'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['home'], 1).'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['away'], 1).'</div>';
|
||||
$str .= '<div class="font-normal text-left col-span-2">' . $data[$name]['name'] . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['home'], 1) . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['away'], 1) . '</div>';
|
||||
}
|
||||
$str .= '</div>';
|
||||
|
||||
@@ -167,9 +165,9 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
$str = '<div class="grid grid-cols-4 gap-0.5 text-xs">';
|
||||
// $str .= '<div class="col-span-2"></div><div>Home</div><div>Away</div>';
|
||||
foreach ($bets as $name) {
|
||||
$str .= '<div class="font-normal text-left col-span-2">'.$data[$name]['name'].'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['home'], 1).'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['away'], 1).'</div>';
|
||||
$str .= '<div class="font-normal text-left col-span-2">' . $data[$name]['name'] . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['home'], 1) . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['away'], 1) . '</div>';
|
||||
}
|
||||
$str .= '</div>';
|
||||
|
||||
@@ -182,9 +180,9 @@ class BoxesBettypeAll extends StatsOverviewWidget
|
||||
$str = '<div class="grid grid-cols-4 gap-0.5 text-xs">';
|
||||
// $str .= '<div class="col-span-2"></div><div>Home</div><div>Away</div>';
|
||||
foreach ($bets as $name) {
|
||||
$str .= '<div class="font-normal text-left col-span-2">'.$data[$name]['name'].'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['home'], 1).'</div>';
|
||||
$str .= '<div class="text-right">'.number_format($data[$name]['away'], 1).'</div>';
|
||||
$str .= '<div class="font-normal text-left col-span-2">' . $data[$name]['name'] . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['home'], 1) . '</div>';
|
||||
$str .= '<div class="text-right">' . number_format($data[$name]['away'], 1) . '</div>';
|
||||
}
|
||||
$str .= '</div>';
|
||||
|
||||
|
||||
Reference in new issue
Block a user