wip
This commit is contained in:
1 parent
9ca5657827
commit
6f3d608704
47 files changed
+1005
-145
No files matched your search
@@ -31,25 +31,19 @@ class MultilineBookmaker extends Component implements HasActions, HasSchemas, Ha
|
||||
use InteractsWithSchemas;
|
||||
use InteractsWithTable;
|
||||
|
||||
public static $default_filter;
|
||||
protected $listeners = [
|
||||
'reload_bookmaker_multiline' => '$refresh',
|
||||
];
|
||||
|
||||
public $user;
|
||||
|
||||
public static function load_filter($sport_id)
|
||||
{
|
||||
self::$default_filter = MultilineSetting::where('sport_id', $sport_id)
|
||||
->orderBy('id')->pluck('id')->first();
|
||||
}
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
|
||||
$this->user = User::getUser();
|
||||
|
||||
self::load_filter($this->user->sport_id);
|
||||
|
||||
return $table
|
||||
->query(MultilineClient::query()->where('client_bookmaker_id', auth()->user()->bookmaker_id)->where('sport_id', $this->user->sport_id))
|
||||
->query(MultilineClient::query()->where('client_bookmaker_id', $this->user->bookmaker_id)->where('sport_id', $this->user->sport_id))
|
||||
->paginated(false)
|
||||
->columns([
|
||||
IconColumn::make('sport.icon')
|
||||
@@ -88,7 +82,7 @@ class MultilineBookmaker extends Component implements HasActions, HasSchemas, Ha
|
||||
->schema([
|
||||
Radio::make('multiline_setting_id')
|
||||
->inline()
|
||||
->default(self::$default_filter)
|
||||
->default(1)
|
||||
->columnSpan(6)
|
||||
->columnSpanFull()
|
||||
->hiddenLabel()
|
||||
|
||||
Reference in new issue
Block a user