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

27 lines
1009 B
PHP
Raw Normal View History

2023-06-12 19:12:07 +00:00
<tr>
<td>
{{ $member->name }}</th>
2023-06-02 10:34:45 +00:00
<td>{{ $member->email }}</td>
2023-06-12 19:12:07 +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 --}}
2023-07-13 20:03:27 +00:00
@if (auth()->user()->isAdminFromSession())
2023-06-09 13:55:21 +00:00
@if ($member->id !== auth()->user()->id)
@if (data_get($member, 'pivot.role') !== 'owner')
@if (data_get($member, 'pivot.role') !== 'admin')
2023-06-12 10:00:01 +00:00
<x-forms.button wire:click="makeAdmin">Convert to Admin</x-forms.button>
2023-06-09 13:55:21 +00:00
@else
2023-06-12 10:00:01 +00:00
<x-forms.button wire:click="makeReadonly">Convert to Member</x-forms.button>
2023-06-09 13:55:21 +00:00
@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>