wip
This commit is contained in:
1 parent
966b04dfa4
commit
29bbe52b86
1 file changed
+29
-29
+29
-29
@@ -112,37 +112,37 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
$set('competition_group_id', null);
|
$set('competition_group_id', null);
|
||||||
})
|
})
|
||||||
->live(),
|
->live(),
|
||||||
// Select::make('competition_group_id')
|
Select::make('competition_group_id')
|
||||||
// ->placeholder('League')
|
->placeholder('League')
|
||||||
// ->hiddenLabel()
|
->hiddenLabel()
|
||||||
// ->label('')
|
->label('')
|
||||||
// ->searchable()
|
->searchable()
|
||||||
// ->options(function (Get $get) {
|
->options(function (Get $get) {
|
||||||
// $map = Country::all()->pluck('name', 'id');
|
$map = Country::all()->pluck('name', 'id')->toArray();
|
||||||
// $query = CompetitionGroup::where('sport_id', auth()->user()->sport_id)
|
$query = CompetitionGroup::where('sport_id', auth()->user()->sport_id)
|
||||||
// ->whereHas('event', function ($query) {
|
->whereHas('event', function ($query) {
|
||||||
// $query->where('starttime', '>', now())
|
$query->where('starttime', '>', now())
|
||||||
// ->where('betradar_id', 0);
|
->where('betradar_id', 0);
|
||||||
// });
|
});
|
||||||
|
|
||||||
// if ($get('country_id') ?? null) {
|
if ($get('country_id') ?? null) {
|
||||||
// $res = $query->where('country_id', $get('country_id'))->get();
|
$res = $query->where('country_id', $get('country_id'))->get();
|
||||||
// } else {
|
} else {
|
||||||
// $res = $query->get();
|
$res = $query->get();
|
||||||
// }
|
}
|
||||||
// $arr = [];
|
$arr = [];
|
||||||
// foreach ($res as $value) {
|
foreach ($res as $value) {
|
||||||
// if (isset($map[$value->country_id])) {
|
if (isset($map[$value->country_id])) {
|
||||||
// $arr[$value->id] = $map[$value->country_id].' '.$value->name;
|
$arr[$value->id] = $map[$value->country_id].' '.$value->name;
|
||||||
// } else {
|
} else {
|
||||||
// $arr[$value->id] = $value->name;
|
$arr[$value->id] = $value->name;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// asort($arr);
|
asort($arr);
|
||||||
|
|
||||||
// return $arr;
|
return $arr;
|
||||||
// })
|
})
|
||||||
// ->live(),
|
->live(),
|
||||||
])->columnSpan(2),
|
])->columnSpan(2),
|
||||||
DateRangePicker::make('starttime_period')
|
DateRangePicker::make('starttime_period')
|
||||||
->displayFormat('d M Y')
|
->displayFormat('d M Y')
|
||||||
|
|||||||
Reference in new issue
Block a user