106 lines
6.4 KiB
PHP
106 lines
6.4 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<div class="flex items-center justify-between">
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-white leading-tight">
|
|
{{ __('Użytkownicy usunięci') }}
|
|
</h2>
|
|
|
|
<a href="{{ route('users.index') }}"
|
|
class="inline-flex items-center px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-sm font-medium rounded-md shadow-sm transition ease-in-out duration-150 gap-2">
|
|
<span>{{ __('Powrót do użytkowników') }}</span>
|
|
</a>
|
|
</div>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
|
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg border border-gray-200 dark:border-gray-700/50">
|
|
<div class="p-6 text-gray-900 dark:text-white">
|
|
<div class="mb-6 flex items-center justify-between gap-4">
|
|
<form method="GET" action="{{ route('users.deleted') }}" class="flex items-center gap-2 w-full max-w-xs">
|
|
@if(request('sort'))
|
|
<input type="hidden" name="sort" value="{{ request('sort') }}">
|
|
@endif
|
|
@if(request('direction'))
|
|
<input type="hidden" name="direction" value="{{ request('direction') }}">
|
|
@endif
|
|
|
|
<div class="w-full">
|
|
<x-text-input
|
|
type="text"
|
|
name="search"
|
|
:value="request('search')"
|
|
placeholder="Szukaj usuniętego użytkownika..."
|
|
class="block w-full px-3 py-2 text-sm"
|
|
/>
|
|
</div>
|
|
|
|
<x-primary-button type="submit">
|
|
Szukaj
|
|
</x-primary-button>
|
|
|
|
@if(request('search'))
|
|
<a href="{{ route('users.deleted', request()->only(['sort', 'direction'])) }}"
|
|
class="inline-flex items-center px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition ease-in-out duration-150 whitespace-nowrap">
|
|
Wyczyść
|
|
</a>
|
|
@endif
|
|
</form>
|
|
</div>
|
|
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full border-collapse" style="table-layout: fixed;">
|
|
<thead>
|
|
<tr class="border-b border-gray-200 dark:border-gray-700 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
|
<th scope="col" class="py-3.5 px-4" style="text-align: center !important; width: 25%;">Imię i nazwisko</th>
|
|
<th scope="col" class="py-3.5 px-4" style="text-align: center !important; width: 35%;">Adres e-mail</th>
|
|
<th scope="col" class="py-3.5 px-4" style="text-align: center !important; width: 20%;">Usunięty</th>
|
|
<th scope="col" class="py-3.5 px-4" style="text-align: center !important; width: 20%;">Akcje</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200 dark:divide-gray-700/60 text-sm">
|
|
@forelse($users as $user)
|
|
<tr class="transition-colors duration-150">
|
|
<td class="py-4 px-4 font-medium text-gray-900 dark:text-white align-middle" style="text-align: center !important;">
|
|
{{ $user->name }} {{ $user->surname }}
|
|
</td>
|
|
|
|
<td class="py-4 px-4 text-gray-600 dark:text-gray-300 align-middle" style="text-align: center !important;">
|
|
{{ $user->email }}
|
|
</td>
|
|
|
|
<td class="py-4 px-4 text-gray-600 dark:text-gray-300 align-middle" style="text-align: center !important;">
|
|
{{ $user->deleted_at?->format('d.m.Y H:i') ?? '-' }}
|
|
</td>
|
|
|
|
<td class="py-4 px-4 align-middle" style="text-align: center !important;">
|
|
<form method="POST" action="{{ route('users.restore', ['user' => $user->id]) }}" onsubmit="return confirm('Czy na pewno chcesz przywrócić tego użytkownika?');">
|
|
@csrf
|
|
<button type="submit" class="text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 font-medium text-sm transition">
|
|
Przywróć
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="4" class="py-8 text-gray-500 dark:text-gray-400" style="text-align: center !important;">
|
|
Brak usuniętych użytkowników.
|
|
</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
@if($users->hasPages())
|
|
<div class="mt-6 pt-4 border-t border-gray-200 dark:border-gray-700">
|
|
{{ $users->links() }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|