Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -8,9 +8,12 @@ use Livewire\Component;
|
||||
class SwitchTeam extends Component
|
||||
{
|
||||
public string $selectedTeamId = 'default';
|
||||
public function mount() {
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->selectedTeamId = auth()->user()->currentTeam()->id;
|
||||
}
|
||||
|
||||
public function updatedSelectedTeamId()
|
||||
{
|
||||
$this->switch_to($this->selectedTeamId);
|
||||
@@ -18,14 +21,15 @@ class SwitchTeam extends Component
|
||||
|
||||
public function switch_to($team_id)
|
||||
{
|
||||
if (!auth()->user()->teams->contains($team_id)) {
|
||||
if (! auth()->user()->teams->contains($team_id)) {
|
||||
return;
|
||||
}
|
||||
$team_to_switch_to = Team::find($team_id);
|
||||
if (!$team_to_switch_to) {
|
||||
if (! $team_to_switch_to) {
|
||||
return;
|
||||
}
|
||||
refreshSession($team_to_switch_to);
|
||||
|
||||
return redirect(request()->header('Referer'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user