wip
This commit is contained in:
1 parent
8a5db5d6da
commit
368af4b565
16 files changed
+96
-280
No files matched your search
@@ -35,6 +35,10 @@ class ListEvents extends ListRecords
|
|||||||
public function clearFilters(): void
|
public function clearFilters(): void
|
||||||
{
|
{
|
||||||
$this->removeTableFilters();
|
$this->removeTableFilters();
|
||||||
|
|
||||||
|
// $this->dispatch('refreshMapperLeft');
|
||||||
|
|
||||||
|
// $this->dispatch('refreshMapperRight');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateStar(): void
|
public function updateStar(): void
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ use Filament\Actions\BulkActionGroup;
|
|||||||
use Filament\Actions\DeleteAction;
|
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\Radio;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
@@ -43,7 +44,6 @@ use Filament\Tables\Table;
|
|||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use JaOcero\RadioDeck\Forms\Components\RadioDeck;
|
|
||||||
|
|
||||||
class EventsTable
|
class EventsTable
|
||||||
{
|
{
|
||||||
@@ -65,7 +65,7 @@ class EventsTable
|
|||||||
|
|
||||||
return $table
|
return $table
|
||||||
->striped()
|
->striped()
|
||||||
->poll('10s')
|
// ->poll('10s')
|
||||||
->deferLoading()
|
->deferLoading()
|
||||||
->defaultPaginationPageOption(5)
|
->defaultPaginationPageOption(5)
|
||||||
->paginated([5, 10, 15])
|
->paginated([5, 10, 15])
|
||||||
@@ -619,6 +619,7 @@ class EventsTable
|
|||||||
->color(fn ($record) => $record->event_user_note->isEmpty() ? 'gray' : 'info'),
|
->color(fn ($record) => $record->event_user_note->isEmpty() ? 'gray' : 'info'),
|
||||||
Action::make('event_notification')
|
Action::make('event_notification')
|
||||||
->modalWidth(Width::Large)
|
->modalWidth(Width::Large)
|
||||||
|
->modalDescription('Monitoring favorit and if condition is matchted the system will emit a notification')
|
||||||
->modalSubmitActionLabel('Save')
|
->modalSubmitActionLabel('Save')
|
||||||
->extraModalFooterActions(fn (Action $action, $record) => $record->event_user_notification->isEmpty() ? [] : [$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger')])
|
->extraModalFooterActions(fn (Action $action, $record) => $record->event_user_notification->isEmpty() ? [] : [$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger')])
|
||||||
->modalIcon('phosphor-bell')
|
->modalIcon('phosphor-bell')
|
||||||
@@ -639,27 +640,18 @@ class EventsTable
|
|||||||
})
|
})
|
||||||
->schema([
|
->schema([
|
||||||
Hidden::make('event_user_notification_id'),
|
Hidden::make('event_user_notification_id'),
|
||||||
Toggle::make('is_notified')->label('Monitoring Favorit')
|
Toggle::make('is_notified')->label('On/Off')
|
||||||
// ->aboveContent('If a notification has been send "Monitoring" will be off')
|
|
||||||
->onColor('gray')
|
->onColor('gray')
|
||||||
->offColor('info'),
|
->offColor('info'),
|
||||||
RadioDeck::make('odds_table_id')
|
Radio::make('odds_table_id')
|
||||||
->label('Bettype')
|
->label('Bettype')
|
||||||
->columns(3)
|
->columns(3)
|
||||||
->colors('info')
|
|
||||||
->required()
|
->required()
|
||||||
->extraCardsAttributes([ // Extra attributes for card elements
|
|
||||||
'class' => 'dark:bg-gray-900!',
|
|
||||||
])
|
|
||||||
->options(fn ($record) => OddsTable::options_sport()),
|
->options(fn ($record) => OddsTable::options_sport()),
|
||||||
RadioDeck::make('alarm_level_id')
|
Radio::make('alarm_level_id')
|
||||||
->label('Alarm level')
|
->label('Alarm level')
|
||||||
->colors('info')
|
|
||||||
->columns(3)
|
->columns(3)
|
||||||
->required()
|
->required()
|
||||||
->extraCardsAttributes([ // Extra attributes for card elements
|
|
||||||
'class' => 'dark:bg-gray-900!',
|
|
||||||
])
|
|
||||||
->options([
|
->options([
|
||||||
'1' => 'Level 1',
|
'1' => 'Level 1',
|
||||||
'2' => 'Level 2',
|
'2' => 'Level 2',
|
||||||
|
|||||||
@@ -74,10 +74,7 @@ class AlarmBookmaker extends Component implements HasActions, HasSchemas, HasTab
|
|||||||
->width('2rem')
|
->width('2rem')
|
||||||
->prefix('Threshold:')
|
->prefix('Threshold:')
|
||||||
->rules(['required', 'decimal:2', 'between:0,2']),
|
->rules(['required', 'decimal:2', 'between:0,2']),
|
||||||
ToggleColumn::make('disabled')
|
ToggleColumn::make('disabled'),
|
||||||
->label('Status')
|
|
||||||
->offColor('success')
|
|
||||||
->onColor('danger'),
|
|
||||||
])
|
])
|
||||||
->defaultSort('level_id')
|
->defaultSort('level_id')
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ class ComparingBookmakerMenu extends Component implements HasActions, HasSchemas
|
|||||||
->where('client_bookmaker_id', $this->user->bookmaker_id)
|
->where('client_bookmaker_id', $this->user->bookmaker_id)
|
||||||
->orderBy('sorting')
|
->orderBy('sorting')
|
||||||
)
|
)
|
||||||
|
->defaultPaginationPageOption(10)
|
||||||
|
->paginated([5, 10, 15, 30, 50])
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('Position')
|
TextColumn::make('Position')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
@@ -73,7 +75,7 @@ class ComparingBookmakerMenu extends Component implements HasActions, HasSchemas
|
|||||||
->rules(['required', 'integer', 'between:100,200']),
|
->rules(['required', 'integer', 'between:100,200']),
|
||||||
// ToggleColumn::make('is_active'),
|
// ToggleColumn::make('is_active'),
|
||||||
])
|
])
|
||||||
->searchable(['bookmaker.name'])
|
->searchable(['bookmaker_id', 'bookmaker.name'])
|
||||||
// ->filters([
|
// ->filters([
|
||||||
// TernaryFilter::make('is_active')
|
// TernaryFilter::make('is_active')
|
||||||
// ->columnSpan(2)
|
// ->columnSpan(2)
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ use App\Models\CompetitionGroup;
|
|||||||
use App\Models\Country;
|
use App\Models\Country;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Mapper;
|
use App\Models\Mapper;
|
||||||
use App\Models\User;
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Actions\Concerns\InteractsWithActions;
|
use Filament\Actions\Concerns\InteractsWithActions;
|
||||||
@@ -42,8 +41,6 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
|
|
||||||
public $search_left = false;
|
public $search_left = false;
|
||||||
|
|
||||||
public $user;
|
|
||||||
|
|
||||||
protected $listeners = [
|
protected $listeners = [
|
||||||
'refreshMapperLeft' => '$refresh',
|
'refreshMapperLeft' => '$refresh',
|
||||||
];
|
];
|
||||||
@@ -65,12 +62,11 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
$this->dispatch('refreshMapperLeft');
|
$this->dispatch('refreshMapperLeft');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Lazy]
|
||||||
public function table(Table $table): Table
|
public function table(Table $table): Table
|
||||||
{
|
{
|
||||||
$this->user = User::getUser();
|
|
||||||
|
|
||||||
return $table
|
return $table
|
||||||
->query(LoadEvents::load($this->search_left, $this->user->sport_id))
|
->query(LoadEvents::load($this->search_left, auth()->user()->sport_id))
|
||||||
->columns([
|
->columns([
|
||||||
MapperLeftColumn::make('left')->label(''),
|
MapperLeftColumn::make('left')->label(''),
|
||||||
])
|
])
|
||||||
@@ -82,14 +78,14 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
Select::make('country_id')
|
Select::make('country_id')
|
||||||
->placeholder('Country')
|
->placeholder('Country')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->multiple()
|
// ->multiple()
|
||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
->options(function () {
|
->options(function () {
|
||||||
$res = Event::query()->where('sport_id', $this->user->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray();
|
$res = Event::query()->where('sport_id', auth()->user()->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray();
|
||||||
|
|
||||||
return Country::query()->whereIn('id', $res)->pluck('name', 'id');
|
return Country::query()->where('id', $res)->orderBy('name')->pluck('name', 'id');
|
||||||
})
|
})
|
||||||
->live()
|
->live()
|
||||||
->reactive()
|
->reactive()
|
||||||
@@ -105,12 +101,12 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
->searchable()
|
->searchable()
|
||||||
->options(function (Get $get) {
|
->options(function (Get $get) {
|
||||||
if ($get('country_id')) {
|
if ($get('country_id')) {
|
||||||
$res = Event::query()->where('sport_id', $this->user->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->whereIn('country_id', $get('country_id'))->groupBy('competition_group_id')->pluck('competition_group_id')->toArray();
|
$res = Event::query()->where('sport_id', auth()->user()->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->where('country_id', $get('country_id'))->groupBy('competition_group_id')->pluck('competition_group_id')->toArray();
|
||||||
} else {
|
} else {
|
||||||
$res = Event::query()->where('sport_id', $this->user->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->pluck('competition_group_id')->toArray();
|
$res = Event::query()->where('sport_id', auth()->user()->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->pluck('competition_group_id')->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
$comps = CompetitionGroup::with('country')->whereIn('id', $res)->get();
|
$comps = CompetitionGroup::with('country')->where('id', $res)->get();
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
foreach ($comps as $val) {
|
foreach ($comps as $val) {
|
||||||
@@ -155,7 +151,6 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
Action::make('refreshMapperLeft')
|
Action::make('refreshMapperLeft')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->icon('phosphor-x')
|
->icon('phosphor-x')
|
||||||
->color('danger')
|
|
||||||
->size(Size::Small)
|
->size(Size::Small)
|
||||||
->action(function (Component $livewire) {
|
->action(function (Component $livewire) {
|
||||||
$this->search_left = '';
|
$this->search_left = '';
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ use App\Livewire\Mapper\StoreMapped;
|
|||||||
use App\Models\Country;
|
use App\Models\Country;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Mapper;
|
use App\Models\Mapper;
|
||||||
use App\Models\User;
|
|
||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Actions\Concerns\InteractsWithActions;
|
use Filament\Actions\Concerns\InteractsWithActions;
|
||||||
use Filament\Actions\Contracts\HasActions;
|
use Filament\Actions\Contracts\HasActions;
|
||||||
@@ -45,8 +44,6 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
'refreshMapperRight' => '$refresh',
|
'refreshMapperRight' => '$refresh',
|
||||||
];
|
];
|
||||||
|
|
||||||
public $user;
|
|
||||||
|
|
||||||
public function removeTableFilter(string $filterName, ?string $field = null, bool $shouldTriggerUpdatedFiltersHook = true): void
|
public function removeTableFilter(string $filterName, ?string $field = null, bool $shouldTriggerUpdatedFiltersHook = true): void
|
||||||
{
|
{
|
||||||
$searchValues = preg_split('/\s+/', $this->search_right, -1, PREG_SPLIT_NO_EMPTY);
|
$searchValues = preg_split('/\s+/', $this->search_right, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
@@ -66,10 +63,8 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
|
|
||||||
public function table(Table $table): Table
|
public function table(Table $table): Table
|
||||||
{
|
{
|
||||||
$this->user = User::getUser();
|
|
||||||
|
|
||||||
return $table
|
return $table
|
||||||
->query(LoadProvider::load($this->search_right, $this->user))
|
->query(LoadProvider::load($this->search_right, auth()->user()))
|
||||||
->columns([
|
->columns([
|
||||||
MapperRightColumn::make('right')->label(''),
|
MapperRightColumn::make('right')->label(''),
|
||||||
])->searchable(['home', 'away'])
|
])->searchable(['home', 'away'])
|
||||||
@@ -78,17 +73,17 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
Filter::make('events')
|
Filter::make('events')
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('country_id')
|
Select::make('country_id')
|
||||||
->visible(fn () => in_array($this->user->provider_id, [3, 4]))
|
->visible(fn () => in_array(auth()->user()->provider_id, [3, 4]))
|
||||||
->placeholder('Country')
|
->placeholder('Country')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
->multiple()
|
// ->multiple()
|
||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
->live()
|
->live()
|
||||||
->options(function (Get $get) {
|
->options(function (Get $get) {
|
||||||
return Mapper::query()->where('sport_id', $this->user->sport_id)->where('provider_id', $this->user->provider_id)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country', 'country_id')->toArray();
|
return Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country', 'country_id')->toArray();
|
||||||
})
|
})
|
||||||
->reactive()
|
->reactive()
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
@@ -96,17 +91,17 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
})
|
})
|
||||||
->placeholder('Country'),
|
->placeholder('Country'),
|
||||||
Select::make('group_cc')
|
Select::make('group_cc')
|
||||||
->visible(fn () => $this->user->provider_id == 2)
|
->visible(fn () => auth()->user()->provider_id == 2)
|
||||||
->placeholder('Country')
|
->placeholder('Country')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
->multiple()
|
// ->multiple()
|
||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
->live()
|
->live()
|
||||||
->options(function () {
|
->options(function () {
|
||||||
$res = Mapper::query()->where('sport_id', $this->user->sport_id)->where('provider_id', $this->user->provider_id)->where('starttime', '>', Carbon::now())->groupBy('group_cc')->pluck('group_cc')->toArray();
|
$res = Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id)->where('starttime', '>', Carbon::now())->groupBy('group_cc')->pluck('group_cc')->toArray();
|
||||||
|
|
||||||
return Country::query()->whereIn('iso2', $res)->pluck('name', 'iso2');
|
return Country::query()->whereIn('iso2', $res)->pluck('name', 'iso2');
|
||||||
})
|
})
|
||||||
@@ -126,11 +121,11 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
->multiple()
|
->multiple()
|
||||||
->options(function (Get $get) {
|
->options(function (Get $get) {
|
||||||
if ($get('country_id')) {
|
if ($get('country_id')) {
|
||||||
return Mapper::query()->where('sport_id', $this->user->sport_id)->where('provider_id', $this->user->provider_id)->where('starttime', '>', Carbon::now())->whereIn('country_id', $get('country_id'))->groupBy('group_id')->pluck('group', 'group_id')->toArray();
|
return Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id)->where('starttime', '>', Carbon::now())->where('country_id', $get('country'))->groupBy('group_id')->pluck('group', 'group_id')->toArray();
|
||||||
} elseif ($get('group_cc')) {
|
} elseif ($get('group_cc')) {
|
||||||
return Mapper::query()->where('sport_id', $this->user->sport_id)->where('provider_id', $this->user->provider_id)->where('starttime', '>', Carbon::now())->whereIn('group_cc', $get('group_cc'))->groupBy('group_id')->pluck('group', 'group_id')->toArray();
|
return Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id)->where('starttime', '>', Carbon::now())->where('group_cc', $get('group_cc'))->groupBy('group_id')->pluck('group', 'group_id')->toArray();
|
||||||
} else {
|
} else {
|
||||||
return Mapper::query()->where('sport_id', $this->user->sport_id)->where('provider_id', $this->user->provider_id)->where('starttime', '>', Carbon::now())->groupBy('group_id')->pluck('group', 'group_id')->toArray();
|
return Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id)->where('starttime', '>', Carbon::now())->groupBy('group_id')->pluck('group', 'group_id')->toArray();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
->live(),
|
->live(),
|
||||||
@@ -139,10 +134,10 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
return $query
|
return $query
|
||||||
->when(
|
->when(
|
||||||
$data['country_id'],
|
$data['country_id'],
|
||||||
fn (Builder $query, $country_id) => $query->whereIn('country_id', $country_id)
|
fn (Builder $query, $country_id) => $query->where('country_id', $country_id)
|
||||||
)->when(
|
)->when(
|
||||||
$data['group_cc'],
|
$data['group_cc'],
|
||||||
fn (Builder $query, $group_cc) => $query->whereIn('group_cc', $group_cc)
|
fn (Builder $query, $group_cc) => $query->where('group_cc', $group_cc)
|
||||||
)->when(
|
)->when(
|
||||||
$data['group_id'],
|
$data['group_id'],
|
||||||
fn (Builder $query, $group_id) => $query->whereIn('group_id', $group_id)
|
fn (Builder $query, $group_id) => $query->whereIn('group_id', $group_id)
|
||||||
@@ -168,7 +163,6 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
Action::make('refreshMapperRight')
|
Action::make('refreshMapperRight')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->icon('phosphor-x')
|
->icon('phosphor-x')
|
||||||
->color('danger')
|
|
||||||
->size(Size::Small)
|
->size(Size::Small)
|
||||||
->action(function (Component $livewire) {
|
->action(function (Component $livewire) {
|
||||||
$this->search_right = '';
|
$this->search_right = '';
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ use Filament\Tables\Filters\Filter;
|
|||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
class MultilineBookmaker extends Component implements HasActions, HasSchemas, HasTable
|
class MultilineBookmaker extends Component implements HasActions, HasSchemas, HasTable
|
||||||
@@ -52,21 +51,12 @@ class MultilineBookmaker extends Component implements HasActions, HasSchemas, Ha
|
|||||||
SelectColumn::make('bookmaker_id')
|
SelectColumn::make('bookmaker_id')
|
||||||
->label('Bookmaker')
|
->label('Bookmaker')
|
||||||
->width('2rem')
|
->width('2rem')
|
||||||
->options(function ($livewire, $record) {
|
->options(function () {
|
||||||
$table = MultilineSetting::where('id', $livewire->tableFilters['multiline_setting_id'])->value('table');
|
if (auth()->user()->sport_id == 1) {
|
||||||
|
Bookmaker::where('in_soccer', 1)->pluck('name', 'id');
|
||||||
$bookies = DB::table($table)
|
} else {
|
||||||
->where('sport_id', auth()->user()->sport_id)
|
Bookmaker::where('in_other', 1)->pluck('name', 'id');
|
||||||
->groupBy('bookmaker_id')->pluck('bookmaker_id');
|
|
||||||
|
|
||||||
$res = Bookmaker::whereIn('id', $bookies)->pluck('name', 'id');
|
|
||||||
$arr = [];
|
|
||||||
foreach ($res as $id => $name) {
|
|
||||||
$arr[$id] = $name;
|
|
||||||
}
|
}
|
||||||
asort($arr);
|
|
||||||
|
|
||||||
return $arr;
|
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
->defaultSort('sort')
|
->defaultSort('sort')
|
||||||
@@ -77,7 +67,7 @@ class MultilineBookmaker extends Component implements HasActions, HasSchemas, Ha
|
|||||||
Radio::make('multiline_setting_id')
|
Radio::make('multiline_setting_id')
|
||||||
->extraAttributes(['id' => 'multiline_setting'])
|
->extraAttributes(['id' => 'multiline_setting'])
|
||||||
->inline()
|
->inline()
|
||||||
->default(fn ($record) => MultilineSetting::where('sport_id', auth()->user()->sport_id)->pluck('id')->first())
|
->default(-1)
|
||||||
->columnSpan(6)
|
->columnSpan(6)
|
||||||
->columnSpanFull()
|
->columnSpanFull()
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ class SportSwitcher extends Component
|
|||||||
|
|
||||||
$this->dispatch('refreshComparingBookmakerMenu');
|
$this->dispatch('refreshComparingBookmakerMenu');
|
||||||
|
|
||||||
$this->dispatch('refreshMapperLeft');
|
|
||||||
|
|
||||||
$this->dispatch('refreshMapperRight');
|
|
||||||
|
|
||||||
$this->dispatch('refreshlarmBookmaker');
|
$this->dispatch('refreshlarmBookmaker');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -22,8 +22,7 @@
|
|||||||
"laravel/framework": "^12.0",
|
"laravel/framework": "^12.0",
|
||||||
"laravel/tinker": "^2.10.1",
|
"laravel/tinker": "^2.10.1",
|
||||||
"outhebox/blade-flags": "^1.5",
|
"outhebox/blade-flags": "^1.5",
|
||||||
"swisnl/filament-backgrounds": "^2.0",
|
"swisnl/filament-backgrounds": "^2.0"
|
||||||
"tonegabes/filament-better-options": "^1.2"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-debugbar": "^3.16",
|
"barryvdh/laravel-debugbar": "^3.16",
|
||||||
|
|||||||
Generated
+1
-131
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "b1f96a36e577a5a502013fb033525720",
|
"content-hash": "872a298c0c1cebe00cac20f0cb2539f7",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "agencetwogether/hookshelper",
|
"name": "agencetwogether/hookshelper",
|
||||||
@@ -9054,136 +9054,6 @@
|
|||||||
},
|
},
|
||||||
"time": "2025-12-02T11:56:42+00:00"
|
"time": "2025-12-02T11:56:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "tonegabes/filament-better-options",
|
|
||||||
"version": "1.2.2",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/tonegabes/filament-better-options.git",
|
|
||||||
"reference": "6314bdf052108e19970f6f3e6885e05bb8801b5f"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/tonegabes/filament-better-options/zipball/6314bdf052108e19970f6f3e6885e05bb8801b5f",
|
|
||||||
"reference": "6314bdf052108e19970f6f3e6885e05bb8801b5f",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"filament/forms": "^4.0",
|
|
||||||
"php": "^8.3",
|
|
||||||
"spatie/laravel-package-tools": "^1.15.0",
|
|
||||||
"tonegabes/filament-phosphor-icons": "^1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"friendsofphp/php-cs-fixer": "^3.86",
|
|
||||||
"larastan/larastan": "^3.0",
|
|
||||||
"laravel/pint": "^1.0",
|
|
||||||
"phpstan/phpstan-deprecation-rules": "^2.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"ToneGabes\\BetterOptions\\BetterOptionsServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"ToneGabes\\BetterOptions\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Tone Gabes",
|
|
||||||
"email": "tonegabes@gmail.com",
|
|
||||||
"homepage": "https://tonegabes.com",
|
|
||||||
"role": "Developer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Filament form components for better radio and checkbox options.",
|
|
||||||
"homepage": "https://github.com/tonegabes/filament-better-options",
|
|
||||||
"keywords": [
|
|
||||||
"Forms",
|
|
||||||
"checkbox",
|
|
||||||
"filament",
|
|
||||||
"laravel",
|
|
||||||
"php",
|
|
||||||
"plugin",
|
|
||||||
"tonegabes"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/tonegabes/filament-better-options/issues",
|
|
||||||
"source": "https://github.com/tonegabes/filament-better-options"
|
|
||||||
},
|
|
||||||
"time": "2025-10-22T19:20:56+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "tonegabes/filament-phosphor-icons",
|
|
||||||
"version": "1.2.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/tonegabes/filament-phosphor-icons.git",
|
|
||||||
"reference": "f654722dee534ccddd005e667a73e8e64cb412cc"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/tonegabes/filament-phosphor-icons/zipball/f654722dee534ccddd005e667a73e8e64cb412cc",
|
|
||||||
"reference": "f654722dee534ccddd005e667a73e8e64cb412cc",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"codeat3/blade-phosphor-icons": "^2.3",
|
|
||||||
"filament/filament": "^4.0",
|
|
||||||
"php": "^8.1"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"laravel/pint": "^1.22"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"ToneGabes\\Filament\\Icons\\PhosphorIconsServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"ToneGabes\\Filament\\Icons\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Tone Gabes",
|
|
||||||
"email": "tonegabes@gmail.com",
|
|
||||||
"homepage": "https://tonegabes.com",
|
|
||||||
"role": "Developer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Phosphor Icons Pack ready for Filament 4",
|
|
||||||
"keywords": [
|
|
||||||
"Iconset",
|
|
||||||
"Phosphor",
|
|
||||||
"filament",
|
|
||||||
"icons",
|
|
||||||
"laravel",
|
|
||||||
"library"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/tonegabes/filament-phosphor-icons/issues",
|
|
||||||
"source": "https://github.com/tonegabes/filament-phosphor-icons/tree/1.2.1"
|
|
||||||
},
|
|
||||||
"time": "2025-09-12T18:24:34+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "ueberdosis/tiptap-php",
|
"name": "ueberdosis/tiptap-php",
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ button[wire\:click="resetTableFiltersForm"] {
|
|||||||
/* background-color: #0f172b; */
|
/* background-color: #0f172b; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fi-ta-table>tbody {
|
||||||
|
@apply divide-none
|
||||||
|
}
|
||||||
|
|
||||||
/* stripes in popups */
|
/* stripes in popups */
|
||||||
@layer utilities {
|
@layer utilities {
|
||||||
.striped div:nth-child(even) {
|
.striped div:nth-child(even) {
|
||||||
@@ -51,6 +55,10 @@ button[wire\:click="resetTableFiltersForm"] {
|
|||||||
@apply !text-center
|
@apply !text-center
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ComparingBookmakerMenu .fi-ta-header-toolbar {
|
||||||
|
@apply grid grid-cols-3 justify-start
|
||||||
|
}
|
||||||
|
|
||||||
#mapper {
|
#mapper {
|
||||||
@layer components {
|
@layer components {
|
||||||
.fi-ta-ctn {
|
.fi-ta-ctn {
|
||||||
@@ -69,18 +77,16 @@ button[wire\:click="resetTableFiltersForm"] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Styling Radio Boxes */
|
/* Styling Radio Lable */
|
||||||
#multiline_setting {
|
|
||||||
@apply !grid grid-cols-3 gap-5 mb-4
|
.fi-fo-radio {
|
||||||
|
@apply !grid grid-cols-2 gap-y-3 my-5
|
||||||
}
|
}
|
||||||
|
|
||||||
#multiline_setting input {
|
.fi-fo-radio-label {
|
||||||
@apply checked:border-blue-500
|
@apply p-2 border border-gray-700 rounded-md cursor-pointer has-checked:bg-blue-50 has-checked:text-blue-900 has-checked:ring-blue-200 dark:has-checked:bg-blue-950 dark:has-checked:text-blue-200 dark:has-checked:ring-blue-900
|
||||||
}
|
}
|
||||||
|
|
||||||
#multiline_setting .fi-fo-radio-label {
|
|
||||||
@apply p-3 border border-gray-700 rounded-xl cursor-pointer has-checked:bg-blue-50 has-checked:text-blue-900 has-checked:ring-blue-200 dark:has-checked:bg-blue-950 dark:has-checked:text-blue-200 dark:has-checked:ring-blue-900
|
|
||||||
}
|
|
||||||
|
|
||||||
#mapper_right .fi-ta-filter-indicators button,
|
#mapper_right .fi-ta-filter-indicators button,
|
||||||
#mapper_left .fi-ta-filter-indicators button {
|
#mapper_left .fi-ta-filter-indicators button {
|
||||||
@@ -91,36 +97,3 @@ button[wire\:click="resetTableFiltersForm"] {
|
|||||||
#mapper_left .fi-ta-filter-indicators div button {
|
#mapper_left .fi-ta-filter-indicators div button {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .fi-ta-table>tbody {
|
|
||||||
@apply divide-none
|
|
||||||
} */
|
|
||||||
#ComparingBookmakerMenu {
|
|
||||||
|
|
||||||
.fi-ta-cell,
|
|
||||||
.fi-input,
|
|
||||||
.fi-select-input,
|
|
||||||
.fi-ta-cell div {
|
|
||||||
padding-top: 1px !important;
|
|
||||||
padding-bottom: 1px !important;
|
|
||||||
margin-top: 0px !important;
|
|
||||||
margin-bottom: 0px !important;
|
|
||||||
border-radius: 0% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex {
|
|
||||||
padding-top: 0px !important;
|
|
||||||
padding-bottom: 0px !important;
|
|
||||||
gap: 3px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.fi-tabs {
|
|
||||||
padding-top: 3px !important;
|
|
||||||
padding-bottom: 3px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fi-header-heading {
|
|
||||||
font-size: 1.5rem !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +1,22 @@
|
|||||||
<div class="flex flex-1 gap-3 items-center m-5 drop-shadow ">
|
<div class="flex flex-1 gap-3 items-center my-5 drop-shadow ">
|
||||||
@switch(auth()->user()->sport_id)
|
@switch(auth()->user()->sport_id)
|
||||||
@case(1)
|
@case(1)
|
||||||
<x-icon-soccerball class="h-8 text-blue-600" />
|
<x-icon-soccerball class="h-6 text-blue-600" />
|
||||||
@break
|
@break
|
||||||
@case(1)
|
|
||||||
<x-icon-icehockey class="h-8 text-gray-950" />
|
|
||||||
@break
|
|
||||||
@case(3)
|
|
||||||
<x-icon-basketball class="h-8 text-red-600" />
|
|
||||||
@break
|
|
||||||
@case(4)
|
|
||||||
<x-icon-tennisball class="h-8 text-yellow-600" />
|
|
||||||
@break
|
|
||||||
@default
|
|
||||||
|
|
||||||
@endswitch
|
@case(1)
|
||||||
<p class="text-xl font-black">{{ $slot }}</p>
|
<x-icon-icehockey class="h-6 text-gray-950" />
|
||||||
</div>
|
@break
|
||||||
|
|
||||||
|
@case(3)
|
||||||
|
<x-icon-basketball class="h-6 text-red-600" />
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case(4)
|
||||||
|
<x-icon-tennisball class="h-6 text-yellow-600" />
|
||||||
|
@break
|
||||||
|
|
||||||
|
@default
|
||||||
|
@endswitch
|
||||||
|
<p class="text-xl font-black">{{ $slot }}</p>
|
||||||
|
</div>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<x-sport-header>
|
<x-sport-header>
|
||||||
{{ auth()->user()->sport->name }} Alarm Configuration
|
{{ auth()->user()->sport->name }} - Alarm Configuration
|
||||||
</x-sport-header>
|
</x-sport-header>
|
||||||
|
|
||||||
{{ $this->table }}
|
{{ $this->table }}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<div id="ComparingBookmakerMenu">
|
<div id="ComparingBookmakerMenu">
|
||||||
|
|
||||||
<x-sport-header>
|
<x-sport-header>
|
||||||
{{ auth()->user()->sport->name }} Comparing Bookmaker
|
{{ auth()->user()->sport->name }} - Comparing Bookmaker
|
||||||
</x-sport-header>
|
</x-sport-header>
|
||||||
|
|
||||||
{{ $this->table }}
|
{{ $this->table }}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<x-sport-header>
|
<x-sport-header>
|
||||||
{{ auth()->user()->sport->name }} Multiline Configuration
|
{{ auth()->user()->sport->name }} - Multiline Configuration
|
||||||
</x-sport-header>
|
</x-sport-header>
|
||||||
|
|
||||||
{{ $this->table }}
|
{{ $this->table }}
|
||||||
|
|||||||
@@ -62,8 +62,7 @@
|
|||||||
|
|
||||||
{{-- Event Mapper --}}
|
{{-- Event Mapper --}}
|
||||||
|
|
||||||
<x-filament::modal width="7xl" icon="phosphor-arrows-in-line-horizontal" :close-by-clicking-away="false" :close-by-escaping="false"
|
<x-filament::modal width="7xl" :close-by-clicking-away="false" :close-by-escaping="true" :close-button="true">
|
||||||
:close-button="true">
|
|
||||||
<x-slot name="trigger">
|
<x-slot name="trigger">
|
||||||
<x-filament::icon-button outlined icon="phosphor-arrows-in-line-horizontal" color="gray"
|
<x-filament::icon-button outlined icon="phosphor-arrows-in-line-horizontal" color="gray"
|
||||||
class="my-auto" title="Event Mapper">
|
class="my-auto" title="Event Mapper">
|
||||||
@@ -113,28 +112,32 @@
|
|||||||
<x-bkm-logifuture-nigeria class="h-5 mx-auto" />
|
<x-bkm-logifuture-nigeria class="h-5 mx-auto" />
|
||||||
</x-filament::dropdown.list.item>
|
</x-filament::dropdown.list.item>
|
||||||
@endif
|
@endif
|
||||||
@break
|
@break
|
||||||
|
|
||||||
@case(36)
|
@case(36)
|
||||||
@if (auth()->user()->provider_id != 6)
|
@if (auth()->user()->provider_id != 6)
|
||||||
<x-filament::dropdown.list.item wire:click="swopProvider(6)">
|
<x-filament::dropdown.list.item wire:click="swopProvider(6)">
|
||||||
<x-bkm-logifuture-colombia class="h-5 mx-auto" />
|
<x-bkm-logifuture-colombia class="h-5 mx-auto" />
|
||||||
</x-filament::dropdown.list.item>
|
</x-filament::dropdown.list.item>
|
||||||
@endif
|
@endif
|
||||||
@break
|
@break
|
||||||
|
|
||||||
@case(10)
|
@case(10)
|
||||||
@if (auth()->user()->provider_id != 4)
|
@if (auth()->user()->provider_id != 4)
|
||||||
<x-filament::dropdown.list.item wire:click="swopProvider(4)">
|
<x-filament::dropdown.list.item wire:click="swopProvider(4)">
|
||||||
<x-bkm-magloo-nigeria class="h-5 mx-auto" />
|
<x-bkm-magloo-nigeria class="h-5 mx-auto" />
|
||||||
</x-filament::dropdown.list.item>
|
</x-filament::dropdown.list.item>
|
||||||
@endif
|
@endif
|
||||||
@break
|
@break
|
||||||
|
|
||||||
@case(16)
|
@case(16)
|
||||||
@if (auth()->user()->provider_id != 3)
|
@if (auth()->user()->provider_id != 3)
|
||||||
<x-filament::dropdown.list.item wire:click="swopProvider(3)">
|
<x-filament::dropdown.list.item wire:click="swopProvider(3)">
|
||||||
<x-bkm-magloo-kenia class="h-5 mx-auto" />
|
<x-bkm-magloo-kenia class="h-5 mx-auto" />
|
||||||
</x-filament::dropdown.list.item>
|
</x-filament::dropdown.list.item>
|
||||||
@endif
|
@endif
|
||||||
@break
|
@break
|
||||||
|
|
||||||
@default
|
@default
|
||||||
@endswitch
|
@endswitch
|
||||||
|
|
||||||
@@ -161,16 +164,15 @@
|
|||||||
</x-filament::modal>
|
</x-filament::modal>
|
||||||
|
|
||||||
{{-- Multiline --}}
|
{{-- Multiline --}}
|
||||||
<x-filament::modal slide-over width="4xl" icon="phosphor-equals" :close-by-clicking-away="false" :close-by-escaping="true"
|
<x-filament::modal slide-over width="4xl" :close-by-clicking-away="false" :close-by-escaping="true" :close-button="true">
|
||||||
:close-button="true">
|
|
||||||
<x-slot name="trigger">
|
<x-slot name="trigger">
|
||||||
<x-filament::icon-button outlined icon="phosphor-equals" color="gray" class="my-auto"
|
<x-filament::icon-button outlined icon="phosphor-equals" color="gray" class="my-auto"
|
||||||
title="Multiline Settings">
|
title="Multiline Settings">
|
||||||
</x-filament::icon-button>
|
</x-filament::icon-button>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
<x-slot name="heading">
|
{{-- <x-slot name="heading">
|
||||||
Multiline Settings
|
Multiline Settings
|
||||||
</x-slot>
|
</x-slot> --}}
|
||||||
@livewire('multiline-bookmaker')
|
@livewire('multiline-bookmaker')
|
||||||
</x-filament::modal>
|
</x-filament::modal>
|
||||||
|
|
||||||
@@ -183,9 +185,9 @@
|
|||||||
</x-filament::icon-button>
|
</x-filament::icon-button>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
<x-slot name="heading">
|
{{-- <x-slot name="heading">
|
||||||
Alarm Settings
|
Alarm Settings
|
||||||
</x-slot>
|
</x-slot> --}}
|
||||||
|
|
||||||
@livewire('alarm-bookmaker')
|
@livewire('alarm-bookmaker')
|
||||||
</x-filament::modal>
|
</x-filament::modal>
|
||||||
@@ -199,9 +201,9 @@
|
|||||||
</x-filament::icon-button>
|
</x-filament::icon-button>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
<x-slot name="heading">
|
{{-- <x-slot name="heading">
|
||||||
Comparing Bookmaker {{ $sport }}
|
Comparing Bookmaker {{ $sport }}
|
||||||
</x-slot>
|
</x-slot> --}}
|
||||||
|
|
||||||
@livewire('comparing-bookmaker-menu')
|
@livewire('comparing-bookmaker-menu')
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user