schneespur/resources/views/admin/drivers/index.blade.php
Michael 2c63440ed8 Revert: move code back to project root from schneespur/ subdirectory
- Reverts the schneespur/ subdirectory restructure (b8e426b)
- Restores package.json and vite.config.js (needed for npm build, were
  removed in an earlier cleanup before the restructure)
- Updates public/build/ assets with current Vite output (new content hashes)
2026-05-17 18:24:26 +00:00

66 lines
4.6 KiB
PHP

<x-admin-layout>
<x-slot name="header">{{ __('driver.page_list') }} <x-help-icon topic="drivers" /></x-slot>
<div class="flex items-center justify-end gap-2">
<a href="{{ route('admin.drivers.export-all') }}" class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150">
{{ __('driver.btn_export_all') }}
</a>
<a href="{{ route('admin.drivers.create') }}" class="inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 focus:bg-gray-700 active:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150">
{{ __('driver.btn_create') }}
</a>
</div>
{{-- Search --}}
<form method="GET" action="{{ route('admin.drivers.index') }}" class="mt-4">
<x-text-input name="search" :value="request('search')" :placeholder="__('ui.search_placeholder')" class="w-full sm:w-64" />
</form>
<div class="mt-6">
@if ($drivers->count())
<div class="bg-white overflow-hidden shadow-sm rounded-lg">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{{ __('driver.col_name') }}</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{{ __('driver.col_email') }}</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{{ __('driver.col_dsgvo') }}</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{{ __('driver.col_owntracks') }}</th>
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">{{ __('driver.col_actions') }}</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@foreach ($drivers as $driver)
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">{{ $driver->name }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ $driver->email }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<x-dsgvo-status-badge :user="$driver" />
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
{{ $driver->owntracks_username ?? '—' }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="{{ route('admin.drivers.edit', $driver) }}" class="text-indigo-600 hover:text-indigo-900">{{ __('ui.button_edit') }}</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="mt-4">
{{ $drivers->links() }}
</div>
@else
<x-empty-state :heading="__('driver.empty_heading')" :body="__('driver.empty_body')">
<x-slot name="action">
<a href="{{ route('admin.drivers.create') }}" class="inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 focus:bg-gray-700 active:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150">
{{ __('driver.empty_cta') }}
</a>
</x-slot>
</x-empty-state>
@endif
</div>
</x-admin-layout>