swop bookmaker and bookmaker mapper

This commit is contained in:
salam committed 2025-12-30 18:03:46 +01:00
1 parent 17acb27ef0
commit 7f7fc5c98f
10 files changed
+342 -67

No files matched your search

+19 -1
View File
@@ -24,6 +24,10 @@ class TopMenuItems extends Component
public $current = '';
protected $listeners = [
'reload_data' => '$refresh',
];
public function mount()
{
$cps = Client::where('id', auth()->user()->client_id)->pluck('sport')->first();
@@ -54,11 +58,25 @@ class TopMenuItems extends Component
$bookmaker_id = array_shift($bookmakers);
User::where('id', auth()->user()->id)->update(['bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]);
User::where('id', auth()->user()->id)->update(['bookmaker_mapper_id' => $bookmaker_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]);
$this->js('window.location.reload()');
}
public function swopBookmaker($bookmaker_id)
{
User::where('id', auth()->user()->id)->update(['bookmaker_id' => $bookmaker_id]);
$this->js('window.location.reload()');
}
public function swopMapper($bookmaker_id)
{
User::where('id', auth()->user()->id)->update(['bookmaker_mapper_id' => $bookmaker_id]);
$this->dispatch('reload_data');
}
public function swopSport()
{
User::where('id', auth()->user()->id)->update(['sport_id' => $this->sport_id]);