mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 06:23:23 +00:00
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
33 lines
812 B
PHP
33 lines
812 B
PHP
<?php
|
|
|
|
namespace App\Livewire\Team\Member;
|
|
|
|
use App\Models\TeamInvitation;
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
use Livewire\Component;
|
|
|
|
class Index extends Component
|
|
{
|
|
use AuthorizesRequests;
|
|
|
|
public $invitations = [];
|
|
|
|
public function mount()
|
|
{
|
|
// Only load invitations for users who can manage them
|
|
if (auth()->user()->can('manageInvitations', currentTeam())) {
|
|
$this->invitations = TeamInvitation::whereTeamId(currentTeam()->id)->get();
|
|
}
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
$members = currentTeam()->members;
|
|
|
|
return view('livewire.team.member.index', [
|
|
'members' => $members,
|
|
'membersWithoutTwoFactorCount' => $members->whereNull('two_factor_confirmed_at')->count(),
|
|
]);
|
|
}
|
|
}
|