user listing flow updated

This commit is contained in:
Sevan Nerse
2022-06-28 21:58:44 +03:00
parent db60980dce
commit 4291c3c594
2 changed files with 11 additions and 17 deletions

View File

@ -311,14 +311,12 @@ class User extends Authenticatable implements HasLocalePreference
return $actions; return $actions;
} }
if (! $this->hasPendingInvitation()) {
$actions[] = [ $actions[] = [
'title' => trans('general.edit'), 'title' => trans('general.edit'),
'icon' => 'edit', 'icon' => 'edit',
'url' => route('users.edit', $this->id), 'url' => route('users.edit', $this->id),
'permission' => 'update-auth-users', 'permission' => 'update-auth-users',
]; ];
}
if ($this->hasPendingInvitation()) { if ($this->hasPendingInvitation()) {
$actions[] = [ $actions[] = [

View File

@ -48,15 +48,11 @@
@foreach($users as $item) @foreach($users as $item)
<x-table.tr href="{{ route('users.edit', $item->id) }}"> <x-table.tr href="{{ route('users.edit', $item->id) }}">
<x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class"> <x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
@if (user()->id != $item->id)
<x-index.bulkaction.single <x-index.bulkaction.single
id="{{ $item->id }}" id="{{ $item->id }}"
name="{{ $item->name }}" name="{{ $item->name }}"
:disabled="($item->hasPendingInvitation() || $item->multiplexed) ? true : false" :disabled="($item->hasPendingInvitation() || user()->id == $item->id) ? true : false"
/> />
@else
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->name }}" disabled />
@endif
</x-table.td> </x-table.td>
<x-table.td class="w-4/12 sm:w-5/12"> <x-table.td class="w-4/12 sm:w-5/12">