Fix styling

This commit is contained in:
Thijmen
2024-06-10 20:43:34 +00:00
committed by github-actions[bot]
parent 41fb6a1fc9
commit d86274cc37
429 changed files with 5307 additions and 2831 deletions

View File

@@ -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'));
}
}