add team view
This commit is contained in:
parent
99be766e90
commit
846e74b8b5
@ -11,6 +11,9 @@
|
||||
<a href="/profile">
|
||||
<x-inputs.button>Profile</x-inputs.button>
|
||||
</a>
|
||||
<a href="/profile/team">
|
||||
<x-inputs.button>Team</x-inputs.button>
|
||||
</a>
|
||||
@if (auth()->user()->isRoot())
|
||||
<a href="/settings">
|
||||
<x-inputs.button>Settings</x-inputs.button>
|
||||
|
@ -1,6 +1,10 @@
|
||||
<div>
|
||||
@foreach (auth()->user()->otherTeams() as $team)
|
||||
<x-inputs.button wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch to:
|
||||
{{ $team->name }}</x-inputs.button>
|
||||
@endforeach
|
||||
<div class="pt-4">
|
||||
<h3>Other Teams</h3>
|
||||
<div class="flex flex-col gap-2">
|
||||
@foreach (auth()->user()->otherTeams() as $team)
|
||||
<x-inputs.button isBold wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch
|
||||
to:
|
||||
{{ $team->name }}</x-inputs.button>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,12 +6,5 @@
|
||||
<p>Id: {{ auth()->user()->id }}</p>
|
||||
<p>Uuid: {{ auth()->user()->uuid }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Current Team</h3>
|
||||
<p>Name: {{ session('currentTeam')->name }}</p>
|
||||
<p>Id: {{ session('currentTeam')->id }}</p>
|
||||
<p>Uuid: {{ session('currentTeam')->uuid }}</p>
|
||||
</div>
|
||||
<livewire:switch-team>
|
||||
</div>
|
||||
</x-layout>
|
||||
|
7
resources/views/team.blade.php
Normal file
7
resources/views/team.blade.php
Normal file
@ -0,0 +1,7 @@
|
||||
<x-layout>
|
||||
<div>
|
||||
<h3>Current Team</h3>
|
||||
<p>Name: {{ session('currentTeam')->name }}</p>
|
||||
<livewire:switch-team>
|
||||
</div>
|
||||
</x-layout>
|
@ -128,6 +128,9 @@
|
||||
Route::get('/profile', function () {
|
||||
return view('profile');
|
||||
})->name('profile');
|
||||
Route::get('/profile/team', function () {
|
||||
return view('team');
|
||||
})->name('team');
|
||||
|
||||
Route::get('/settings', function () {
|
||||
$isRoot = auth()->user()->isRoot();
|
||||
|
Loading…
Reference in New Issue
Block a user