lasthourcloud/resources/views/livewire/team/member.blade.php
Andras Bacsai a97d22b81b updates
2023-06-12 12:00:01 +02:00

26 lines
1.0 KiB
PHP

<tr class="border-coolgray-200">
{{-- <th class="text-warning">{{ $member->id }}</th> --}}
<th>{{ $member->name }}</th>
<td>{{ $member->email }}</td>
<td>{{ data_get($member, 'pivot.role') }}</td>
<td>
{{-- TODO: This is not good --}}
@if (auth()->user()->isAdmin())
@if ($member->id !== auth()->user()->id)
@if (data_get($member, 'pivot.role') !== 'owner')
@if (data_get($member, 'pivot.role') !== 'admin')
<x-forms.button wire:click="makeAdmin">Convert to Admin</x-forms.button>
@else
<x-forms.button wire:click="makeReadonly">Convert to Member</x-forms.button>
@endif
<x-forms.button wire:click="remove">Remove</x-forms.button>
@else
<x-forms.button disabled>Remove</x-forms.button>
@endif
@else
<x-forms.button disabled>Remove</x-forms.button>
@endif
@endif
</td>
</tr>