pips decimal at slider
This commit is contained in:
1 parent
10801ddab2
commit
99363e001c
5 files changed
+2083
-33
No files matched your search
@@ -18,6 +18,7 @@ use Filament\Schemas\Components\Grid;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\RawJs;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use PhpOption\None;
|
||||
@@ -203,8 +204,7 @@ class Statistic extends BaseDashboard
|
||||
->hiddenLabel()
|
||||
->placeholder('Similar Past Matches')
|
||||
->prefixIconColor('primary')
|
||||
// ->prefixIcon('phosphor-approximate-equals')
|
||||
->suffix(fn (Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<span class="text-xl">'.$get('accuracy').'</span>') : '')
|
||||
->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>') : '')
|
||||
->columnSpan([
|
||||
'default' => 1,
|
||||
'xl' => 2,
|
||||
@@ -230,18 +230,21 @@ class Statistic extends BaseDashboard
|
||||
// ->label('Accuracy min: 0, max: 0.25, steps: 0.025')
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') == 'none')
|
||||
// ->fillTrack()
|
||||
->range(minValue: 0, maxValue: 0.25)
|
||||
->fillTrack()
|
||||
->minValue(0)
|
||||
->maxValue(0.25)
|
||||
->default(0.125)
|
||||
->step(0.025)
|
||||
->default(5)
|
||||
->decimalPlaces(1)
|
||||
->decimalPlaces(3)
|
||||
// ->tooltips()
|
||||
// ->columnSpan([
|
||||
// 'default' => 1,
|
||||
// 'xl' => 2,
|
||||
// ])
|
||||
->columnSpan([
|
||||
'default' => 1,
|
||||
'xl' => 2,
|
||||
])
|
||||
->pips()
|
||||
->pipsFormatter(RawJs::make(<<<'JS'
|
||||
`${$value.toFixed(2)}`
|
||||
JS))
|
||||
->live(),
|
||||
Select::make('tm_player_id')
|
||||
->hiddenLabel()
|
||||
|
||||
Reference in new issue
Block a user