lasthourcloud/resources/views/livewire/team/member.blade.php

26 lines
1.0 KiB
PHP
Raw Normal View History

2023-06-02 10:34:45 +00:00
<tr class="border-coolgray-200">
2023-06-09 13:55:21 +00:00
{{-- <th class="text-warning">{{ $member->id }}</th> --}}
<th>{{ $member->name }}</th>
2023-06-02 10:34:45 +00:00
<td>{{ $member->email }}</td>
2023-06-09 13:55:21 +00:00
<td>{{ data_get($member, 'pivot.role') }}</td>
2023-06-02 10:34:45 +00:00
<td>
2023-06-09 13:55:21 +00:00
{{-- 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">Make admin</x-forms.button>
@else
<x-forms.button wire:click="makeReadonly">Make readonly</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
2023-06-02 10:34:45 +00:00
@endif
</td>
</tr>