swop bookmaker and bookmaker mapper
This commit is contained in:
1 parent
17acb27ef0
commit
7f7fc5c98f
10 files changed
+342
-67
No files matched your search
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user