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