partner programm completed

This commit is contained in:
salam committed 2026-01-29 20:20:31 +01:00
1 parent 84bfa248cd
commit a883ccf0ea
22 files changed
+722 -28

No files matched your search

+33
View File
@@ -4,6 +4,7 @@ namespace App\Livewire;
use App\Models\BettypeUser;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Livewire\Component;
@@ -53,6 +54,20 @@ class BettypeToggle extends Component
$this->dispatch('refreshBettypeMenu');
}
public function toggleShowPartner()
{
User::where('id', auth()->user()->id)->update(['partner_compare' => 0, 'partner_show' => DB::raw('!partner_show')]);
$this->dispatch('refreshBettypeMenu');
}
public function toggleComparePartner()
{
User::where('id', auth()->user()->id)->update(['partner_compare' => DB::raw('!partner_compare')]);
$this->dispatch('refreshBettypeMenu');
}
public function toggleMultiline()
{
User::where('id', auth()->user()->id)->update(['is_multiline_direct' => DB::raw('!is_multiline_direct')]);
@@ -60,6 +75,24 @@ class BettypeToggle extends Component
$this->dispatch('refreshBettypeMenu');
}
public function setToday()
{
$data = [
'start' => Carbon::today()->format('Y-m-d 00:00:00'),
'end' => Carbon::tomorrow()->format('Y-m-d 00:00:00'),
];
$this->dispatch('filterUpdatePeriode', json_encode($data));
}
public function setTomorrow()
{
$data = [
'start' => Carbon::tomorrow()->format('Y-m-d 00:00:00'),
'end' => Carbon::tomorrow()->addDay()->format('Y-m-d 00:00:00'),
];
$this->dispatch('filterUpdatePeriode', json_encode($data));
}
public function toggelAllOnlyNone()
{
+8 -1
View File
@@ -24,8 +24,15 @@ class KontoSwitcher extends Component
$bookmakers = Client::where('id', $client_id)->pluck('bookmaker')->first();
$bookmaker_id = array_shift($bookmakers);
$partner_bookmaker_id = array_shift($bookmakers) ?? 0;
User::where('id', auth()->user()->id)->update(['sport_id' => 1, 'provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]);
User::where('id', auth()->user()->id)->update([
'sport_id' => 1,
'provider_id' => $provider_id,
'bookmaker_id' => $bookmaker_id,
'partner_bookmaker_id' => $partner_bookmaker_id,
'client_id' => $client_id,
]);
$this->js('window.location.reload()');
}
+1 -1
View File
@@ -41,7 +41,7 @@ class TopMenuItems extends Component
{
$provider_id = Provider::where('bookmaker_id', $bookmaker_id)->value('id');
User::where('id', auth()->user()->id)->update(['provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id]);
User::where('id', auth()->user()->id)->update(['provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id, 'partner_bookmaker_id' => auth()->user()->bookmaker_id]);
$this->js('window.location.reload()');
}