add 2 parts for claculation pp wip

This commit is contained in:
salam committed 2026-10-31 19:22:16 +01:00
1 parent 6d2f4c1052
commit ad45880506
19 files changed
+1403 -1049

No files matched your search

+16 -15
View File
@@ -9,6 +9,7 @@ use Filament\Actions\Action;
use Filament\Actions\ActionGroup;
use Filament\Notifications\Notification;
use Filament\Pages\Page;
use Illuminate\Support\Facades\Auth;
class EventMapper extends Page
{
@@ -36,9 +37,9 @@ class EventMapper extends Page
ActionGroup::make([
Action::make('bet365')
->extraAttributes(['x-on:click' => 'toggle'])
->visible(fn (): bool => auth()->user()->provider_id != 2)
->visible(fn (): bool => Auth::user()->provider_id != 2)
->action(function ($livewire) {
User::where('id', auth()->user()->id)->update(['provider_id' => 2]);
User::where('id', Auth::user()->id)->update(['provider_id' => 2]);
Notification::make()
->title('Event Mapper changed to Bet365')
@@ -49,10 +50,10 @@ class EventMapper extends Page
Action::make('magloo_nigeria')
->label('MAGLOO NIGERIA')
->extraAttributes(['x-on:click' => 'toggle'])
->visible(fn (): bool => in_array(auth()->user()->provider_id, [2, 4]))
->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [10, 16]))
->visible(fn (): bool => in_array(Auth::user()->provider_id, [2, 4]))
->hidden(fn (): bool => ! in_array(Auth::user()->bookmaker_id, [10, 16]))
->action(function ($livewire) {
User::where('id', auth()->user()->id)->update(['provider_id' => 3]);
User::where('id', Auth::user()->id)->update(['provider_id' => 3]);
$livewire->dispatch('refresh');
Notification::make()
@@ -63,10 +64,10 @@ class EventMapper extends Page
Action::make('magloo_kenia')
->label('MAGLOO KENIA')
->extraAttributes(['x-on:click' => 'toggle'])
->visible(fn (): bool => in_array(auth()->user()->provider_id, [2, 3]))
->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [10, 16]))
->visible(fn (): bool => in_array(Auth::user()->provider_id, [2, 3]))
->hidden(fn (): bool => ! in_array(Auth::user()->bookmaker_id, [10, 16]))
->action(function ($livewire) {
User::where('id', auth()->user()->id)->update(['provider_id' => 4]);
User::where('id', Auth::user()->id)->update(['provider_id' => 4]);
$livewire->dispatch('refresh');
Notification::make()
@@ -77,10 +78,10 @@ class EventMapper extends Page
Action::make('logifuture_nigeria')
->label('LOGIFUTURE NIGERA')
->extraAttributes(['x-on:click' => 'toggle'])
->visible(fn (): bool => auth()->user()->provider_id == 6)
->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [35, 36]))
->visible(fn (): bool => Auth::user()->provider_id == 6)
->hidden(fn (): bool => ! in_array(Auth::user()->bookmaker_id, [35, 36]))
->action(function ($livewire) {
User::where('id', auth()->user()->id)->update(['provider_id' => 5]);
User::where('id', Auth::user()->id)->update(['provider_id' => 5]);
$livewire->dispatch('refresh');
@@ -92,10 +93,10 @@ class EventMapper extends Page
Action::make('logifuture_colombia')
->label('LOGIFUTURE COLOMBIA')
->extraAttributes(['x-on:click' => 'toggle'])
->visible(fn (): bool => auth()->user()->provider_id == 5)
->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [35, 36]))
->visible(fn (): bool => Auth::user()->provider_id == 5)
->hidden(fn (): bool => ! in_array(Auth::user()->bookmaker_id, [35, 36]))
->action(function ($livewire) {
User::where('id', auth()->user()->id)->update(['provider_id' => 6]);
User::where('id', Auth::user()->id)->update(['provider_id' => 6]);
$livewire->dispatch('refresh');
@@ -107,7 +108,7 @@ class EventMapper extends Page
])
->label('Swop Bookmaker')
->icon('phosphor-dots-three-vertical')
->visible(fn (): bool => auth()->user()->hasRole('mapper_source_betsapi'))
->visible(fn (): bool => Auth::user()->hasRole('mapper_source_betsapi'))
->color('primary')
->button(),
];