adding more filter
This commit is contained in:
1 parent
ca58eba530
commit
6b4fc0b8a1
5 files changed
+90
-15
No files matched your search
@@ -25,6 +25,7 @@ use Filament\Actions\DeleteAction;
|
|||||||
use Filament\Actions\DeleteBulkAction;
|
use Filament\Actions\DeleteBulkAction;
|
||||||
use Filament\Forms\Components\Hidden;
|
use Filament\Forms\Components\Hidden;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Schemas\Components\Utilities\Get;
|
use Filament\Schemas\Components\Utilities\Get;
|
||||||
use Filament\Support\Enums\FontWeight;
|
use Filament\Support\Enums\FontWeight;
|
||||||
use Filament\Support\Enums\VerticalAlignment;
|
use Filament\Support\Enums\VerticalAlignment;
|
||||||
@@ -173,7 +174,7 @@ class EventsTable
|
|||||||
->extremePaginationLinks()
|
->extremePaginationLinks()
|
||||||
->filters([
|
->filters([
|
||||||
Filter::make('events')
|
Filter::make('events')
|
||||||
->columns(5)->columnSpan(5)
|
->columns(8)->columnSpan(8)
|
||||||
->schema([
|
->schema([
|
||||||
Hidden::make('filter_alarm_green'),
|
Hidden::make('filter_alarm_green'),
|
||||||
Hidden::make('filter_alarm_yellow'),
|
Hidden::make('filter_alarm_yellow'),
|
||||||
@@ -202,6 +203,7 @@ class EventsTable
|
|||||||
Select::make(name: 'country_id')
|
Select::make(name: 'country_id')
|
||||||
->hidden(fn () => self::$user->sport_id == 5)
|
->hidden(fn () => self::$user->sport_id == 5)
|
||||||
->placeholder('Country')
|
->placeholder('Country')
|
||||||
|
->prefixIcon('phosphor-flag')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->multiple()
|
->multiple()
|
||||||
@@ -220,6 +222,7 @@ class EventsTable
|
|||||||
Select::make('competition_group_id')
|
Select::make('competition_group_id')
|
||||||
->hidden(fn () => self::$user->sport_id == 5)
|
->hidden(fn () => self::$user->sport_id == 5)
|
||||||
->placeholder('League')
|
->placeholder('League')
|
||||||
|
->prefixIcon('phosphor-trophy')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->multiple()
|
->multiple()
|
||||||
@@ -242,6 +245,7 @@ class EventsTable
|
|||||||
Select::make('group_id')
|
Select::make('group_id')
|
||||||
->visible(fn () => self::$user->sport_id == 5)
|
->visible(fn () => self::$user->sport_id == 5)
|
||||||
->placeholder('Tournament')
|
->placeholder('Tournament')
|
||||||
|
->prefixIcon('phosphor-trophy')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->multiple()
|
->multiple()
|
||||||
@@ -261,6 +265,7 @@ class EventsTable
|
|||||||
return $arr;
|
return $arr;
|
||||||
})
|
})
|
||||||
->live(),
|
->live(),
|
||||||
|
|
||||||
DateRangePicker::make('starttime_period')
|
DateRangePicker::make('starttime_period')
|
||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
->displayFormat('d M Y')
|
->displayFormat('d M Y')
|
||||||
@@ -268,6 +273,50 @@ class EventsTable
|
|||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->live(),
|
->live(),
|
||||||
|
|
||||||
|
TextInput::make('favorit_threshold')
|
||||||
|
->prefixIcon('phosphor-less-than')
|
||||||
|
->suffix('Favorit')
|
||||||
|
->numeric()
|
||||||
|
->minValue(1.01)
|
||||||
|
->maxValue(3.00)
|
||||||
|
->step(0.01)
|
||||||
|
->hiddenLabel(),
|
||||||
|
|
||||||
|
Select::make('special_filter_base')
|
||||||
|
->placeholder('Filters Base')
|
||||||
|
->prefixIcon('phosphor-funnel')
|
||||||
|
->hiddenLabel()
|
||||||
|
->native(false)
|
||||||
|
->allowHtml()
|
||||||
|
->options([
|
||||||
|
'sp1' => '<span class="text-blue-500">Nig ≠ Ken</div>',
|
||||||
|
'sp3' => '<span class="text-amber-500">Favorit ≥ </div>',
|
||||||
|
'sp4' => '<span class="text-amber-500">Favorit ≤ </div>',
|
||||||
|
'sp5' => '<span class="text-amber-500">X ≤ </div>',
|
||||||
|
'sp6' => '<span class="text-amber-500">Margin ≥ </div>',
|
||||||
|
'sp7' => '<span class="text-amber-500">Margin ≤ </div>',
|
||||||
|
]),
|
||||||
|
|
||||||
|
Select::make('special_filter')
|
||||||
|
->placeholder('Special Filters')
|
||||||
|
->prefixIcon('phosphor-funnel')
|
||||||
|
->hiddenLabel()
|
||||||
|
->disabled()
|
||||||
|
->native(false)
|
||||||
|
->allowHtml()
|
||||||
|
->options([
|
||||||
|
'Events' => [
|
||||||
|
'sp1' => '<span class="text-blue-500">Nigeria > Colombia</div>',
|
||||||
|
'sp2' => '<span class="text-blue-500">Nigeria < Colombia</div>',
|
||||||
|
],
|
||||||
|
'Odds' => [
|
||||||
|
'sp3' => '<span class="text-amber-500">Favorit < Sportingbet</div>',
|
||||||
|
'sp4' => '<span class="text-amber-500">Favorit > Sportingbet</div>',
|
||||||
|
'sp5' => '<span class="text-amber-500">Favorit < Bet365</div>',
|
||||||
|
'sp6' => '<span class="text-amber-500">Favorit > Bet365</div>',
|
||||||
|
],
|
||||||
|
]),
|
||||||
])
|
])
|
||||||
->query(function (Builder $query, array $data): Builder {
|
->query(function (Builder $query, array $data): Builder {
|
||||||
return $query->when(
|
return $query->when(
|
||||||
@@ -349,6 +398,10 @@ class EventsTable
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// )->when(
|
||||||
|
// $data('favorit_threshold'),
|
||||||
|
// function (Builder $query, $favorit_threshold) {}
|
||||||
|
// whereRaw("LEAST(price_one, price_two, price_three) BETWEEN ? AND ?", [$min, $max])
|
||||||
);
|
);
|
||||||
})->indicateUsing(function (array $data): array {
|
})->indicateUsing(function (array $data): array {
|
||||||
$indicators = [];
|
$indicators = [];
|
||||||
@@ -408,6 +461,10 @@ class EventsTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($data['favorit_threshold'] ?? null) {
|
||||||
|
$indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info');
|
||||||
|
}
|
||||||
|
|
||||||
if ($data['stars_status'] ?? null) {
|
if ($data['stars_status'] ?? null) {
|
||||||
$indicators[] = Indicator::make('Favorits')->removeField('stars_status')->color('info');
|
$indicators[] = Indicator::make('Favorits')->removeField('stars_status')->color('info');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Livewire;
|
||||||
|
|
||||||
|
use Livewire\Component;
|
||||||
|
|
||||||
|
class PartnerProgramm extends Component
|
||||||
|
{
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('livewire.partner-programm');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ class RolesAndPermissionsSeeder extends Seeder
|
|||||||
['name' => 'super_admin', 'guard_name' => 'web'],
|
['name' => 'super_admin', 'guard_name' => 'web'],
|
||||||
['name' => 'konto_switch', 'guard_name' => 'web'],
|
['name' => 'konto_switch', 'guard_name' => 'web'],
|
||||||
['name' => 'mapper_source_betsapi', 'guard_name' => 'web'],
|
['name' => 'mapper_source_betsapi', 'guard_name' => 'web'],
|
||||||
|
['name' => 'partner_porgramm', 'guard_name' => 'web'],
|
||||||
],
|
],
|
||||||
['name']
|
['name']
|
||||||
);
|
);
|
||||||
@@ -32,6 +33,7 @@ class RolesAndPermissionsSeeder extends Seeder
|
|||||||
$user->assignRole('super_admin');
|
$user->assignRole('super_admin');
|
||||||
$user->assignRole('konto_switch');
|
$user->assignRole('konto_switch');
|
||||||
$user->assignRole('mapper_source_betsapi');
|
$user->assignRole('mapper_source_betsapi');
|
||||||
|
$user->assignRole('partner_porgramm');
|
||||||
|
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'name' => 'Ubaldo Perrucci',
|
'name' => 'Ubaldo Perrucci',
|
||||||
@@ -45,6 +47,6 @@ class RolesAndPermissionsSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
$user->assignRole('super_admin');
|
$user->assignRole('super_admin');
|
||||||
$user->assignRole('konto_switch');
|
$user->assignRole('konto_switch');
|
||||||
$user->assignRole('mapper_source_betsapi');
|
$user->assignRole('partner_porgramm');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<div>
|
||||||
|
{{-- To attain knowledge, add things every day; To attain wisdom, subtract things every day. --}}
|
||||||
|
</div>
|
||||||
@@ -49,22 +49,22 @@ case "$1" in
|
|||||||
php artisan nuh --d --t --f 20
|
php artisan nuh --d --t --f 20
|
||||||
php artisan nuh --d --t --f 21
|
php artisan nuh --d --t --f 21
|
||||||
php artisan nuh --d --t --f 22
|
php artisan nuh --d --t --f 22
|
||||||
php artisan nuh --d --t 3
|
php artisan nuh --d --f --t 3
|
||||||
php artisan nuh --d --f 4
|
php artisan nuh --d --f 4
|
||||||
php artisan nuh --d --f 5
|
php artisan nuh --d --f 5
|
||||||
php artisan nuh --d --f 6
|
php artisan nuh --d --f 6
|
||||||
php artisan nuh --d --f 8
|
php artisan nuh --d --f 8
|
||||||
php artisan nuh --d --f 9
|
php artisan nuh --d --f 9
|
||||||
php artisan nuh --d --f 10
|
php artisan nuh --d --f 10
|
||||||
php artisan nuh --d --f 11
|
php artisan nuh --d --f 11
|
||||||
php artisan nuh --d --f 12
|
php artisan nuh --d --f 12
|
||||||
php artisan nuh --d --f 13
|
php artisan nuh --d --f 13
|
||||||
php artisan nuh --d --f 14
|
php artisan nuh --d --f 14
|
||||||
php artisan nuh --d --f 15
|
php artisan nuh --d --f 15
|
||||||
php artisan nuh --d --f 16
|
php artisan nuh --d --f 16
|
||||||
php artisan nuh --d --f 17
|
php artisan nuh --d --f 17
|
||||||
php artisan nuh --d --f 18
|
php artisan nuh --d --f 18
|
||||||
php artisan nuh --d --f 19
|
php artisan nuh --d --f 19
|
||||||
;;
|
;;
|
||||||
"10")
|
"10")
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in new issue
Block a user