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\Components\Utilities\Set;
|
||||||
use Filament\Schemas\Schema;
|
use Filament\Schemas\Schema;
|
||||||
use Illuminate\Contracts\Support\Htmlable;
|
use Illuminate\Contracts\Support\Htmlable;
|
||||||
|
use Illuminate\Support\HtmlString;
|
||||||
|
|
||||||
class Statistic extends BaseDashboard
|
class Statistic extends BaseDashboard
|
||||||
{
|
{
|
||||||
@@ -97,6 +98,7 @@ class Statistic extends BaseDashboard
|
|||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
Section::make()
|
Section::make()
|
||||||
->compact()
|
->compact()
|
||||||
|
->collapsible()
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('tm_player_id')
|
Select::make('tm_player_id')
|
||||||
->label('Player')
|
->label('Player')
|
||||||
@@ -109,12 +111,6 @@ class Statistic extends BaseDashboard
|
|||||||
->live(),
|
->live(),
|
||||||
Select::make('team_position')
|
Select::make('team_position')
|
||||||
->prefixIcon('phosphor-map-pin')
|
->prefixIcon('phosphor-map-pin')
|
||||||
->suffixAction(
|
|
||||||
Action::make('iconInfo')
|
|
||||||
->color('gray')
|
|
||||||
->icon('phosphor-question')
|
|
||||||
->tooltip('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
|
|
||||||
)
|
|
||||||
->default('all')
|
->default('all')
|
||||||
->selectablePlaceholder(false)
|
->selectablePlaceholder(false)
|
||||||
->options([
|
->options([
|
||||||
@@ -147,7 +143,7 @@ class Statistic extends BaseDashboard
|
|||||||
Action::make('iconInfo')
|
Action::make('iconInfo')
|
||||||
->color('gray')
|
->color('gray')
|
||||||
->icon('phosphor-question')
|
->icon('phosphor-question')
|
||||||
->tooltip('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
|
->tooltip(fn () => $this->tooltip_similar_past_matches())
|
||||||
)
|
)
|
||||||
->default('none')
|
->default('none')
|
||||||
->live()
|
->live()
|
||||||
@@ -160,12 +156,12 @@ class Statistic extends BaseDashboard
|
|||||||
Slider::make('accuracy')
|
Slider::make('accuracy')
|
||||||
->disabled(fn (Get $get) => $get('similar_past_matches') == 'none')
|
->disabled(fn (Get $get) => $get('similar_past_matches') == 'none')
|
||||||
->fillTrack()
|
->fillTrack()
|
||||||
->default(0.5)
|
->default(5)
|
||||||
->step(0.1)
|
->step(0.1)
|
||||||
->decimalPlaces(1)
|
->decimalPlaces(1)
|
||||||
->tooltips()
|
->tooltips()
|
||||||
->range(minValue: 0, maxValue: 1),
|
->range(minValue: 0, maxValue: 1)
|
||||||
// ->pips(),
|
->pips(),
|
||||||
])->columns(5)
|
])->columns(5)
|
||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
|
|
||||||
@@ -180,4 +176,19 @@ class Statistic extends BaseDashboard
|
|||||||
MovingAverageChart::make(),
|
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