comparatore bettypes wip
This commit is contained in:
1 parent
b39196c9eb
commit
ebe5276fc4
5 files changed
+9
-11
No files matched your search
@@ -57,6 +57,7 @@ class EventsTable
|
|||||||
public static function load_bettype_settings()
|
public static function load_bettype_settings()
|
||||||
{
|
{
|
||||||
$res = BettypeUser::with('multiline_setting')->where('is_active', 1)->get();
|
$res = BettypeUser::with('multiline_setting')->where('is_active', 1)->get();
|
||||||
|
|
||||||
foreach ($res as $value) {
|
foreach ($res as $value) {
|
||||||
self::$bettype_settings[] = $value->multiline_setting->table;
|
self::$bettype_settings[] = $value->multiline_setting->table;
|
||||||
}
|
}
|
||||||
@@ -188,7 +189,7 @@ class EventsTable
|
|||||||
->filters([
|
->filters([
|
||||||
Filter::make('events')
|
Filter::make('events')
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('country_id')
|
Select::make(name: 'country_id')
|
||||||
->placeholder('Country')
|
->placeholder('Country')
|
||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
@@ -235,16 +236,16 @@ class EventsTable
|
|||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->live(),
|
->live(),
|
||||||
Action::make('reset')
|
Action::make('resetAction')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->color('gray')
|
->color('primary')
|
||||||
|
->outlined()
|
||||||
->keyBindings(['esc', 'escape'])
|
->keyBindings(['esc', 'escape'])
|
||||||
->icon('phosphor-x')
|
->icon('phosphor-x')
|
||||||
->action(function ($livewire) {
|
->action(function ($livewire) {
|
||||||
$livewire->resetTableFiltersForm(); // Clears all filters
|
$livewire->resetTableFiltersForm(); // Clears all filters
|
||||||
$livewire->tableSearch = ''; // Clears the main search bar
|
$livewire->tableSearch = ''; // Clears the main search bar
|
||||||
}),
|
}),
|
||||||
|
|
||||||
])
|
])
|
||||||
->query(function (Builder $query, array $data): Builder {
|
->query(function (Builder $query, array $data): Builder {
|
||||||
return $query
|
return $query
|
||||||
@@ -278,7 +279,7 @@ class EventsTable
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
->columns(10)->columnSpan(10),
|
->columns(12)->columnSpan(12),
|
||||||
], layout: FiltersLayout::AboveContent)
|
], layout: FiltersLayout::AboveContent)
|
||||||
->filtersFormColumns(6)
|
->filtersFormColumns(6)
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class BettypeToggle extends Component
|
|||||||
{
|
{
|
||||||
$this->multilines = [];
|
$this->multilines = [];
|
||||||
|
|
||||||
$res = BettypeUser::with('multiline_setting')->orderBy('multiline_setting_id')->get();
|
$res = BettypeUser::with('multiline_setting')->get();
|
||||||
|
|
||||||
foreach ($res as $set) {
|
foreach ($res as $set) {
|
||||||
$this->multilines[] = [
|
$this->multilines[] = [
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class Event extends Model
|
|||||||
|
|
||||||
public function sport()
|
public function sport()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Sport::class);
|
return $this->belongsTo(Sport::class)->where('is_active', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function country()
|
public function country()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div className="flex flex-1">
|
<div class="flex flex-row gap-3">
|
||||||
@foreach ($multilines as $multiline)
|
@foreach ($multilines as $multiline)
|
||||||
<x-filament::button size="xs" class="mx-1" tooltip="{{ $multiline['name'] }}"
|
<x-filament::button size="xs" class="mx-1" tooltip="{{ $multiline['name'] }}"
|
||||||
wire:click="toggleBettype({{ $multiline['id'] }})" wire:dispatch="refreshTable" :color="!$multiline['is_active'] ? 'gray' : 'primary'">
|
wire:click="toggleBettype({{ $multiline['id'] }})" wire:dispatch="refreshTable" :color="!$multiline['is_active'] ? 'gray' : 'primary'">
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<div class="flex flex-1 gap-5">
|
<div class="flex flex-1 gap-5">
|
||||||
@if ($this->current == 'filament.admin.resources.events.index')
|
@if ($this->current == 'filament.admin.resources.events.index')
|
||||||
|
|
||||||
|
|
||||||
{{-- Client Swop Bookmaker --}}
|
{{-- Client Swop Bookmaker --}}
|
||||||
|
|
||||||
<x-filament::dropdown>
|
<x-filament::dropdown>
|
||||||
@@ -62,8 +61,6 @@
|
|||||||
</x-filament::dropdown>
|
</x-filament::dropdown>
|
||||||
|
|
||||||
{{-- Swop Sport --}}
|
{{-- Swop Sport --}}
|
||||||
{{-- $livewire->resetTableFiltersForm(); // Clears all filters
|
|
||||||
$livewire->tableSearch = ''; // Clears the main search bar --}}
|
|
||||||
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="primary">
|
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="primary">
|
||||||
<x-filament::input.select wire:model="sport_id" wire:change="swopSport">
|
<x-filament::input.select wire:model="sport_id" wire:change="swopSport">
|
||||||
@foreach ($sports as $id => $name)
|
@foreach ($sports as $id => $name)
|
||||||
|
|||||||
Reference in new issue
Block a user