wip
This commit is contained in:
1 parent
30c32397a8
commit
472b37762f
1 file changed
+21
-10
@@ -21,6 +21,7 @@ use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Filament\Schemas\Schema;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class Statistic extends BaseDashboard
|
||||
{
|
||||
@@ -97,6 +98,7 @@ class Statistic extends BaseDashboard
|
||||
->columnSpanFull(),
|
||||
Section::make()
|
||||
->compact()
|
||||
->collapsible()
|
||||
->schema([
|
||||
Select::make('tm_player_id')
|
||||
->label('Player')
|
||||
@@ -109,12 +111,6 @@ class Statistic extends BaseDashboard
|
||||
->live(),
|
||||
Select::make('team_position')
|
||||
->prefixIcon('phosphor-map-pin')
|
||||
->suffixAction(
|
||||
Action::make('iconInfo')
|
||||
->color('gray')
|
||||
->icon('phosphor-question')
|
||||
->tooltip('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
|
||||
)
|
||||
->default('all')
|
||||
->selectablePlaceholder(false)
|
||||
->options([
|
||||
@@ -147,7 +143,7 @@ class Statistic extends BaseDashboard
|
||||
Action::make('iconInfo')
|
||||
->color('gray')
|
||||
->icon('phosphor-question')
|
||||
->tooltip('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
|
||||
->tooltip(fn () => $this->tooltip_similar_past_matches())
|
||||
)
|
||||
->default('none')
|
||||
->live()
|
||||
@@ -160,12 +156,12 @@ class Statistic extends BaseDashboard
|
||||
Slider::make('accuracy')
|
||||
->disabled(fn (Get $get) => $get('similar_past_matches') == 'none')
|
||||
->fillTrack()
|
||||
->default(0.5)
|
||||
->default(5)
|
||||
->step(0.1)
|
||||
->decimalPlaces(1)
|
||||
->tooltips()
|
||||
->range(minValue: 0, maxValue: 1),
|
||||
// ->pips(),
|
||||
->range(minValue: 0, maxValue: 1)
|
||||
->pips(),
|
||||
])->columns(5)
|
||||
->columnSpanFull(),
|
||||
|
||||
@@ -180,4 +176,19 @@ class Statistic extends BaseDashboard
|
||||
MovingAverageChart::make(),
|
||||
];
|
||||
}
|
||||
|
||||
protected function tooltip_similar_past_matches(): HtmlString
|
||||
{
|
||||
$str = '<div class="grid grid-cols-4 gap-4 max-w-lg">';
|
||||
$str .= '<div class="font-bold">None</div>';
|
||||
$str .= '<div class="col-span-3">Only selected team within selected league is considered.</div>';
|
||||
$str .= '<div class="font-bold">League</div>';
|
||||
$str .= '<div class="col-span-3">All events in seleceted league are considered, filtered expected goal handicap and total parameter in the range of <span class="text-blue-500">Accuracy Slider</span> setting.</div>';
|
||||
$str .= '<div class="font-bold">All Database</div>';
|
||||
$str .= '<div class="col-span-3">Eintire database is considered, filtered expected goal handicap and total parameter in the range of the <br><span class="text-blue-500">Accuracy Slider</span> setting.</div>';
|
||||
$str .= '</div>';
|
||||
|
||||
return new HtmlString($str);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user